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.5.7 Data Type Conversion Rules<br />

The following table presents the detailed data conversion rules for each of the allowable data type<br />

conversions. These conversion rules are implemented by the AML Interpreter <strong>and</strong> apply to all<br />

conversion types — explicit conversions, implicit source conversions, <strong>and</strong> implicit result<br />

conversions.<br />

Table 19-357 Object Conversion Rules<br />

To convert<br />

from an<br />

object of this<br />

Data Type<br />

To an object<br />

of this Data<br />

Type<br />

This action is performed by the AML Interpreter:<br />

Buffer Buffer Field The contents of the buffer are copied to the Buffer Field. If the buffer is<br />

smaller than the size of the buffer field, it is zero extended. If the buffer is<br />

larger than the size of the buffer field, the upper bits are truncated.<br />

Compatibility Note: This conversion was first introduced in ACPI 2.0. The<br />

behavior in ACPI 1.0 was undefined.<br />

Buffer Field<br />

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

Debug Object<br />

Field Unit<br />

Integer<br />

String<br />

[See the<br />

Integer <strong>and</strong><br />

Buffer Rules]<br />

[See the<br />

Integer Rule]<br />

Each buffer byte is displayed as a hexadecimal integer, delimited by<br />

spaces <strong>and</strong>/or commas.<br />

The entire contents of the buffer are copied to the Field Unit. If the buffer is<br />

larger (in bits) than the size of the Field Unit, it is broken into pieces <strong>and</strong><br />

completely written to the Field Unit, lower chunks first. If the buffer (or the<br />

last piece of the buffer, if broken up) is smaller than the size of the Field<br />

Unit, it is zero extended before being written.<br />

If no integer object exists, a new integer is created. The contents of the<br />

buffer are copied to the Integer, starting with the least-significant bit <strong>and</strong><br />

continuing until the buffer has been completely copied — up to the<br />

maximum number of bits in an Integer. The size of an Integer is indicated<br />

by the Definition Block table header’s Revision field. A Revision field value<br />

less than 2 indicates that the size of an Integer is 32 bits. A value greater<br />

than or equal to 2 signifies that the size of an Integer is 64 bits. If the buffer<br />

is smaller than the size of an integer, it is zero extended. If the buffer is<br />

larger than the size of an integer, it is truncated. Conversion of a zerolength<br />

buffer to an integer is not allowed.<br />

If no string object exists, a new string is created. If the string already exists,<br />

it is completely overwritten <strong>and</strong> truncated or extended to accommodate the<br />

converted buffer exactly.The entire contents of the buffer are converted to a<br />

string of two-character hexadecimal numbers, each separated by a space.<br />

A zero-length buffer will be converted to a null (zero-length) string.<br />

If the Buffer Field is smaller than or equal to the size of an Integer (in bits),<br />

it will be treated as an Integer. Otherwise, it will be treated as a Buffer. The<br />

size of an Integer is indicated by the Definition Block table header’s<br />

Revision field. A Revision field value less than 2 indicates that the size of<br />

an Integer is 32 bits. A value greater than or equal to 2 signifies that the<br />

size of an Integer is 64 bits. (See the conversion rules for the Integer <strong>and</strong><br />

Buffer data types.)<br />

The object is treated as an Integer (See conversion rules for the Integer<br />

data type.)<br />

Version 6.0 795

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

Saved successfully!

Ooh no, something went wrong!