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.

<strong>Advanced</strong> <strong>Configuration</strong> <strong>and</strong> <strong>Power</strong> <strong>Interface</strong> <strong>Specification</strong><br />

PackageList: Data Objects (Integers, Strings, Buffers, <strong>and</strong> Packages) <strong>and</strong> references to control<br />

methods.<br />

Evaluating an undefined element will yield an error, but elements can be assigned values at runtime<br />

to make them defined (via the Index operator). It is an error for NumElements to be less than the<br />

number of elements in the PackageList..<br />

The ASL compiler can emit two different AML opcodes for a Package declaration, either<br />

PackageOp or VarPackageOp. For small, fixed-length packages, the PackageOp is used <strong>and</strong> this<br />

opcode is compatible with ACPI 1.0. A VarPackageOp will be emitted if any of the following<br />

conditions are true:<br />

• The NumElements argument is a TermArg that can only be resolved at runtime.<br />

• At compile time, NumElements resolves to a constant that is larger than 255.<br />

• The PackageList contains more than 255 initializer elements.<br />

Note: The ability to create variable-sized packages was first introduced in ACPI 2.0. ACPI 1.0 only<br />

allowed fixed-size packages with up to 255 elements.<br />

Examples<br />

Example 1:<br />

Package () {<br />

3,<br />

9,<br />

“ACPI 1.0 COMPLIANT”,<br />

Package () {<br />

“CheckSum=>”,<br />

Package () {7, 9}<br />

},<br />

0<br />

}<br />

Example 2: This example defines <strong>and</strong> initializes a two-dimensional array.<br />

Package () {<br />

Package () {11, 12, 13},<br />

Package () {21, 22, 23}<br />

}<br />

Example 3: This code allocates space for ten objects to be defined at runtime (see the Name <strong>and</strong><br />

Index term definitions).<br />

Package (10) {}<br />

Example 4: These package declarations will cause the compiler to emit a VarPackageOp AML<br />

opcode.<br />

872 April, 2015 Version 6.0

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

Saved successfully!

Ooh no, something went wrong!