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 Source Language (ASL)Reference<br />

Name (BUFF, Buffer () {0x01, 0x02, 0x03, 0x04, 0x05})<br />

// Store 0x55 into the third byte of the buffer<br />

Store (0x55, Index (BUFF, 2))<br />

The Index operator returns a reference to an 8-bit Buffer Field (similar to that created using<br />

CreateByteField).<br />

If Source is evaluated to a buffer data type, the ObjectReference refers to the byte at Index within<br />

Source. If Source is evaluated to a buffer data type, a Store operation will only change the byte at<br />

Index within Source.<br />

The following example ASL code shows the results of a series of Store operations:<br />

Name (SRCB, Buffer () {0x10, 0x20, 0x30, 0x40})<br />

Name (BUFF, Buffer () {0x1, 0x2, 0x3, 0x4})<br />

The following will store 0x78 into the 3 rd byte of the destination buffer:<br />

Store (0x12345678, Index (BUFF, 2))<br />

The following will store 0x10 into the 2 nd byte of the destination buffer:<br />

Store (SRCB, Index (BUFF, 1))<br />

The following will store 0x41 (an ‘A’) into the 4 th byte of the destination buffer:<br />

Store (“ABCDEFGH”, Index (BUFF, 3))<br />

Note: (Compatibility Note) First introduced in ACPI 2.0. In ACPI 1.0, the behavior of storing data larger<br />

than 8-bits into a buffer using Index was undefined.<br />

19.6.60.3 Index with Strings<br />

The following example ASL code shows a way to store into the 3 rd character in a string:<br />

Name (STR, “ABCDEFGHIJKL”)<br />

// Store ‘H’ (0x48) into the third character to the string<br />

Store (“H”, Index (STR, 2))<br />

The Index operator returns a reference to an 8-bit Buffer Field (similar to that created using<br />

CreateByteField).<br />

Note: (Compatibility Note) First introduced in ACPI 2.0.<br />

19.6.61 IndexField (Declare Index/Data Fields)<br />

Syntax<br />

IndexField (IndexName, DataName, AccessType, LockRule, UpdateRule) {FieldUnitList}<br />

Version 6.0 849

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

Saved successfully!

Ooh no, something went wrong!