Table 18-9 Object Storing and Copying Rules
When Storing an object of any data type to this type of Target location
|
This action is performed by the Store operator or any ASL operator with a Target operand:
|
This action is performed by the CopyObject operator:
|
Method ArgX variable
|
The object is copied to the destination with no conversion applied, with one exception. If the ArgX contains an Object Reference, an automatic de-reference occurs and the object is copied to the target of the Object Reference instead of overwriting the contents of ArgX
|
Method LocalX variable
|
The object is copied to the destination with no conversion applied. Even if LocalX contains an Object Reference, it is overwritten.
|
Field Unit or Buffer Field
|
The object is copied to the destination after implicit result conversion is applied
|
Fields permanently retain their type and cannot be changed. Therefore, CopyObject can only be used to copy an object of type Integer or Buffer to fields.
|
Named data object
|
The object is copied to the destination after implicit result conversion is applied to match the existing type of the named location
|
The object and type are copied to the named location.
| -
Rules for Reading and Writing Objects
In the descriptions below, read operations always return the actual object, not a copy of the object in order that constructs of the form:
Add (Local1, Local2, Local3)
do not create unnecessary copies of Local1 or Local2. Also, this behavior enables the call-by-reference semantics of control method invocation.
-
ArgX Objects
1) Read from ArgX parameters
-
ObjectReference - Automatic dereference, return the target of the reference. Use of DeRefOf returns the same.
-
Buffer – Return the Buffer. Can create an Index, Field, or Reference to the buffer.
-
Package – Return the Package. Can create an Index or Reference to the package.
-
All other object types – Return the object.
Example method invocation for the table below:
MTHD (RefOf (Obj), Buf, Pkg, Obj)
Table 18-10 Reading from ArgX Objects
Parameter
|
MTHD ArgX Type
|
Read operation on ArgX
|
Result of read
|
RefOf (Obj),
|
Reference to object Obj
|
Store (Arg0, …)
CopyObject (Arg0, …)
DeRefOf (Arg0)
|
Obj
Obj
Obj
|
Buf,
|
Buffer
|
Store (Arg1, …)
CopyObject (Arg1, …)
Index (Arg1, …)
Field (Arg1, …)
|
Buf
Buf
Index (Buf)
Field (Buf)
|
Pkg
|
Package
|
Store (Arg2, …)
CopyObject (Arg2, …)
Index (Arg2, …)
|
Pkg
Pkg
Index (Pkg)
|
Obj
|
All other object types
|
Store (Arg3, …)
CopyObject (Arg3, …)
|
Obj
Obj
|
2) Store to ArgX parameters
-
ObjectReference objects - Automatic dereference, copy the object and overwrite the final target.
-
All other object types- Copy the object and overwrite the ArgX variable. (Direct writes to buffer or package ArgX parameters will also simply overwrite ArgX)
Table 18-11 Writing to ArgX Objects
Current type of ArgX
|
Object to be written
|
Write operation on ArgX
|
Result of write (in ArgX)
|
RefOf (OldObj)
|
Obj
(Any type)
|
Store (…, ArgX)
CopyObject (…, ArgX)
|
RefOf (copy of Obj)
RefOf (copy of Obj)
|
All other object types
|
Obj
(Any type)
|
Store (…, ArgX)
CopyObject (…, ArgX)
|
Copy of Obj
Copy of Obj
|
Note: RefOf (ArgX) returns a reference to ArgX.
-
LocalX Objects
1) Read from LocalX variables
-
ObjectReference - If performing a DeRefOf return the target of the reference. Otherwise, return the reference.
-
All other object types - Return a the object
Table 18-12 Reading from LocalX Objects
Current LocalX Type
|
Read operation on LocalX
|
Result of read
|
RefOf (Obj)
|
Store (LocalX, …)
CopyObject (LocalX, …)
DeRefOf (LocalX)
|
RefOf (Obj)
RefOf (Obj)
Obj
|
Obj (All other types)
|
Store (LocalX, …)
CopyObject (LocalX, …)
|
Obj
Obj
|
2) Store to LocalX variables
-
All object types - Delete any existing object in LocalX first, then store a copy of the object.
Table 18-13 Writing to LocalX Objects
Current LocalX Type
|
Object to be written
|
Write operation on LocalX
|
Result of write (in LocalX)
|
All object types
|
Obj
(Any type)
|
Store (…, LocalX)
CopyObject (…, LocalX)
|
Copy of Obj
Copy of Obj
| -
Named Objects
1) Read from Named object
-
ObjectReference - If performing a DeRefOf return the target of the reference. Otherwise, return the reference.
-
All other object types - Return the object
Table 18-14 Reading from Named Objects
Current NAME Type
|
Read operation on NAME
|
Result of read
|
RefOf (Obj)
|
Store (NAME, …)
CopyObject (NAME, …)
DeRefOf (NAME)
|
RefOf (Obj)
RefOf (Obj)
Obj
|
Obj (All other types)
|
Store (NAME, …)
CopyObject (NAME, …)
|
Obj
Obj
|
2) Store to Named object
-
All object types - Delete any existing object in NAME first, then store a copy of the object. The Store operator will perform an implicit conversion to the existing type in NAME. CopyObject does not perform an implicit store.
Table 18-15 Writing to Named Objects
Current NAME Type
|
Object to be written
|
Write operation on NAME
|
Result of write (in NAME)
|
Any
(Any Type)
|
Obj
(Any type)
|
Store (…, NAME)
CopyObject (…, NAME)
|
Copy of Obj (converted to type A)
Copy of Obj (No conversion)
| -
ASL Operator Summary
Operator Name Page Description
-
Acquire 576 Acquire a mutex
-
Add 576 Integer Add
-
Alias 577 Define a name alias
-
And 577 Integer Bitwise And
-
ArgX 577 Method argument data objects
-
BankField 577 Declare fields in a banked configuration object
-
Break 578 Continue following the innermost enclosing While
-
BreakPoint 579 Used for debugging, stops execution in the debugger
-
Buffer 579 Declare Buffer object
-
Case 579 Expression for conditional execution
-
Concatenate 580 Concatenate two strings, integers or buffers
-
ConcatenateResTemplate 580 Concatenate two resource templates
-
CondRefOf 580 Conditional reference to an object
-
Continue 581 Continue innermost enclosing While loop
-
CopyObject 581 Copy and existing object
-
CreateBitField 581 Declare a bit field object of a buffer object
-
CreateByteField 582 Declare a byte field object of a buffer object
-
CreateDWordField 582 Declare a DWord field object of a buffer object
-
CreateField 582 Declare an arbitrary length bit field of a buffer object
-
CreateQWordField 582 Declare a QWord field object of a buffer object
-
CreateWordField 583 Declare a Word field object of a buffer object
-
DataTableRegion 583 Declare a Data Table Region
-
Debug 584 Debugger output
-
Decrement 584 Decrement an Integer
-
Default 584 Default execution path in Switch()
-
DefinitionBlock 585 Declare a Definition Block
-
DerefOf 585 Dereference an object reference
-
Device 585 Declare a bus/device object
-
Divide 587 Integer Divide
-
DMA 587 DMA Resource Descriptor macro
-
DWordIO 588 DWord IO Resource Descriptor macro
-
DWordMemory 589 DWord Memory Resource Descriptor macro
-
DWordSpace 591 DWord Space Resource Descriptor macro
-
EisaId 592 EISA ID String to Integer conversion macro
-
Else 592 Alternate conditional execution
-
ElseIf 593 Conditional execution
-
EndDependentFn 594 End Dependent Function Resource Descriptor macro
-
Event 594 Declare an event synchronization object
-
ExtendedIO 594 Extended IO Resource Descriptor macro
-
ExtendedMemory 596 Extended Memory Resource Descriptor macro
-
ExtendedSpace 597 Extended Space Resource Descriptor macro
-
External 598 Declare external objects
-
Fatal 599 Fatal error check
-
Field 599 Declare fields of an operation region object
-
FindSetLeftBit 602 Index of first least significant bit set
-
FindSetRightBit 602 Index of first most significant bit set
-
FixedIO 602 Fixed I/O Resource Descriptor macro
-
FromBCD 603 Convert from BCD to numeric
-
Function 603 Declare control method
-
If 604 Conditional execution
-
Include 604 Include another ASL file
-
Increment 605 Increment a Integer
-
Index 605 Indexed Reference to member object
-
IndexField 607 Declare Index/Data Fields
-
Interrupt 608 Interrupt Resource Descriptor macro
-
IO 609 IO Resource Descriptor macro
-
IRQ 610 Interrupt Resource Descriptor macro
-
IRQNoFlags 610 Short Interrupt Resource Descriptor macro
-
LAnd 611 Logical And
-
LEqual 611 Logical Equal
-
LGreater 611 Logical Greater
-
LGreaterEqual 612 Logical Not less
-
LLess 612 Logical Less
-
LLessEqual 612 Logical Not greater
-
LNot 613 Logical Not
-
LNotEqual 613 Logical Not equal
-
Load 613 Load differentiating definition block
-
LoadTable 614 Load Table from RSDT/XSDT
-
LocalX 615 Method local data objects
-
LOr 615 Logical Or
-
Match 615 Search for match in package array
-
Memory24 616 Memory Resource Descriptor macro
-
Memory32 617 Memory Resource Descriptor macro
-
Memory32Fixed 618 Memory Resource Descriptor macro
-
Method 618 Declare a control method
-
Mid 620 Return a portion of buffer or string
-
Mod 620 Integer Modulo
-
Multiply 620 Integer Multiply
-
Mutex 621 Declare a mutex synchronization object
-
Name 621 Declare a Named object
-
NAnd 622 Integer Bitwise Nand
-
NoOp 622 No operation
-
NOr 622 Integer Bitwise Nor
-
Not 622 Integer Bitwise Not
-
Notify 623 Notify Object of event
-
ObjectType 623 Type of object
-
One 624 Constant One Object (1)
-
Ones 624 Constant Ones Object (-1)
-
OperationRegion 624 Declare an operational region
-
Or 626 Integer Bitwise Or
-
Package 626 Declare a package object
-
PowerResource 627 Declare a power resource object
-
Processor 627 Declare a processor package
-
QWordIO 628 QWord IO Resource Descriptor macro
-
QWordMemory 629 QWord Memory Resource Descriptor macro
-
QWordSpace 631 Qword Space Resource Descriptor macro
-
RefOf 632 Create Reference to an object
-
Register 632 Generic register Resource Descriptor macro
-
Release 633 Release a synchronization object
-
Reset 633 Reset a synchronization object
-
ResourceTemplate 634 Resource to buffer conversion macro
-
Return 634 Return from method execution
-
Revision 634 Constant revision object
-
Scope 634 Open named scope
-
ShiftLeft 635 Integer shift value left
-
ShiftRight 636 Integer shift value right
-
Signal 636 Signal a synchronization object
-
SizeOf 636 Get the size of a buffer, string, or package
-
Sleep 636 Sleep n milliseconds (yields the processor)
-
Stall 637 Delay n microseconds (does not yield the processor)
-
StartDependentFn 637 Start Dependent Function Resource Descriptor macro
-
StartDependentFnNoPri 638 Start Dependent Function Resource Descriptor macro
-
Store 638 Store object
-
Subtract 639 Integer Subtract
-
Switch 639 Select code to execute based on expression value
-
ThermalZone 641 Declare a thermal zone package.
-
Timer 641 Get 64-bit timer value
-
ToBCD 642 Convert Integer to BCD
-
ToBuffer 642 Convert data type to buffer
-
ToDecimalString 642 Convert data type to decimal string
-
ToHexString 643 Convert data type to hexadecimal string
-
ToInteger 643 Convert data type to integer
-
ToString 643 Copy ASCII string from buffer
-
ToUUID 644 Convert Ascii string to UUID
-
Unicode 645 String to Unicode conversion macro
-
Unload 645 Unload definition block
-
VendorLong 645 Vendor Resource Descriptor
-
VendorShort 646 Vendor Resource Descriptor
-
Wait 646 Wait on an Event
-
While 646 Conditional loop
-
WordBusNumber 647 Word Bus number Resource Descriptor macro
-
WordIO 648 Word IO Resource Descriptor macro
-
WordSpace 649 Word Space Resource Descriptor macro
-
Xor 651 Integer Bitwise Xor
-
Zero 651 Constant Zero object (0)
-
ASL Operator Summary By Type
Operator Name Page Description
// ASL compiler controls
External 598 Declare external objects
Include 604 Include another ASL file
// ACPI table management
DefinitionBlock 585 Declare a Definition Block
Load 613 Load definition block
LoadTable 614 Load Table from RSDT/XSDT
Unload 645 Unload definition block
// Miscellaneous named object creation
Alias 577 Define a name alias
Buffer 579 Declare Buffer object
Device 585 Declare a bus/device object
Function 603 Declare a control method
Method 618 Declare a control method
Name 621 Declare a Named object
Package 626 Declare a package object
PowerResource 627 Declare a power resource object
Processor 627 Declare a processor package
Scope 634 Open named scope
ThermalZone 641 Declare a thermal zone package.
// Operation Regions
BankField 577 Declare fields in a banked configuration object
DataTableRegion 583 Declare a Data Table Region
Field 599 Declare fields of an operation region object
IndexField 607 Declare Index/Data Fields
OperationRegion 624 Declare an operational region
// Buffer Fields
CreateBitField 581 Declare a bit field object of a buffer object
CreateByteField 582 Declare a byte field object of a buffer object
CreateDWordField 582 Declare a DWord field object of a buffer object
CreateField 582 Declare an arbitrary length bit field of a buffer object
CreateQWordField 582 Declare a QWord field object of a buffer object
CreateWordField 583 Declare a Word field object of a buffer object
// Synchronization
Acquire 576 Acquire a mutex
Event 594 Declare an event synchronization object
Mutex 621 Declare a mutex synchronization object
Notify 623 Notify Object of event
Release 633 Release a synchronization object
Reset 633 Reset a synchronization object
Signal 636 Signal a synchronization object
Wait 646 Wait on an Event
// Object references
CondRefOf 580 Conditional reference to an object
DerefOf 585 Dereference an object reference
RefOf 632 Create Reference to an object
// Integer arithmetic
Add 576 Integer Add
And 577 Integer Bitwise And
Decrement 584 Decrement an Integer
Divide 587 Integer Divide
FindSetLeftBit 602 Index of first least significant bit set
FindSetRightBit 602 Index of first most significant bit set
Increment 605 Increment a Integer
Mod 620 Integer Modulo
Multiply 620 Integer Multiply
NAnd 622 Integer Bitwise Nand
NOr 622 Integer Bitwise Nor
Not 622 Integer Bitwise Not
Or 626 Integer Bitwise Or
ShiftLeft 635 Integer shift value left
ShiftRight 636 Integer shift value right
Share with your friends: |