27.10.2015 Views

Advanced Configuration and Power Interface Specification

ACPI_6.0

ACPI_6.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ACPI Hardware <strong>Specification</strong><br />

This logic will set the Lid status bit when the button is pressed or released (depending on the<br />

LID_POL bit).<br />

The ASL code below defines the following:<br />

• An operational region where the lid polarity resides in address space System address space in<br />

registers 0x201.<br />

• A field operator to allow AML code to access this bit: Polarity control bit (LID_POL) is called<br />

LPOL <strong>and</strong> is accessed at 0x201.0.<br />

• A device named \_SB.LID with the following:<br />

— A Plug <strong>and</strong> Play identifier “PNP0C0D” that associates OSPM with this object.<br />

— Defines an object that specifies a change in the lid’s status bit can wake the system from the<br />

S4 sleep state <strong>and</strong> from all higher sleep states (S1, S2, or S3).<br />

• The lid switch event h<strong>and</strong>ler that does the following:<br />

— Defines the lid status bit (LID_STS) as a child of the general-purpose event 0 register bit 1.<br />

— Defines the event h<strong>and</strong>ler for the lid (only event h<strong>and</strong>ler on this status bit) that does the<br />

following:<br />

• Flips the polarity of the LPOL bit (to cause the event to be generated on the opposite<br />

condition).<br />

• Generates a notify to the OS that does the following:<br />

• Passes the \_SB.LID object.<br />

• Indicates a device specific event (notify value 0x80).<br />

// Define a Lid switch<br />

OperationRegion(\PHO, SystemIO, 0x201, 0x1)<br />

Field(\PHO, ByteAcc, NoLock, Preserve) {<br />

LPOL, 1<br />

// Lid polarity control bit<br />

}<br />

Device(\_SB.LID){<br />

Name(_HID, EISAID(“PNP0C0D”))<br />

Method(_LID){Return(LPOL)}<br />

Name(_PRW, Package(2){<br />

1, // bit 1 of GPE to enable Lid wakeup<br />

0x04} // can wakeup from S4 state<br />

)<br />

}<br />

Scope(\_GPE){<br />

// Root level event h<strong>and</strong>lers<br />

Method(_L01){<br />

// uses bit 1 of GP0_STS register<br />

Not(LPOL, LPOL) // Flip the lid polarity bit<br />

Notify(LID, 0x80) // Notify OS of event<br />

}<br />

}<br />

4.8.4.2.2 Embedded Controller<br />

ACPI provides a st<strong>and</strong>ard interface that enables AML code to define <strong>and</strong> access generic logic in<br />

“embedded controller space.” This supports current computer models where much of the value<br />

added hardware is contained within the embedded controller while allowing the AML code to access<br />

this hardware in an abstracted fashion.<br />

• The embedded controller is defined as a device <strong>and</strong> must contain a set number of control<br />

methods:<br />

Version 6.0 99

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!