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.

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

• AccessType must be set to ByteAcc.<br />

• LockRule indicates if access to this operation region requires acquisition of the Global Lock<br />

for synchronization. Note that, on HW-reduced ACPI platforms, this field must be set to<br />

NoLock.<br />

• UpdateRule is not applicable to GeneralPurposeIO operation regions since Preserve is<br />

always required. This field is ignored for all GeneralPurposeIO field definitions.<br />

The following ASL code shows the use of the OperationRegion, Field, <strong>and</strong> Offset terms as they<br />

apply to GeneralPurposeIO space.<br />

Device(DEVA) //An Arbitrary Device Scope<br />

{<br />

...//Other required stuff for this device<br />

Name (GMOD, ResourceTemplate () //An existing GPIO Connection (to be used later)<br />

{<br />

//2 Outputs that define the <strong>Power</strong> mode of the device<br />

GpioIo (Exclusive, PullDown, , , , "\\_SB.GPI2") {10, 12}<br />

})<br />

} //End DEVA<br />

Device (GPI2) //The OpRegion declaration, <strong>and</strong> the _REG method, must be in the controller’s<br />

namespace scope<br />

{<br />

...//Other required stuff for the GPIO controller<br />

OperationRegion(GPO2, GeneralPurposeIO, 0, 1) // Note: length of 1 means region is (or less<br />

than) 1 byte (8 pins) long<br />

Method(_REG,2) {} // Track availability of GeneralPurposeIO space<br />

} //End GPI2<br />

Device (DEVB) //Access some GPIO Pins from this device scope to change the device's power mode<br />

{<br />

...//Other required stuff for this device<br />

Name(_DEP, Package() {"\\_SB.GPI2"}) //OpRegion Dependency hint for OSPM<br />

Field(\_SB.GPI2.GPO2, ByteAcc, NoLock, Preserve)<br />

{<br />

Connection (GMOD), // Re-Use an existing connection (defined elsewhere)<br />

MODE, 2, // <strong>Power</strong> Mode<br />

Connection (GpioIo(Exclusive, PullUp, , , , "\\_SB.GPI2") {7}),<br />

STAT, 1, // e.g. Status signal from the device<br />

Connection (GpioIo (Exclusive, PullUp, , , , "\\_SB.GPI2") {9}),<br />

RSET, 1 // e.g. Reset signal to the device<br />

}<br />

Method(_PS3)<br />

{<br />

If (1) // Make sure GeneralPurposeIO Region is available<br />

{<br />

Store(0x03, MODE) //Set both MODE bits. <strong>Power</strong> Mode 3<br />

}<br />

}<br />

} //End DEVB<br />

5.5.2.4.5 Declaring GenericSerialBus Operation Regions<br />

For GenericSerialBus Operation Regions, the syntax for the OperationRegion term (from<br />

Section 19.6.97, “OperationRegion (Declare Operation Region]”) is described below.<br />

228 April, 2015 Version 6.0

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

Saved successfully!

Ooh no, something went wrong!