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 />

// Create the GenericSerialBus data buffer as BUFF<br />

Name(BUFF, Buffer(34)())<br />

// Create GenericSerialBus data buffer as BUFF<br />

CreateByteField(BUFF, 0x00, STAT) // STAT = Status (Byte)<br />

CreateByteField(BUFF, 0x01, LEN) // LEN = Length (Byte)<br />

CreateWordField(BUFF,0x02, DATW) // Data (Bytes 2 <strong>and</strong> 3)<br />

CreateField(BUFF, 0x10, 256, DATA) // Data (Block)<br />

Store(0x0B,DATW)<br />

//Store appropriate reference data for driver to interpret<br />

// Process Call with input value "ACPI" to the device<br />

Store("ACPI", DATA)<br />

// Fill in outgoing data<br />

Store(8, LEN)<br />

// Length of the valid data<br />

Store(Store(BUFF, FLD0), BUFF) // Execute the PC<br />

if (LEqual(STAT, 0x00))<br />

// Test the status<br />

{<br />

// BUFF now contains information returned from PC<br />

// LEN now equals size of data returned<br />

}<br />

Raw accesses assume that the writer has knowledge of the bus that the access is made over <strong>and</strong> the<br />

device that is being accessed. The protocol may only ensure that the buffer is transmitted to the<br />

appropriate driver, but the driver must be able to interpret the buffer to communicate to a register.<br />

5.6 ACPI Event Programming Model<br />

The ACPI event programming model is based on the SCI interrupt <strong>and</strong> General-Purpose Event<br />

(GPE) register. ACPI provides an extensible method to raise <strong>and</strong> h<strong>and</strong>le the SCI interrupt, as<br />

described in this section.<br />

Hardware-reduced ACPI platforms (Section 4.1) use GPIO Interrupt Connections to signal ACPI<br />

Events, described in Section 5.6.5.<br />

5.6.1 ACPI Event Programming Model Components<br />

The components of the ACPI event programming model are the following:<br />

• OSPM<br />

• FADT<br />

• PM1a_STS, PM1b_STS <strong>and</strong> PM1a_EN, PM1b_EN fixed register blocks<br />

• GPE0_BLK <strong>and</strong> GPE1_BLK register blocks<br />

• GPE register blocks defined in GPE block devices<br />

• SCI interrupt<br />

• ACPI AML code general-purpose event model<br />

• ACPI device-specific model events<br />

• ACPI Embedded Controller event model<br />

The role of each component in the ACPI event programming model is described in the following<br />

table.<br />

Version 6.0 241

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

Saved successfully!

Ooh no, something went wrong!