27.10.2015 Views

Advanced Configuration and Power Interface Specification

ACPI_6.0

ACPI_6.0

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ACPI Software Programming Model<br />

event value <strong>and</strong> T indicates the event EOI protocol to use (either ‘E’ for edge triggered, or ‘L’ for<br />

level triggered). The event values for status bits in GPE0_BLK start at zero (_T00), end at the<br />

(GPE0_BLK_LEN / 2) - 1, <strong>and</strong> correspond to each status bit index within GPE0_BLK. The event<br />

values for status bits in GPE1_BLK are offset by GPE_BASE <strong>and</strong> therefore start at GPE1_BASE<br />

<strong>and</strong> end at GPE1_BASE + (GPE1_BLK_LEN / 2) - 1.<br />

For example, suppose an OEM supplies a wake event for a communications port <strong>and</strong> uses bit 4 of the<br />

GPE0_STS bits to raise the wake event status. In an OEM-provided Definition Block, there must be<br />

a Method declaration that uses the name \_GPE._L04 or \GPE._E04 to h<strong>and</strong>le the event. An example<br />

of a control method declaration using such a name is the following:<br />

Method (\_GPE._L04) { // GPE 4 level wake h<strong>and</strong>ler<br />

Notify (\_SB.PCIO.COM0, 2)<br />

}<br />

The control method performs whatever action is appropriate for the event it h<strong>and</strong>les. For example, if<br />

the event means that a device has appeared in a slot, the control method might acknowledge the<br />

event to some other hardware register <strong>and</strong> signal a change notify request of the appropriate device<br />

object. Or, the cause of the general-purpose event can result from more then one source, in which<br />

case the control method for that event determines the source <strong>and</strong> takes the appropriate action.<br />

When a general-purpose event is raised from the GPE bit tied to an embedded controller, the<br />

embedded controller driver uses another naming convention defined by ACPI for the embedded<br />

controller driver to determine which control method to queue for execution. The queries that the<br />

embedded controller driver exchanges with the embedded controller are numbered from 0 through<br />

FF, yielding event codes 01 through FF. (A query response of 0 from the embedded controller is<br />

reserved for “no outst<strong>and</strong>ing events.”) The name of the control method to queue is always of the<br />

form _Qxx where xx is the number of the query acknowledged by the embedded controller. An<br />

example declaration for a control method that h<strong>and</strong>les an embedded controller query is the<br />

following:<br />

Method(_Q34) { // embedded controller event for thermal<br />

Notify (\_SB.TZ0.THM1, 0x80)<br />

}<br />

When an SMBus alarm is h<strong>and</strong>led by the SMBus driver, the SMBus driver uses a similar naming<br />

convention defined by ACPI for the driver to determine the control method to queue for execution.<br />

When an alarm is received by the SMBus host controller, it generally receives the SMBus address of<br />

the device issuing the alarm <strong>and</strong> one word of data. On implementations that use SMBALERT# for<br />

notifications, only the device address will be received. The name of the control method to queue is<br />

always of the form _Qxx where xx is the SMBus address of the device that issued the alarm. The<br />

SMBus address is 7 bits long corresponding to hex values 0 through 7F, although some addresses are<br />

reserved <strong>and</strong> will not be used. The control method will always be queued with one argument that<br />

contains the word of data received with the alarm. An exception is the case of an SMBus using<br />

SMBALERT# for notifications, in this case the argument will be 0. An example declaration for a<br />

control method that h<strong>and</strong>les a SMBus alarm follows:<br />

Version 6.0 245

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

Saved successfully!

Ooh no, something went wrong!