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

All encodings are such that the lead byte of an encoding signifies the type of declaration or reference<br />

being made. The type either has an implicit or explicit length in the stream. All explicit length<br />

declarations take the form shown below, where PkgLength is the length of the inclusive length of the<br />

data for the operation.<br />

LeadByte PkgLength data... LeadByte ...<br />

PkgLength<br />

Figure 5-32 AML Encoding<br />

Encodings of implicit length objects either have fixed length encodings or allow for nested<br />

encodings that, at some point, either result in an explicit or implicit fixed length.<br />

The PkgLength is encoded as a series of 1 to 4 bytes in the stream with the most significant two bits<br />

of byte zero, indicating how many following bytes are in the PkgLength encoding. The next two bits<br />

are only used in one-byte encodings, which allows for one-byte encodings on a length up to 0x3F.<br />

Longer encodings, which do not use these two bits, have a maximum length of the following: twobyte<br />

encodings of 0x0FFF, three-byte encodings of 0x0FFFFF, <strong>and</strong> four-byte length encodings of<br />

0x0FFFFFFFFF.<br />

It is fatal for a package length to not fall on a logical boundary. For example, if a package is<br />

contained in another package, then by definition its length must be contained within the outer<br />

package, <strong>and</strong> similarly for a datum of implicit length.<br />

At some point, the system software decides to “load” a Definition Block. Loading is accomplished<br />

when the system makes a pass over the data <strong>and</strong> populates the ACPI namespace <strong>and</strong> initializes<br />

objects accordingly. The namespace for which population occurs is either from the current<br />

namespace location, as defined by all nested packages or from the root if the name is preceded with<br />

‘\’.<br />

The first object present in a Definition Block must be a named control method. This is the Definition<br />

Block’s initialization control.<br />

Packages are objects that contain an ordered reference to one or more objects. A package can also be<br />

considered a vertex of an array, <strong>and</strong> any object contained within a package can be another package.<br />

This permits multidimensional arrays of fixed or dynamic depths <strong>and</strong> vertices.<br />

Unnamed objects are used to populate the contents of named objects. Unnamed objects cannot be<br />

created in the “root.” Unnamed objects can be used as arguments in control methods.<br />

Control method execution may generate errors when creating objects. This can occur if a Method<br />

that creates named objects blocks <strong>and</strong> is reentered while blocked. This will happen because all<br />

named objects have an absolute path. This is true even if the object name specified is relative. For<br />

example, the following ASL code segments are functionally identical.<br />

216 April, 2015 Version 6.0

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

Saved successfully!

Ooh no, something went wrong!