Advanced Configuration and Power Interface Specification Hewlett-Packard Corporation


Table 18-9    Object Storing and Copying Rules



Download 7.02 Mb.
Page70/86
Date31.01.2017
Size7.02 Mb.
#13953
1   ...   66   67   68   69   70   71   72   73   ...   86

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.

        1.    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.


          1.    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.

          1.    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



          1.    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)



    1.    ASL Operator Summary


Operator Name Page Description


  1. Acquire 576 Acquire a mutex

  2. Add 576 Integer Add

  3. Alias 577 Define a name alias

  4. And 577 Integer Bitwise And

  5. ArgX 577 Method argument data objects

  6. BankField 577 Declare fields in a banked configuration object

  7. Break 578 Continue following the innermost enclosing While

  8. BreakPoint 579 Used for debugging, stops execution in the debugger

  9. Buffer 579 Declare Buffer object

  10. Case 579 Expression for conditional execution

  11. Concatenate 580 Concatenate two strings, integers or buffers

  12. ConcatenateResTemplate 580 Concatenate two resource templates

  13. CondRefOf 580 Conditional reference to an object

  14. Continue 581 Continue innermost enclosing While loop

  15. CopyObject 581 Copy and existing object

  16. CreateBitField 581 Declare a bit field object of a buffer object

  17. CreateByteField 582 Declare a byte field object of a buffer object

  18. CreateDWordField 582 Declare a DWord field object of a buffer object

  19. CreateField 582 Declare an arbitrary length bit field of a buffer object

  20. CreateQWordField 582 Declare a QWord field object of a buffer object

  21. CreateWordField 583 Declare a Word field object of a buffer object

  22. DataTableRegion 583 Declare a Data Table Region

  23. Debug 584 Debugger output

  24. Decrement 584 Decrement an Integer

  25. Default 584 Default execution path in Switch()

  26. DefinitionBlock 585 Declare a Definition Block

  27. DerefOf 585 Dereference an object reference

  28. Device 585 Declare a bus/device object

  29. Divide 587 Integer Divide

  30. DMA 587 DMA Resource Descriptor macro

  31. DWordIO 588 DWord IO Resource Descriptor macro

  32. DWordMemory 589 DWord Memory Resource Descriptor macro

  33. DWordSpace 591 DWord Space Resource Descriptor macro

  34. EisaId 592 EISA ID String to Integer conversion macro

  35. Else 592 Alternate conditional execution

  36. ElseIf 593 Conditional execution

  37. EndDependentFn 594 End Dependent Function Resource Descriptor macro

  38. Event 594 Declare an event synchronization object

  39. ExtendedIO 594 Extended IO Resource Descriptor macro

  40. ExtendedMemory 596 Extended Memory Resource Descriptor macro

  41. ExtendedSpace 597 Extended Space Resource Descriptor macro

  42. External 598 Declare external objects

  43. Fatal 599 Fatal error check

  44. Field 599 Declare fields of an operation region object

  45. FindSetLeftBit 602 Index of first least significant bit set

  46. FindSetRightBit 602 Index of first most significant bit set

  47. FixedIO 602 Fixed I/O Resource Descriptor macro

  48. FromBCD 603 Convert from BCD to numeric

  49. Function 603 Declare control method

  50. If 604 Conditional execution

  51. Include 604 Include another ASL file

  52. Increment 605 Increment a Integer

  53. Index 605 Indexed Reference to member object

  54. IndexField 607 Declare Index/Data Fields

  55. Interrupt 608 Interrupt Resource Descriptor macro

  56. IO 609 IO Resource Descriptor macro

  57. IRQ 610 Interrupt Resource Descriptor macro

  58. IRQNoFlags 610 Short Interrupt Resource Descriptor macro

  59. LAnd 611 Logical And

  60. LEqual 611 Logical Equal

  61. LGreater 611 Logical Greater

  62. LGreaterEqual 612 Logical Not less

  63. LLess 612 Logical Less

  64. LLessEqual 612 Logical Not greater

  65. LNot 613 Logical Not

  66. LNotEqual 613 Logical Not equal

  67. Load 613 Load differentiating definition block

  68. LoadTable 614 Load Table from RSDT/XSDT

  69. LocalX 615 Method local data objects

  70. LOr 615 Logical Or

  71. Match 615 Search for match in package array

  72. Memory24 616 Memory Resource Descriptor macro

  73. Memory32 617 Memory Resource Descriptor macro

  74. Memory32Fixed 618 Memory Resource Descriptor macro

  75. Method 618 Declare a control method

  76. Mid 620 Return a portion of buffer or string

  77. Mod 620 Integer Modulo

  78. Multiply 620 Integer Multiply

  79. Mutex 621 Declare a mutex synchronization object

  80. Name 621 Declare a Named object

  81. NAnd 622 Integer Bitwise Nand

  82. NoOp 622 No operation

  83. NOr 622 Integer Bitwise Nor

  84. Not 622 Integer Bitwise Not

  85. Notify 623 Notify Object of event

  86. ObjectType 623 Type of object

  87. One 624 Constant One Object (1)

  88. Ones 624 Constant Ones Object (-1)

  89. OperationRegion 624 Declare an operational region

  90. Or 626 Integer Bitwise Or

  91. Package 626 Declare a package object

  92. PowerResource 627 Declare a power resource object

  93. Processor 627 Declare a processor package

  94. QWordIO 628 QWord IO Resource Descriptor macro

  95. QWordMemory 629 QWord Memory Resource Descriptor macro

  96. QWordSpace 631 Qword Space Resource Descriptor macro

  97. RefOf 632 Create Reference to an object

  98. Register 632 Generic register Resource Descriptor macro

  99. Release 633 Release a synchronization object

  100. Reset 633 Reset a synchronization object

  101. ResourceTemplate 634 Resource to buffer conversion macro

  102. Return 634 Return from method execution

  103. Revision 634 Constant revision object

  104. Scope 634 Open named scope

  105. ShiftLeft 635 Integer shift value left

  106. ShiftRight 636 Integer shift value right

  107. Signal 636 Signal a synchronization object

  108. SizeOf 636 Get the size of a buffer, string, or package

  109. Sleep 636 Sleep n milliseconds (yields the processor)

  110. Stall 637 Delay n microseconds (does not yield the processor)

  111. StartDependentFn 637 Start Dependent Function Resource Descriptor macro

  112. StartDependentFnNoPri 638 Start Dependent Function Resource Descriptor macro

  113. Store 638 Store object

  114. Subtract 639 Integer Subtract

  115. Switch 639 Select code to execute based on expression value

  116. ThermalZone 641 Declare a thermal zone package.

  117. Timer 641 Get 64-bit timer value

  118. ToBCD 642 Convert Integer to BCD

  119. ToBuffer 642 Convert data type to buffer

  120. ToDecimalString 642 Convert data type to decimal string

  121. ToHexString 643 Convert data type to hexadecimal string

  122. ToInteger 643 Convert data type to integer

  123. ToString 643 Copy ASCII string from buffer

  124. ToUUID 644 Convert Ascii string to UUID

  125. Unicode 645 String to Unicode conversion macro

  126. Unload 645 Unload definition block

  127. VendorLong 645 Vendor Resource Descriptor

  128. VendorShort 646 Vendor Resource Descriptor

  129. Wait 646 Wait on an Event

  130. While 646 Conditional loop

  131. WordBusNumber 647 Word Bus number Resource Descriptor macro

  132. WordIO 648 Word IO Resource Descriptor macro

  133. WordSpace 649 Word Space Resource Descriptor macro

  134. Xor 651 Integer Bitwise Xor

  135. Zero 651 Constant Zero object (0)



    1.    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


Download 7.02 Mb.

Share with your friends:
1   ...   66   67   68   69   70   71   72   73   ...   86




The database is protected by copyright ©ininet.org 2024
send message

    Main page