Power Management Fixes - RevoGirl/RevoBoot GitHub Wiki
Introduction
RevoBoot as you might know is just another hobby. Not a money maker. Yet we constantly try to improve RevoBoot and push out new innovative features to the public. One particular point of interest – for the last couple of updates – is to extend support for Sandy Bridge configurations. To eliminate the need for modified DSDT’s. A pretty huge step forward in our book.
Why this change?
While experts know how to obtain ACPI tables (in Linux) and how to modify them to make everything work, you may not want to do this. Lack of time or simply not knowing what to do are the two most obvious reasons. Enter this new RevoBoot feature. This will give you Power Management and a top of the class Geekbench score right from the start. And to get sleep / wake functional... all you have to do is to use our SSDT and boot up.
So what’s next? Well. You may have certain things in your DSDT that you like to keep, or even need. Here is a small example of what we need (from our example SSDT.dsl):
Scope (\_SB.PCI0)
{
Name (PW94, Package (0x02) { 0x09, 0x04 })
Device (MCHC)
{
Name (_ADR, Zero)
}
Device (HDEF)
{
Name (_ADR, 0x001B0000)
Alias (PW94, _PRW)
}
}
You may also want to add a few devices, or give them a name. Have a look at our next snippet (from our example SST.dsl) for how that is done:
Scope (\_SB.PCI0.P0P1)
{
Device (GFX0)
{
Name (_SUN, One)
Name (_ADR, Zero)
}
Device (HDAU)
{
Name (_ADR, One)
}
}
Scope (\_SB.PCI0.PEX4) // This device may have a different name in your DSDT!
{
Device (FRWR)
{
Name (_ADR, Zero)
}
}
Scope (\_SB.PCI0.PEX5) // This device may have a different name in your DSDT!
{
Device (GIGE)
{
Name (_ADR, Zero)
}
}
Pretty self explanatory we think. Also a lot more fun to look at. Well. That's what we think.
SBUS only injection
RevoBoot can inject device SBUS for you, and RevoBoot v1.0.22 was changed so that you can inject SBUS only. For this you have to set the following compiler directives (see configuration files):
AUTOMATIC_SSDT_PR_CREATION 4
MAX_NUMBER_OF_P_STATES 0
DROP_FACTORY_SSDT_TABLES 0
NUMBER_OF_TURBO_STATES 0
OVERRIDE_ACPI_METHODS 1
This way RevoBoot skips certain parts of the code i.e. it won't inject the processor declaration blocks for you, because we don't drop SSDT tables here, and it also won't inject any P-States and/or C-States for you and thus this only works when your SSDT tables are working.
The Result (SSDT-2)
/*
* Intel ACPI Component Architecture
* AML Disassembler version 20110316-64 [Mar 16 2011]
* Copyright (c) 2000 - 2011 Intel Corporation
*
* Original Table Header:
* Signature "SSDT"
* Length 0x0000007B (123)
* Revision 0x01
* Checksum 0x28
* OEM ID "APPLE "
* OEM Table ID "CpuPm"
* OEM Revision 0x00001000 (4096)
* Compiler ID "INTL"
* Compiler Version 0x20110316 (537985814)
*/
DefinitionBlock ("ssdt-2.aml", "SSDT", 1, "APPLE ", "CpuPm", 0x00001000)
{
External (\_SB_.PCI0, DeviceObj)
Scope (\_SB.PCI0)
{
Device (SBUS)
{
Name (_ADR, 0x001F0003)
Device (BUS0)
{
Name (_CID, "smbus")
Name (_ADR, Zero)
Device (DVL0)
{
Name (_ADR, 0x57)
Name (_CID, "diagsvault")
}
}
}
}
}
Please note that you should have only one Device (SBUS) in the ACPI namespace, or it will break!
About Setting Device Properties
And now for the stubborn amongst you. Folks that want to keep setting device-properties from ACPI tables... because they don't know how to do it right? Anyway. Just add the following code snippet (by Master Chief) and get going:
Method (MCDP, 2, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Store (Buffer (One)
{
0x03
}, Arg1)
}
}
There is nothing against setting device-properties from ACPI tables, for as long as it is to generate the data you need, and then to include it as EFI device-properties.
Notes:
We don’t set device-properties from within _DSM methods anymore, but use EFI device-properties instead, simply because doing it this way is so much faster. This new feature also only works on Sandy Bridge setups.
Sorry, but we are not interested in outdated hardware, simply because we don't use it ourself. You may however fork RevoBoot to make it work for your hardware – should be fairly easy. One of the beauties of using Open Source software.