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.

ACPI Source Language (ASL)Reference<br />

19<br />

ACPI Source Language (ASL)Reference<br />

This section formally defines the ACPI Source Language (ASL). ASL is a source language for<br />

defining ACPI objects including writing ACPI control methods. OEMs <strong>and</strong> BIOS developers define<br />

objects <strong>and</strong> write control methods in ASL <strong>and</strong> then use a translator tool (compiler) to generate ACPI<br />

Machine Language (AML) versions of the control methods. For a formal definition of AML, see the<br />

ACPI Machine Language (AML) <strong>Specification</strong>, Section 20, “ACPI Machine Language<br />

<strong>Specification</strong>.”<br />

AML <strong>and</strong> ASL are different languages though they are closely related.<br />

Every ACPI-compatible OS must support AML. A given user can define some arbitrary source<br />

language (to replace ASL) <strong>and</strong> write a tool to translate it to AML.<br />

An OEM or BIOS vendor needs to write ASL <strong>and</strong> be able to single-step AML for debugging.<br />

(Debuggers <strong>and</strong> similar tools are expected to be AML-level tools, not source-level tools.) An ASL<br />

translator implementer must underst<strong>and</strong> how to read ASL <strong>and</strong> generate AML. An AML interpreter<br />

author must underst<strong>and</strong> how to execute AML.<br />

This section has two parts:<br />

• The ASL grammar, which is the formal ASL specification <strong>and</strong> also serves as a quick reference.<br />

• A full ASL reference, which includes for each ASL operator: the operator invocation syntax, the<br />

type of each argument, <strong>and</strong> a description of the action <strong>and</strong> use of the operator.<br />

19.1 ASL 2.0 Symbolic Operators <strong>and</strong> Expressions<br />

For the math <strong>and</strong> logical operations, ASL supports st<strong>and</strong>ard symbolic operators <strong>and</strong> expressions that<br />

are similar to the C language. Compound assignment operators are also supported. The AML code<br />

that is generated from the symbolic operators <strong>and</strong> expressions is identical to the AML code<br />

generated for the equivalent legacy ASL operators.<br />

The table below summarizes the ASL 2.0 support for symbolic operators.<br />

Version 6.0 751

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

Saved successfully!

Ooh no, something went wrong!