1 2Now it is a few obsolete. 3 4 517.2.5.7 Data Type Conversion Rules 6 7 8Buffer -> Buffer Field 9 10 The contents of the buffer are copied to the Buffer Field. 11 1. If the buffer is smaller than the size of the buffer field, 12 it is zero extended. 13 2. If the buffer is larger than the size of the buffer field, 14 the upper bits are truncated. 15 16Buffer -> Debug Object 17 18 3. Each buffer byte is displayed as a hexadecimal integer, 19 delimited by spaces and/or commas. 20 21Buffer -> Field Unit 22 23 The entire contents of the buffer are copied to the Field Unit. 24 4. If the buffer is larger (in bits) than the size of the Field Unit, 25 it is broken into pieces and completely written to the Field Unit, 26 lower chunks first. 27 5. If the integer (or the last piece of the integer, if broken up) 28 is smaller or equal in size to the Field Unit, then it is zero 29 extended before being written. 30 31Buffer -> Integer 32 33 If no integer object exists, a new integer is created. 34 The contents of the buffer are copied to the Integer, 35 starting with the least-significant bit 36* 6. and continuing until the buffer has been completely copied 37* 7. � up to the maximum number of bits in an Integer 38 (64 starting in ACPI 2.0). 39 40Buffer -> String 41 42 If no string object exists, a new string is created. 43* 8. The entire contents of the buffer are converted to a string 44 of two-character hexadecimal numbers, each separated by a space. 45* 9. A fatal error is generated if greater than two hundred ASCII 46 characters are created. 47 48Buffer Field -> [See Rule] 49 50* 10. If the Buffer Field is smaller than or equal to the size 51 of an Integer (in bits), it will be treated as an Integer. 52* 11. Otherwise, it will be treated as a Buffer. 53 (See the conversion rules for the Integer and Buffer data types.) 54 55Buffer Field -> Debug Object 56 57 12. Each byte is displayed as hexadecimal integer, 58 delimited by spaces and/or commas 59 60DDB Handle -> 61 62* 13. [See Rule] The object is treated as an Integer 63 (See conversion rules for the Integer data type.) 64 65Field Unit -> 66 67* 14. [See Rule] If the Field Unit is smaller than or equal to the 68 size of an Integer (in bits), it will be treated as an Integer. 69* 15. If the Field Unit is larger than the size of an Integer, it will 70 be treated as a Buffer. 71 72 The size of an Integer is indicated by the Definition Block 73 table header�s Revision field. A Revision field value less than 74 2 indicates that the size of an Integer is 32-bits. A value greater 75 than or equal to 2 signifies that the size of an Integer is 64-bits. 76 (See the conversion rules for the Integer and Buffer data types.) 77 78Field Unit -> Debug Object 79 80 16. Each byte is displayed as hexadecimal integer, 81 delimited by spaces and/or commas 82 83Integer -> Buffer 84 85* 17. If no buffer object exists, a new buffer object is created 86 based on the size of the integer (4 bytes for 32-bit integers 87 and 8 bytes for 64-bit integers). 88 89 If a buffer object already exists,�the Integer overwrites 90 the entire Buffer object. 91 18. If the integer requires more bits than the size of the Buffer, 92 then the integer is truncated before being copied to the Buffer. 93 19. If the integer contains fewer bits than the size of the buffer, 94 the Integer is zero-extended to fill the entire buffer 95 96Integer -> Buffer Field 97 98 The Integer overwrites the entire Buffer Field. 99 20. If the integer is smaller than the size of the buffer field, 100 it is zero-extended. 101 21. If the integer is larger than the size of the buffer field, 102 the upper bits are truncated. 103 104Integer -> Debug Object 105 106 22. The integer is displayed as a hexadecimal value. 107 108Integer -> Field Unit 109 110 The Integer overwrites the entire Field Unit. 111 23. If the integer is smaller than the size of the buffer field, 112 it is zero-extended. 113 24. If the integer is larger than the size of the buffer field, 114 the upper bits are truncated. 115 116Integer -> String 117 118* 25. Creates an ASCII hexadecimal string. 119 120Package -> Package 121 122 26. All existing contents (if any) of the target package are deleted, 123 and the contents of the source package are copied into the target 124 package. (In other words, overwrites the same as any other object.) 125 126Package -> Debug Object 127 128 27. Each element of the package is displayed based on its type. 129 130String -> Buffer 131 132* 28. If no buffer object exists, a new buffer object is created. 133 134 If a buffer object already exists, it is completely overwritten. 135 29. If the string is longer than the buffer, the string is truncated 136 before copying. 137 30. If the string is shorter than the buffer, the buffer size is reduced. 138 139 In either case, the string is treated as a buffer, with each ASCII 140 string character copied to one buffer byte. 141 142String -> Buffer Field 143 144 The string is treated as a buffer. 145 31. If this buffer is smaller than the size of the buffer field, 146 it is zero extended. 147 32. If the buffer is larger than the size of the buffer field, 148 the upper bits are truncated. 149 150String -> Debug Object 151 152 33. Each string character is displayed as an ASCII character 153 154String -> Field Unit 155 156 Each character of the string is written, starting with the first, 157 to the Field Unit. 158 34. If the Field Unit is less than eight bits, then the upper bits 159 of each character are lost. 160 35. If the Field Unit is greater than eight bits, then the additional 161 bits are zeroed. 162 163String -> Integer 164 165* 36. If no integer object exists, a new integer is created. 166 The ASCII string is interpreted as a hexadecimal constant. 167 Each string character is interpreted as a hexadecimal value, 168 starting with the first hexadecimal ASCII character (�0�-�9�, 169 �A�-�F�, �a�, �f�) as the most significant digit, and ends with 170 the first non-hexadecimal character or end-of-string as the least 171 significant digit. 172 173(*) - rules affecting operands (6, 7, 8, 9, 10, 11, 13, 14, 15, 17, 25, 28, 36) 174(+) - rules affecting results () 175 176