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

Name (_T_I, 0)<br />

// Create Integer temporary variable for result<br />

While (One)<br />

{<br />

Store (Add (ABCD (), 1), _T_I)<br />

If (LEqual (_T_I, 1)) {<br />

…statements1…<br />

}<br />

Else {<br />

If (LNotEqual (Match (Package () {4, 5, 6}, MEQ, _T_I, MTR, 0, 0), Ones)) {<br />

…statements2…<br />

}<br />

Else {<br />

…statements3…<br />

}<br />

Break<br />

}<br />

The While (One) is emitted to enable the use of Break <strong>and</strong> Continue within the Switch statement.<br />

Temporary names emitted by the ASL compiler should appear at the top level of the method, since<br />

the Switch statement could appear within a loop <strong>and</strong> thus attempt to create the name more than once.<br />

Note: If the ASL compiler is unable to determine the type of the expression, then it will generate a<br />

warning <strong>and</strong> assume a type of Integer. The warning will indicate that the code should use one of the<br />

type conversion operators (Such as ToInteger, ToBuffer, ToDecimalString or ToHexString).<br />

Caution: Some of these operators are defined starting with ACPI 2.0 <strong>and</strong> as such may not be<br />

supported by ACPI 1.0b compatible interpreters.<br />

For example:<br />

Switch (ABCD ()) // Cannot determine the type because methods can return anything.<br />

{<br />

…case statements…<br />

}<br />

will generate a warning <strong>and</strong> the following code:<br />

Name (_T_I, 0)<br />

Store (ABCD (), _T_I)<br />

To remove the warning, the code should be:<br />

Switch (ToInteger (ABCD ()))<br />

{<br />

…case statements…<br />

}<br />

19.6.127 ThermalZone (Declare Thermal Zone)<br />

Syntax<br />

ThermalZone (ThermalZoneName) {ObjectList}<br />

Arguments<br />

Declares a Thermal Zone object named ThermalZoneName. ThermalZone opens a name scope.<br />

Each use of a ThermalZone term declares one thermal zone in the system. Each thermal zone in a<br />

system is required to have a unique ThermalZoneName.<br />

Version 6.0 891

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

Saved successfully!

Ooh no, something went wrong!