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

OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100) //Initial offset is 0<br />

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

{<br />

Connection(I2CSerialBus(0x5a,,100000,, "\_SB.I2C",,,,RawDataBuffer(){1,6}))<br />

Offset(0x0),<br />

AccessAs(BufferAcc, AttribBytes (4)),<br />

TFK1, 8, //TFK1 at comm<strong>and</strong> value offset 0<br />

TFK2, 8 //TFK2 at comm<strong>and</strong> value offset 1<br />

Connection(I2CSerialBus(0x5c,,100000,, "\_SB.I2C",,,,RawDataBuffer(){3,1}))<br />

Offset(0x0),<br />

AccessAs(BufferAcc, AttribBytes (12)),<br />

TS1, 8 //TS1 at comm<strong>and</strong> value offset 2<br />

}<br />

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

{<br />

Connection(I2CSerialBus(0x5b,,100000,, "\_SB.I2C",,,,RawDataBuffer(){2,9}))<br />

AccessAs(BufferAcc, AttribByte),<br />

TM1, 8 //TM1 at comm<strong>and</strong> value offset 0<br />

}<br />

5.5.2.4.5.2 Declaring <strong>and</strong> Using a GenericSerialBus Data Buffer<br />

The use of a data buffer for GenericSerialBus transactions allows AML to receive status <strong>and</strong> data<br />

length values, as well as making it possible to implement the Process Call protocol. The BufferAcc<br />

access type is used to indicate to the field h<strong>and</strong>ler that a region-specific data buffer will be used.<br />

For GenericSerialBus operation regions, this data buffer is defined as an arbitrary length buffer that,<br />

if represented using a ‘C’-styled declaration, would be modeled as follows:<br />

typedef struct<br />

{<br />

BYTEStatus; // Byte 0 of the data buffer<br />

BYTELength; // Byte 1 of the data buffer<br />

BYTE[x-1]Data; // Bytes 2-x of the arbitrary length data buffer,<br />

} // where x is the last index of the overall buffer<br />

Where:<br />

• Status (byte 0) indicates the status code of a given GenericSerialBus transaction.<br />

• Length (byte 1) specifies the number of bytes of valid data that exists in the data buffer. Use of<br />

this field is only defined for the Read/Write Block protocol. For other protocols—where the data<br />

length is implied by the protocol—this field is reserved.<br />

• Data (bytes 2-x) represents an arbitrary length buffer, <strong>and</strong> is the location where actual data is<br />

stored.<br />

For example, the following ASL shows the use of the GenericSerialBus data buffer for performing<br />

transactions to a Smart Battery device.<br />

232 April, 2015 Version 6.0

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

Saved successfully!

Ooh no, something went wrong!