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

Store (“5678”, Local1)<br />

Add (0x1234, Local1, BUF1)<br />

In the Add statement above, Local1 contains a String object <strong>and</strong> must undergo conversion to an<br />

Integer object before the Add operation can proceed.<br />

In some cases, the operator may take more than one type of oper<strong>and</strong> (such as Integer <strong>and</strong> String). In<br />

this case, depending on the type of the oper<strong>and</strong>, the highest priority conversion is applied. The table<br />

below describes the source oper<strong>and</strong> conversions available. For example:<br />

Store (Buffer (1) {}, Local0)<br />

Name (ABCD, Buffer (10) {1, 2, 3, 4, 5, 6, 7, 8, 9, 0})<br />

CreateDWordField (ABCD, 2, XYZ)<br />

Name (MNOP, ”1234”)<br />

Concatenate (XYZ, MNOP, Local0)<br />

The Concatenate operator can take an Integer, Buffer or String for its first two parameters <strong>and</strong> the<br />

type of the first parameter determines how the second parameter will be converted. In this example,<br />

the first parameter is of type Buffer Field (from the CreateDWordField operator). What should it be<br />

converted to: Integer, Buffer or String? According to Table 19-357, the highest priority conversion<br />

is to Integer. Therefore, both of the following objects will be converted to Integers:<br />

XYZ (0x05040302)<br />

MNOP (0x31, 0x32, 0x33, 0x34)<br />

And will then be joined together <strong>and</strong> the resulting type <strong>and</strong> value will be:<br />

Buffer (0x02, 0x03, 0x04, 0x05, 0x31, 0x32, 0x33, 0x34)<br />

19.3.5.5 Implicit Result Object Conversion<br />

For all ASL operators that generate <strong>and</strong> store a result value (including the Store operator), the result<br />

object is processed <strong>and</strong> stored by the AML interpreter as follows:<br />

• If the ASL operator is one of the explicit conversion operators (ToString, ToInteger, etc., <strong>and</strong> the<br />

CopyObject operator), no conversion is performed. (In other words, the result object is stored<br />

directly to the target <strong>and</strong> completely overwrites any existing object already stored at the target.)<br />

• If the target is a method local or argument (LocalX or ArgX), no conversion is performed <strong>and</strong><br />

the result is stored directly to the target.<br />

• If the target is a fixed type such as a named object or field object, an attempt is made to convert<br />

the source to the existing target type before storing.<br />

• If conversion is impossible, abort the running control method <strong>and</strong> issue a fatal error.<br />

An implicit result conversion can occur anytime the result of an operator is stored into an object that<br />

is of a fixed type. For example:<br />

Version 6.0 793

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

Saved successfully!

Ooh no, something went wrong!