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.

<strong>Advanced</strong> <strong>Configuration</strong> <strong>and</strong> <strong>Power</strong> <strong>Interface</strong> <strong>Specification</strong><br />

Method(_Q18, 1) { // Thermal sensor device at address 0011 000<br />

// Arg0 contains notification value (if any)<br />

// Arg0 = 0 if device supports only SMBALERT#<br />

}<br />

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

5.6.4.1.2 Dispatching to an ACPI-Aware Device Driver<br />

Certain device support, such as an embedded controller, requires a dedicated GPE to service the<br />

device. Such GPEs are dispatched to native OS code to be h<strong>and</strong>led <strong>and</strong> not to the corresponding<br />

GPE-specific control method.<br />

In the case of the embedded controller, an OS-native, ACPI-aware driver is given the GPE event for<br />

its device. This driver services the embedded controller device <strong>and</strong> determines when events are to be<br />

reported by the embedded controller by using the Query comm<strong>and</strong>. When an embedded controller<br />

event occurs, the ACPI-aware driver dispatches the requests to other ACPI-aware drivers that have<br />

registered to h<strong>and</strong>le the embedded controller queries or queues control methods to h<strong>and</strong>le each<br />

event. If there is no device driver to h<strong>and</strong>le specific queries, OEM AML code can perform OEMspecific<br />

functions that are customized to each event on the particular platform by including specific<br />

control methods in the namespace to h<strong>and</strong>le these events. For an embedded controller event, OSPM<br />

will queue the control method of the name _QXX, where XX is the hex format of the query code.<br />

Notice that each embedded controller device can have query event control methods.<br />

Similarly, for an SMBus driver, if no driver registers for SMBus alarms, the SMBus driver will<br />

queue control methods to h<strong>and</strong>le these. Methods must be placed under the SMBus device with the<br />

name _QXX where XX is the hex format of the SMBus address of the device sending the alarm.<br />

5.6.4.2 GPE Wake Events<br />

An important use of the general-purpose events is to implement device wake events. The<br />

components of the ACPI event programming model interact in the following way:<br />

• When a device asserts its wake signal, the general-purpose status event bit used to track that<br />

device is set.<br />

• While the corresponding general-purpose enable bit is enabled, the SCI interrupt is asserted.<br />

• If the system is sleeping, this will cause the hardware, if possible, to transition the system into<br />

the S0 state.<br />

• Once the system is running, OSPM will dispatch the corresponding GPE h<strong>and</strong>ler.<br />

• The h<strong>and</strong>ler needs to determine which device object has signaled wake <strong>and</strong> performs a wake<br />

Notify<br />

• comm<strong>and</strong> on the corresponding device object(s) that have asserted wake.<br />

• In turn OSPM will notify OSPM native driver(s) for each device that will wake its device to<br />

service it.<br />

Events that wake may not be intermixed with non-wake (runtime) events on the same GPE input.<br />

The only exception to this rule is made for the special devices below. Only the following devices are<br />

allowed to utilize a single GPE for both wake <strong>and</strong> runtime events:<br />

1. Button Devices<br />

246 April, 2015 Version 6.0

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

Saved successfully!

Ooh no, something went wrong!