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(_GWS, 1){<br />

If(LEqual(Arg0, 1) {<br />

Store(…, Local0) //Get DC timer wake status<br />

}<br />

Else {<br />

Store(…, Local0) //Get AC timer wake status<br />

}<br />

Return (Local0)<br />

}<br />

Method(_CWS, 2){<br />

If(LEqual(Arg0, 0) {<br />

Store(0, …)<br />

//Clear AC Wake status<br />

}<br />

Else {<br />

Store(0, …)<br />

//Clear DC Wake status<br />

}<br />

Return(0)<br />

}<br />

} // end of ACPI Wake Alarm device object<br />

Scope(\_GPE) { // Root level event h<strong>and</strong>lers<br />

Method(_Lxx){<br />

Store(One, ...)<br />

Notify(\_SB.AWA, 0x2) //notify the OSPM of device wake<br />

}<br />

} // end of \_GPE scope<br />

Example 2: Define an ACPI Real Time device on a HW-Reduced ACPI<br />

platform<br />

Device(\_SB.I2C1) //The controller used to access the RTC hardware<br />

{<br />

Name (_HID, ...)<br />

...// Other objects required for this I2C controller<br />

// Track status of SPB OpRegion availability for this controller<br />

Name(AVBL, 0)<br />

Method(_REG,2)<br />

{<br />

/* 9 is the OpRegion type for SPB. (8 == GPIO, etc) */<br />

If (Lequal(Arg0, 9))<br />

{<br />

Store(Arg1, ^AVBL)<br />

}<br />

}<br />

}<br />

Device(\_SB.TAAD)<br />

//The Time <strong>and</strong> Alarm Device<br />

{<br />

Name (_HID, "ACPI000E")<br />

Scope(\_SB.I2C1) //OpRegion declaration must appear under the controller<br />

{<br />

OperationRegion(TOP1, GenericSerialBus, 254, 0x100)<br />

Field(TOP1, BufferAcc, NoLock, Preserve)<br />

{<br />

Connection(I2CSerialBus(0x4a,,400000,,"\\_SB.I2C1",,,,)), //Connection to the<br />

controller for the following field accesses<br />

AccessAs(BufferAcc, AttribWord),<br />

//AccessProtocol for the following field(s)<br />

Y, 8,<br />

AccessAs(BufferAcc, AttribByte),<br />

M, 8,<br />

D, 8,<br />

550 April, 2015 Version 6.0

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

Saved successfully!

Ooh no, something went wrong!