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

19.3.4 ASL Macros<br />

The ASL compiler supports some built in macros to assist in various ASL coding operations. The<br />

following table lists some of the supported directives <strong>and</strong> an explanation of their function.<br />

Table 19-354 Example ASL Built-in Macros<br />

ASL Statement<br />

EISAID (TextID)<br />

Fprintf (Target,<br />

FormatString,<br />

FormatArgs)<br />

Printf (FormatString,<br />

FormatArgs)<br />

ResourceTemplate ()<br />

ToPLD<br />

(PLDKeywordList)<br />

ToUUID (AsciiString)<br />

Unicode (StringData)<br />

Description<br />

Converts the 7-character text argument into its corresponding 4-byte numeric<br />

EISA ID encoding. This can be used when declaring IDs for devices that are<br />

EISA IDs.<br />

Converts a format string to a series of string Concatenate operations <strong>and</strong> stores<br />

the result to a Named Object.<br />

Converts a format string to a series of string Concatenate operations <strong>and</strong> stores<br />

the result to the Debug Object.<br />

Used to supply Plug <strong>and</strong> Play resource descriptor information in human readable<br />

form, which is then translated into the appropriate binary Plug <strong>and</strong> Play resource<br />

descriptor encodings. For more information about resource descriptor<br />

encodings, see Section 6.4, “Resource Data Types for ACPI.”<br />

Converts a PLD Keyword List into a _PLD buffer.<br />

Converts an ASCII string to a 128-bit buffer.<br />

Converts an ASCII string to a Unicode string contained in a buffer.<br />

19.3.5 ASL Data Types<br />

ASL provides a wide variety of data types <strong>and</strong> operators that manipulate data. It also provides<br />

mechanisms for both explicit <strong>and</strong> implicit conversion between the data types when used with ASL<br />

operators.<br />

The table below describes each of the available data types.<br />

Table 19-355 Summary of ASL Data Types<br />

ASL Data Type<br />

[Uninitialized]<br />

Buffer<br />

Buffer Field<br />

DDB H<strong>and</strong>le<br />

Debug Object<br />

Device<br />

Description<br />

No assigned type or value. This is the type of all control method LocalX variables<br />

<strong>and</strong> unused ArgX variables at the beginning of method execution, as well as all<br />

uninitialized Package elements. Uninitialized objects must be initialized (via Store<br />

or CopyObject) before they may be used as source oper<strong>and</strong>s in ASL expressions.<br />

An array of bytes. Uninitialized elements are zero by default.<br />

Portion of a buffer created using CreateBitField, CreateByteField,<br />

CreateWordField, CreateQWordField, CreateField, or returned by the Index<br />

operator.<br />

Definition block h<strong>and</strong>le returned by the Load operator<br />

Debug output object. Formats an object <strong>and</strong> prints it to the system debug port. Has<br />

no effect if debugging is not active.<br />

Device or bus object<br />

Version 6.0 789

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

Saved successfully!

Ooh no, something went wrong!