- If you're total newbie to ACPI, read Chapter 1. Otherwise, proceed to step 2.
- Read Chapter 4 - ACPI Hardware Specification briefly.
- Read Chapter 5 - ACPI Software Programming Model briefly.
- Read Chapter 18 - ACPI Source Language Reference briefly.
// Define a Lid switch OperationRegion(\PHO, SystemIO, 0x201, 0x1) Field(\PHO, ByteAcc, NoLock, Preserve) { LPOL, 1 // Lid polarity control bit } Device(\_SB.LID){ Name(_HID, EISAID(“PNP0C0D”)) Method(_LID){Return(LPOL)} Name(_PRW, Package(2){ 1, // bit 1 of GPE to enable Lid wakeup 0x04} // can wakeup from S4 state ) } Scope(\_GPE){ // Root level event handlers Method(_L01){ // uses bit 1 of GP0_STS register Not(LPOL, LPOL) // Flip the lid polarity bit Notify(LID, 0x80) // Notify OS of event } }In the code above, the words: OperationRegion, Method, Scope, Name, and Field are ASL "operators". Therefore, to know what these operators do, look at the ASL Operator Reference in Chapter 18 (section 18.5) in ACPI specification revision 4.0. There are more things left to be explained to understand the ASL source code above. I'll leave for another time. The most important thing is: now we can read the ACPI specification much more efficiently. Cheers :)
Post a Comment
No comments:
Post a Comment