diff options
Diffstat (limited to 'drivers/acpi/executer/exdump.c')
-rw-r--r-- | drivers/acpi/executer/exdump.c | 744 |
1 files changed, 350 insertions, 394 deletions
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c index 4f98dceed39a..bc2fa996047e 100644 --- a/drivers/acpi/executer/exdump.c +++ b/drivers/acpi/executer/exdump.c | |||
@@ -41,7 +41,6 @@ | |||
41 | * POSSIBILITY OF SUCH DAMAGES. | 41 | * POSSIBILITY OF SUCH DAMAGES. |
42 | */ | 42 | */ |
43 | 43 | ||
44 | |||
45 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
46 | #include <acpi/acinterp.h> | 45 | #include <acpi/acinterp.h> |
47 | #include <acpi/amlcode.h> | 46 | #include <acpi/amlcode.h> |
@@ -49,46 +48,27 @@ | |||
49 | #include <acpi/acparser.h> | 48 | #include <acpi/acparser.h> |
50 | 49 | ||
51 | #define _COMPONENT ACPI_EXECUTER | 50 | #define _COMPONENT ACPI_EXECUTER |
52 | ACPI_MODULE_NAME ("exdump") | 51 | ACPI_MODULE_NAME("exdump") |
53 | 52 | ||
54 | /* | 53 | /* |
55 | * The following routines are used for debug output only | 54 | * The following routines are used for debug output only |
56 | */ | 55 | */ |
57 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) | 56 | #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) |
58 | |||
59 | /* Local prototypes */ | 57 | /* Local prototypes */ |
60 | |||
61 | #ifdef ACPI_FUTURE_USAGE | 58 | #ifdef ACPI_FUTURE_USAGE |
62 | static void | 59 | static void acpi_ex_out_string(char *title, char *value); |
63 | acpi_ex_out_string ( | ||
64 | char *title, | ||
65 | char *value); | ||
66 | 60 | ||
67 | static void | 61 | static void acpi_ex_out_pointer(char *title, void *value); |
68 | acpi_ex_out_pointer ( | ||
69 | char *title, | ||
70 | void *value); | ||
71 | 62 | ||
72 | static void | 63 | static void acpi_ex_out_integer(char *title, u32 value); |
73 | acpi_ex_out_integer ( | ||
74 | char *title, | ||
75 | u32 value); | ||
76 | 64 | ||
77 | static void | 65 | static void acpi_ex_out_address(char *title, acpi_physical_address value); |
78 | acpi_ex_out_address ( | ||
79 | char *title, | ||
80 | acpi_physical_address value); | ||
81 | 66 | ||
82 | static void | 67 | static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc); |
83 | acpi_ex_dump_reference ( | ||
84 | union acpi_operand_object *obj_desc); | ||
85 | 68 | ||
86 | static void | 69 | static void |
87 | acpi_ex_dump_package ( | 70 | acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index); |
88 | union acpi_operand_object *obj_desc, | 71 | #endif /* ACPI_FUTURE_USAGE */ |
89 | u32 level, | ||
90 | u32 index); | ||
91 | #endif /* ACPI_FUTURE_USAGE */ | ||
92 | 72 | ||
93 | /******************************************************************************* | 73 | /******************************************************************************* |
94 | * | 74 | * |
@@ -103,143 +83,140 @@ acpi_ex_dump_package ( | |||
103 | * | 83 | * |
104 | ******************************************************************************/ | 84 | ******************************************************************************/ |
105 | 85 | ||
106 | void | 86 | void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) |
107 | acpi_ex_dump_operand ( | ||
108 | union acpi_operand_object *obj_desc, | ||
109 | u32 depth) | ||
110 | { | 87 | { |
111 | u32 length; | 88 | u32 length; |
112 | u32 index; | 89 | u32 index; |
113 | |||
114 | |||
115 | ACPI_FUNCTION_NAME ("ex_dump_operand") | ||
116 | 90 | ||
91 | ACPI_FUNCTION_NAME("ex_dump_operand") | ||
117 | 92 | ||
118 | if (!((ACPI_LV_EXEC & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) { | 93 | if (! |
94 | ((ACPI_LV_EXEC & acpi_dbg_level) | ||
95 | && (_COMPONENT & acpi_dbg_layer))) { | ||
119 | return; | 96 | return; |
120 | } | 97 | } |
121 | 98 | ||
122 | if (!obj_desc) { | 99 | if (!obj_desc) { |
123 | /* This could be a null element of a package */ | 100 | /* This could be a null element of a package */ |
124 | 101 | ||
125 | ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n")); | 102 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Null Object Descriptor\n")); |
126 | return; | 103 | return; |
127 | } | 104 | } |
128 | 105 | ||
129 | if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) { | 106 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) { |
130 | ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p Namespace Node: ", obj_desc)); | 107 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%p Namespace Node: ", |
131 | ACPI_DUMP_ENTRY (obj_desc, ACPI_LV_EXEC); | 108 | obj_desc)); |
109 | ACPI_DUMP_ENTRY(obj_desc, ACPI_LV_EXEC); | ||
132 | return; | 110 | return; |
133 | } | 111 | } |
134 | 112 | ||
135 | if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) { | 113 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) { |
136 | ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, | 114 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
137 | "%p is not a node or operand object: [%s]\n", | 115 | "%p is not a node or operand object: [%s]\n", |
138 | obj_desc, acpi_ut_get_descriptor_name (obj_desc))); | 116 | obj_desc, |
139 | ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object)); | 117 | acpi_ut_get_descriptor_name(obj_desc))); |
118 | ACPI_DUMP_BUFFER(obj_desc, sizeof(union acpi_operand_object)); | ||
140 | return; | 119 | return; |
141 | } | 120 | } |
142 | 121 | ||
143 | /* obj_desc is a valid object */ | 122 | /* obj_desc is a valid object */ |
144 | 123 | ||
145 | if (depth > 0) { | 124 | if (depth > 0) { |
146 | ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ", | 125 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%*s[%u] %p ", |
147 | depth, " ", depth, obj_desc)); | 126 | depth, " ", depth, obj_desc)); |
148 | } | 127 | } else { |
149 | else { | 128 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%p ", obj_desc)); |
150 | ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", obj_desc)); | ||
151 | } | 129 | } |
152 | 130 | ||
153 | /* Decode object type */ | 131 | /* Decode object type */ |
154 | 132 | ||
155 | switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { | 133 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { |
156 | case ACPI_TYPE_LOCAL_REFERENCE: | 134 | case ACPI_TYPE_LOCAL_REFERENCE: |
157 | 135 | ||
158 | switch (obj_desc->reference.opcode) { | 136 | switch (obj_desc->reference.opcode) { |
159 | case AML_DEBUG_OP: | 137 | case AML_DEBUG_OP: |
160 | 138 | ||
161 | acpi_os_printf ("Reference: Debug\n"); | 139 | acpi_os_printf("Reference: Debug\n"); |
162 | break; | 140 | break; |
163 | 141 | ||
164 | |||
165 | case AML_NAME_OP: | 142 | case AML_NAME_OP: |
166 | 143 | ||
167 | ACPI_DUMP_PATHNAME (obj_desc->reference.object, | 144 | ACPI_DUMP_PATHNAME(obj_desc->reference.object, |
168 | "Reference: Name: ", ACPI_LV_INFO, _COMPONENT); | 145 | "Reference: Name: ", ACPI_LV_INFO, |
169 | ACPI_DUMP_ENTRY (obj_desc->reference.object, ACPI_LV_INFO); | 146 | _COMPONENT); |
147 | ACPI_DUMP_ENTRY(obj_desc->reference.object, | ||
148 | ACPI_LV_INFO); | ||
170 | break; | 149 | break; |
171 | 150 | ||
172 | |||
173 | case AML_INDEX_OP: | 151 | case AML_INDEX_OP: |
174 | 152 | ||
175 | acpi_os_printf ("Reference: Index %p\n", | 153 | acpi_os_printf("Reference: Index %p\n", |
176 | obj_desc->reference.object); | 154 | obj_desc->reference.object); |
177 | break; | 155 | break; |
178 | 156 | ||
179 | |||
180 | case AML_REF_OF_OP: | 157 | case AML_REF_OF_OP: |
181 | 158 | ||
182 | acpi_os_printf ("Reference: (ref_of) %p\n", | 159 | acpi_os_printf("Reference: (ref_of) %p\n", |
183 | obj_desc->reference.object); | 160 | obj_desc->reference.object); |
184 | break; | 161 | break; |
185 | 162 | ||
186 | |||
187 | case AML_ARG_OP: | 163 | case AML_ARG_OP: |
188 | 164 | ||
189 | acpi_os_printf ("Reference: Arg%d", | 165 | acpi_os_printf("Reference: Arg%d", |
190 | obj_desc->reference.offset); | 166 | obj_desc->reference.offset); |
191 | 167 | ||
192 | if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) { | 168 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
193 | /* Value is an Integer */ | 169 | /* Value is an Integer */ |
194 | 170 | ||
195 | acpi_os_printf (" value is [%8.8X%8.8x]", | 171 | acpi_os_printf(" value is [%8.8X%8.8x]", |
196 | ACPI_FORMAT_UINT64 (obj_desc->integer.value)); | 172 | ACPI_FORMAT_UINT64(obj_desc-> |
173 | integer. | ||
174 | value)); | ||
197 | } | 175 | } |
198 | 176 | ||
199 | acpi_os_printf ("\n"); | 177 | acpi_os_printf("\n"); |
200 | break; | 178 | break; |
201 | 179 | ||
202 | |||
203 | case AML_LOCAL_OP: | 180 | case AML_LOCAL_OP: |
204 | 181 | ||
205 | acpi_os_printf ("Reference: Local%d", | 182 | acpi_os_printf("Reference: Local%d", |
206 | obj_desc->reference.offset); | 183 | obj_desc->reference.offset); |
207 | 184 | ||
208 | if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) { | 185 | if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { |
209 | 186 | ||
210 | /* Value is an Integer */ | 187 | /* Value is an Integer */ |
211 | 188 | ||
212 | acpi_os_printf (" value is [%8.8X%8.8x]", | 189 | acpi_os_printf(" value is [%8.8X%8.8x]", |
213 | ACPI_FORMAT_UINT64 (obj_desc->integer.value)); | 190 | ACPI_FORMAT_UINT64(obj_desc-> |
191 | integer. | ||
192 | value)); | ||
214 | } | 193 | } |
215 | 194 | ||
216 | acpi_os_printf ("\n"); | 195 | acpi_os_printf("\n"); |
217 | break; | 196 | break; |
218 | 197 | ||
219 | |||
220 | case AML_INT_NAMEPATH_OP: | 198 | case AML_INT_NAMEPATH_OP: |
221 | 199 | ||
222 | acpi_os_printf ("Reference.Node->Name %X\n", | 200 | acpi_os_printf("Reference.Node->Name %X\n", |
223 | obj_desc->reference.node->name.integer); | 201 | obj_desc->reference.node->name.integer); |
224 | break; | 202 | break; |
225 | 203 | ||
226 | |||
227 | default: | 204 | default: |
228 | 205 | ||
229 | /* Unknown opcode */ | 206 | /* Unknown opcode */ |
230 | 207 | ||
231 | acpi_os_printf ("Unknown Reference opcode=%X\n", | 208 | acpi_os_printf("Unknown Reference opcode=%X\n", |
232 | obj_desc->reference.opcode); | 209 | obj_desc->reference.opcode); |
233 | break; | 210 | break; |
234 | 211 | ||
235 | } | 212 | } |
236 | break; | 213 | break; |
237 | 214 | ||
238 | |||
239 | case ACPI_TYPE_BUFFER: | 215 | case ACPI_TYPE_BUFFER: |
240 | 216 | ||
241 | acpi_os_printf ("Buffer len %X @ %p \n", | 217 | acpi_os_printf("Buffer len %X @ %p \n", |
242 | obj_desc->buffer.length, obj_desc->buffer.pointer); | 218 | obj_desc->buffer.length, |
219 | obj_desc->buffer.pointer); | ||
243 | 220 | ||
244 | length = obj_desc->buffer.length; | 221 | length = obj_desc->buffer.length; |
245 | if (length > 64) { | 222 | if (length > 64) { |
@@ -249,178 +226,166 @@ acpi_ex_dump_operand ( | |||
249 | /* Debug only -- dump the buffer contents */ | 226 | /* Debug only -- dump the buffer contents */ |
250 | 227 | ||
251 | if (obj_desc->buffer.pointer) { | 228 | if (obj_desc->buffer.pointer) { |
252 | acpi_os_printf ("Buffer Contents: "); | 229 | acpi_os_printf("Buffer Contents: "); |
253 | 230 | ||
254 | for (index = 0; index < length; index++) { | 231 | for (index = 0; index < length; index++) { |
255 | acpi_os_printf (" %02x", obj_desc->buffer.pointer[index]); | 232 | acpi_os_printf(" %02x", |
233 | obj_desc->buffer.pointer[index]); | ||
256 | } | 234 | } |
257 | acpi_os_printf ("\n"); | 235 | acpi_os_printf("\n"); |
258 | } | 236 | } |
259 | break; | 237 | break; |
260 | 238 | ||
261 | |||
262 | case ACPI_TYPE_INTEGER: | 239 | case ACPI_TYPE_INTEGER: |
263 | 240 | ||
264 | acpi_os_printf ("Integer %8.8X%8.8X\n", | 241 | acpi_os_printf("Integer %8.8X%8.8X\n", |
265 | ACPI_FORMAT_UINT64 (obj_desc->integer.value)); | 242 | ACPI_FORMAT_UINT64(obj_desc->integer.value)); |
266 | break; | 243 | break; |
267 | 244 | ||
268 | |||
269 | case ACPI_TYPE_PACKAGE: | 245 | case ACPI_TYPE_PACKAGE: |
270 | 246 | ||
271 | acpi_os_printf ("Package [Len %X] element_array %p\n", | 247 | acpi_os_printf("Package [Len %X] element_array %p\n", |
272 | obj_desc->package.count, obj_desc->package.elements); | 248 | obj_desc->package.count, |
249 | obj_desc->package.elements); | ||
273 | 250 | ||
274 | /* | 251 | /* |
275 | * If elements exist, package element pointer is valid, | 252 | * If elements exist, package element pointer is valid, |
276 | * and debug_level exceeds 1, dump package's elements. | 253 | * and debug_level exceeds 1, dump package's elements. |
277 | */ | 254 | */ |
278 | if (obj_desc->package.count && | 255 | if (obj_desc->package.count && |
279 | obj_desc->package.elements && | 256 | obj_desc->package.elements && acpi_dbg_level > 1) { |
280 | acpi_dbg_level > 1) { | 257 | for (index = 0; index < obj_desc->package.count; |
281 | for (index = 0; index < obj_desc->package.count; index++) { | 258 | index++) { |
282 | acpi_ex_dump_operand (obj_desc->package.elements[index], depth+1); | 259 | acpi_ex_dump_operand(obj_desc->package. |
260 | elements[index], | ||
261 | depth + 1); | ||
283 | } | 262 | } |
284 | } | 263 | } |
285 | break; | 264 | break; |
286 | 265 | ||
287 | |||
288 | case ACPI_TYPE_REGION: | 266 | case ACPI_TYPE_REGION: |
289 | 267 | ||
290 | acpi_os_printf ("Region %s (%X)", | 268 | acpi_os_printf("Region %s (%X)", |
291 | acpi_ut_get_region_name (obj_desc->region.space_id), | 269 | acpi_ut_get_region_name(obj_desc->region. |
292 | obj_desc->region.space_id); | 270 | space_id), |
271 | obj_desc->region.space_id); | ||
293 | 272 | ||
294 | /* | 273 | /* |
295 | * If the address and length have not been evaluated, | 274 | * If the address and length have not been evaluated, |
296 | * don't print them. | 275 | * don't print them. |
297 | */ | 276 | */ |
298 | if (!(obj_desc->region.flags & AOPOBJ_DATA_VALID)) { | 277 | if (!(obj_desc->region.flags & AOPOBJ_DATA_VALID)) { |
299 | acpi_os_printf ("\n"); | 278 | acpi_os_printf("\n"); |
300 | } | 279 | } else { |
301 | else { | 280 | acpi_os_printf(" base %8.8X%8.8X Length %X\n", |
302 | acpi_os_printf (" base %8.8X%8.8X Length %X\n", | 281 | ACPI_FORMAT_UINT64(obj_desc->region. |
303 | ACPI_FORMAT_UINT64 (obj_desc->region.address), | 282 | address), |
304 | obj_desc->region.length); | 283 | obj_desc->region.length); |
305 | } | 284 | } |
306 | break; | 285 | break; |
307 | 286 | ||
308 | |||
309 | case ACPI_TYPE_STRING: | 287 | case ACPI_TYPE_STRING: |
310 | 288 | ||
311 | acpi_os_printf ("String length %X @ %p ", | 289 | acpi_os_printf("String length %X @ %p ", |
312 | obj_desc->string.length, | 290 | obj_desc->string.length, |
313 | obj_desc->string.pointer); | 291 | obj_desc->string.pointer); |
314 | 292 | ||
315 | acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX); | 293 | acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX); |
316 | acpi_os_printf ("\n"); | 294 | acpi_os_printf("\n"); |
317 | break; | 295 | break; |
318 | 296 | ||
319 | |||
320 | case ACPI_TYPE_LOCAL_BANK_FIELD: | 297 | case ACPI_TYPE_LOCAL_BANK_FIELD: |
321 | 298 | ||
322 | acpi_os_printf ("bank_field\n"); | 299 | acpi_os_printf("bank_field\n"); |
323 | break; | 300 | break; |
324 | 301 | ||
325 | |||
326 | case ACPI_TYPE_LOCAL_REGION_FIELD: | 302 | case ACPI_TYPE_LOCAL_REGION_FIELD: |
327 | 303 | ||
328 | acpi_os_printf ( | 304 | acpi_os_printf |
329 | "region_field: Bits=%X acc_width=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", | 305 | ("region_field: Bits=%X acc_width=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n", |
330 | obj_desc->field.bit_length, | 306 | obj_desc->field.bit_length, |
331 | obj_desc->field.access_byte_width, | 307 | obj_desc->field.access_byte_width, |
332 | obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK, | 308 | obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK, |
333 | obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK, | 309 | obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK, |
334 | obj_desc->field.base_byte_offset, | 310 | obj_desc->field.base_byte_offset, |
335 | obj_desc->field.start_field_bit_offset); | 311 | obj_desc->field.start_field_bit_offset); |
336 | 312 | ||
337 | acpi_ex_dump_operand (obj_desc->field.region_obj, depth+1); | 313 | acpi_ex_dump_operand(obj_desc->field.region_obj, depth + 1); |
338 | break; | 314 | break; |
339 | 315 | ||
340 | |||
341 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | 316 | case ACPI_TYPE_LOCAL_INDEX_FIELD: |
342 | 317 | ||
343 | acpi_os_printf ("index_field\n"); | 318 | acpi_os_printf("index_field\n"); |
344 | break; | 319 | break; |
345 | 320 | ||
346 | |||
347 | case ACPI_TYPE_BUFFER_FIELD: | 321 | case ACPI_TYPE_BUFFER_FIELD: |
348 | 322 | ||
349 | acpi_os_printf ( | 323 | acpi_os_printf("buffer_field: %X bits at byte %X bit %X of \n", |
350 | "buffer_field: %X bits at byte %X bit %X of \n", | 324 | obj_desc->buffer_field.bit_length, |
351 | obj_desc->buffer_field.bit_length, | 325 | obj_desc->buffer_field.base_byte_offset, |
352 | obj_desc->buffer_field.base_byte_offset, | 326 | obj_desc->buffer_field.start_field_bit_offset); |
353 | obj_desc->buffer_field.start_field_bit_offset); | ||
354 | 327 | ||
355 | if (!obj_desc->buffer_field.buffer_obj) { | 328 | if (!obj_desc->buffer_field.buffer_obj) { |
356 | ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL* \n")); | 329 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL* \n")); |
357 | } | 330 | } else |
358 | else if (ACPI_GET_OBJECT_TYPE (obj_desc->buffer_field.buffer_obj) != | 331 | if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) |
359 | ACPI_TYPE_BUFFER) { | 332 | != ACPI_TYPE_BUFFER) { |
360 | acpi_os_printf ("*not a Buffer* \n"); | 333 | acpi_os_printf("*not a Buffer* \n"); |
361 | } | 334 | } else { |
362 | else { | 335 | acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, |
363 | acpi_ex_dump_operand (obj_desc->buffer_field.buffer_obj, depth+1); | 336 | depth + 1); |
364 | } | 337 | } |
365 | break; | 338 | break; |
366 | 339 | ||
367 | |||
368 | case ACPI_TYPE_EVENT: | 340 | case ACPI_TYPE_EVENT: |
369 | 341 | ||
370 | acpi_os_printf ("Event\n"); | 342 | acpi_os_printf("Event\n"); |
371 | break; | 343 | break; |
372 | 344 | ||
373 | |||
374 | case ACPI_TYPE_METHOD: | 345 | case ACPI_TYPE_METHOD: |
375 | 346 | ||
376 | acpi_os_printf ("Method(%X) @ %p:%X\n", | 347 | acpi_os_printf("Method(%X) @ %p:%X\n", |
377 | obj_desc->method.param_count, | 348 | obj_desc->method.param_count, |
378 | obj_desc->method.aml_start, | 349 | obj_desc->method.aml_start, |
379 | obj_desc->method.aml_length); | 350 | obj_desc->method.aml_length); |
380 | break; | 351 | break; |
381 | 352 | ||
382 | |||
383 | case ACPI_TYPE_MUTEX: | 353 | case ACPI_TYPE_MUTEX: |
384 | 354 | ||
385 | acpi_os_printf ("Mutex\n"); | 355 | acpi_os_printf("Mutex\n"); |
386 | break; | 356 | break; |
387 | 357 | ||
388 | |||
389 | case ACPI_TYPE_DEVICE: | 358 | case ACPI_TYPE_DEVICE: |
390 | 359 | ||
391 | acpi_os_printf ("Device\n"); | 360 | acpi_os_printf("Device\n"); |
392 | break; | 361 | break; |
393 | 362 | ||
394 | |||
395 | case ACPI_TYPE_POWER: | 363 | case ACPI_TYPE_POWER: |
396 | 364 | ||
397 | acpi_os_printf ("Power\n"); | 365 | acpi_os_printf("Power\n"); |
398 | break; | 366 | break; |
399 | 367 | ||
400 | |||
401 | case ACPI_TYPE_PROCESSOR: | 368 | case ACPI_TYPE_PROCESSOR: |
402 | 369 | ||
403 | acpi_os_printf ("Processor\n"); | 370 | acpi_os_printf("Processor\n"); |
404 | break; | 371 | break; |
405 | 372 | ||
406 | |||
407 | case ACPI_TYPE_THERMAL: | 373 | case ACPI_TYPE_THERMAL: |
408 | 374 | ||
409 | acpi_os_printf ("Thermal\n"); | 375 | acpi_os_printf("Thermal\n"); |
410 | break; | 376 | break; |
411 | 377 | ||
412 | |||
413 | default: | 378 | default: |
414 | /* Unknown Type */ | 379 | /* Unknown Type */ |
415 | 380 | ||
416 | acpi_os_printf ("Unknown Type %X\n", ACPI_GET_OBJECT_TYPE (obj_desc)); | 381 | acpi_os_printf("Unknown Type %X\n", |
382 | ACPI_GET_OBJECT_TYPE(obj_desc)); | ||
417 | break; | 383 | break; |
418 | } | 384 | } |
419 | 385 | ||
420 | return; | 386 | return; |
421 | } | 387 | } |
422 | 388 | ||
423 | |||
424 | /******************************************************************************* | 389 | /******************************************************************************* |
425 | * | 390 | * |
426 | * FUNCTION: acpi_ex_dump_operands | 391 | * FUNCTION: acpi_ex_dump_operands |
@@ -438,20 +403,15 @@ acpi_ex_dump_operand ( | |||
438 | ******************************************************************************/ | 403 | ******************************************************************************/ |
439 | 404 | ||
440 | void | 405 | void |
441 | acpi_ex_dump_operands ( | 406 | acpi_ex_dump_operands(union acpi_operand_object **operands, |
442 | union acpi_operand_object **operands, | 407 | acpi_interpreter_mode interpreter_mode, |
443 | acpi_interpreter_mode interpreter_mode, | 408 | char *ident, |
444 | char *ident, | 409 | u32 num_levels, |
445 | u32 num_levels, | 410 | char *note, char *module_name, u32 line_number) |
446 | char *note, | ||
447 | char *module_name, | ||
448 | u32 line_number) | ||
449 | { | 411 | { |
450 | acpi_native_uint i; | 412 | acpi_native_uint i; |
451 | |||
452 | |||
453 | ACPI_FUNCTION_NAME ("ex_dump_operands"); | ||
454 | 413 | ||
414 | ACPI_FUNCTION_NAME("ex_dump_operands"); | ||
455 | 415 | ||
456 | if (!ident) { | 416 | if (!ident) { |
457 | ident = "?"; | 417 | ident = "?"; |
@@ -461,9 +421,9 @@ acpi_ex_dump_operands ( | |||
461 | note = "?"; | 421 | note = "?"; |
462 | } | 422 | } |
463 | 423 | ||
464 | ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, | 424 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
465 | "************* Operand Stack Contents (Opcode [%s], %d Operands)\n", | 425 | "************* Operand Stack Contents (Opcode [%s], %d Operands)\n", |
466 | ident, num_levels)); | 426 | ident, num_levels)); |
467 | 427 | ||
468 | if (num_levels == 0) { | 428 | if (num_levels == 0) { |
469 | num_levels = 1; | 429 | num_levels = 1; |
@@ -472,16 +432,15 @@ acpi_ex_dump_operands ( | |||
472 | /* Dump the operand stack starting at the top */ | 432 | /* Dump the operand stack starting at the top */ |
473 | 433 | ||
474 | for (i = 0; num_levels > 0; i--, num_levels--) { | 434 | for (i = 0; num_levels > 0; i--, num_levels--) { |
475 | acpi_ex_dump_operand (operands[i], 0); | 435 | acpi_ex_dump_operand(operands[i], 0); |
476 | } | 436 | } |
477 | 437 | ||
478 | ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, | 438 | ACPI_DEBUG_PRINT((ACPI_DB_EXEC, |
479 | "************* Operand Stack dump from %s(%d), %s\n", | 439 | "************* Operand Stack dump from %s(%d), %s\n", |
480 | module_name, line_number, note)); | 440 | module_name, line_number, note)); |
481 | return; | 441 | return; |
482 | } | 442 | } |
483 | 443 | ||
484 | |||
485 | #ifdef ACPI_FUTURE_USAGE | 444 | #ifdef ACPI_FUTURE_USAGE |
486 | /******************************************************************************* | 445 | /******************************************************************************* |
487 | * | 446 | * |
@@ -496,44 +455,31 @@ acpi_ex_dump_operands ( | |||
496 | * | 455 | * |
497 | ******************************************************************************/ | 456 | ******************************************************************************/ |
498 | 457 | ||
499 | static void | 458 | static void acpi_ex_out_string(char *title, char *value) |
500 | acpi_ex_out_string ( | ||
501 | char *title, | ||
502 | char *value) | ||
503 | { | 459 | { |
504 | acpi_os_printf ("%20s : %s\n", title, value); | 460 | acpi_os_printf("%20s : %s\n", title, value); |
505 | } | 461 | } |
506 | 462 | ||
507 | static void | 463 | static void acpi_ex_out_pointer(char *title, void *value) |
508 | acpi_ex_out_pointer ( | ||
509 | char *title, | ||
510 | void *value) | ||
511 | { | 464 | { |
512 | acpi_os_printf ("%20s : %p\n", title, value); | 465 | acpi_os_printf("%20s : %p\n", title, value); |
513 | } | 466 | } |
514 | 467 | ||
515 | static void | 468 | static void acpi_ex_out_integer(char *title, u32 value) |
516 | acpi_ex_out_integer ( | ||
517 | char *title, | ||
518 | u32 value) | ||
519 | { | 469 | { |
520 | acpi_os_printf ("%20s : %.2X\n", title, value); | 470 | acpi_os_printf("%20s : %.2X\n", title, value); |
521 | } | 471 | } |
522 | 472 | ||
523 | static void | 473 | static void acpi_ex_out_address(char *title, acpi_physical_address value) |
524 | acpi_ex_out_address ( | ||
525 | char *title, | ||
526 | acpi_physical_address value) | ||
527 | { | 474 | { |
528 | 475 | ||
529 | #if ACPI_MACHINE_WIDTH == 16 | 476 | #if ACPI_MACHINE_WIDTH == 16 |
530 | acpi_os_printf ("%20s : %p\n", title, value); | 477 | acpi_os_printf("%20s : %p\n", title, value); |
531 | #else | 478 | #else |
532 | acpi_os_printf ("%20s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64 (value)); | 479 | acpi_os_printf("%20s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64(value)); |
533 | #endif | 480 | #endif |
534 | } | 481 | } |
535 | 482 | ||
536 | |||
537 | /******************************************************************************* | 483 | /******************************************************************************* |
538 | * | 484 | * |
539 | * FUNCTION: acpi_ex_dump_node | 485 | * FUNCTION: acpi_ex_dump_node |
@@ -545,33 +491,31 @@ acpi_ex_out_address ( | |||
545 | * | 491 | * |
546 | ******************************************************************************/ | 492 | ******************************************************************************/ |
547 | 493 | ||
548 | void | 494 | void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags) |
549 | acpi_ex_dump_node ( | ||
550 | struct acpi_namespace_node *node, | ||
551 | u32 flags) | ||
552 | { | 495 | { |
553 | 496 | ||
554 | ACPI_FUNCTION_ENTRY (); | 497 | ACPI_FUNCTION_ENTRY(); |
555 | |||
556 | 498 | ||
557 | if (!flags) { | 499 | if (!flags) { |
558 | if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) { | 500 | if (! |
501 | ((ACPI_LV_OBJECTS & acpi_dbg_level) | ||
502 | && (_COMPONENT & acpi_dbg_layer))) { | ||
559 | return; | 503 | return; |
560 | } | 504 | } |
561 | } | 505 | } |
562 | 506 | ||
563 | acpi_os_printf ("%20s : %4.4s\n", "Name", acpi_ut_get_node_name (node)); | 507 | acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node)); |
564 | acpi_ex_out_string ("Type", acpi_ut_get_type_name (node->type)); | 508 | acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type)); |
565 | acpi_ex_out_integer ("Flags", node->flags); | 509 | acpi_ex_out_integer("Flags", node->flags); |
566 | acpi_ex_out_integer ("Owner Id", node->owner_id); | 510 | acpi_ex_out_integer("Owner Id", node->owner_id); |
567 | acpi_ex_out_integer ("Reference Count", node->reference_count); | 511 | acpi_ex_out_integer("Reference Count", node->reference_count); |
568 | acpi_ex_out_pointer ("Attached Object", acpi_ns_get_attached_object (node)); | 512 | acpi_ex_out_pointer("Attached Object", |
569 | acpi_ex_out_pointer ("child_list", node->child); | 513 | acpi_ns_get_attached_object(node)); |
570 | acpi_ex_out_pointer ("next_peer", node->peer); | 514 | acpi_ex_out_pointer("child_list", node->child); |
571 | acpi_ex_out_pointer ("Parent", acpi_ns_get_parent_node (node)); | 515 | acpi_ex_out_pointer("next_peer", node->peer); |
516 | acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node)); | ||
572 | } | 517 | } |
573 | 518 | ||
574 | |||
575 | /******************************************************************************* | 519 | /******************************************************************************* |
576 | * | 520 | * |
577 | * FUNCTION: acpi_ex_dump_reference | 521 | * FUNCTION: acpi_ex_dump_reference |
@@ -582,32 +526,29 @@ acpi_ex_dump_node ( | |||
582 | * | 526 | * |
583 | ******************************************************************************/ | 527 | ******************************************************************************/ |
584 | 528 | ||
585 | static void | 529 | static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc) |
586 | acpi_ex_dump_reference ( | ||
587 | union acpi_operand_object *obj_desc) | ||
588 | { | 530 | { |
589 | struct acpi_buffer ret_buf; | 531 | struct acpi_buffer ret_buf; |
590 | acpi_status status; | 532 | acpi_status status; |
591 | |||
592 | 533 | ||
593 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { | 534 | if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) { |
594 | acpi_os_printf ("Named Object %p ", obj_desc->reference.node); | 535 | acpi_os_printf("Named Object %p ", obj_desc->reference.node); |
595 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; | 536 | ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER; |
596 | status = acpi_ns_handle_to_pathname (obj_desc->reference.node, &ret_buf); | 537 | status = |
597 | if (ACPI_FAILURE (status)) { | 538 | acpi_ns_handle_to_pathname(obj_desc->reference.node, |
598 | acpi_os_printf ("Could not convert name to pathname\n"); | 539 | &ret_buf); |
540 | if (ACPI_FAILURE(status)) { | ||
541 | acpi_os_printf("Could not convert name to pathname\n"); | ||
542 | } else { | ||
543 | acpi_os_printf("%s\n", (char *)ret_buf.pointer); | ||
544 | ACPI_MEM_FREE(ret_buf.pointer); | ||
599 | } | 545 | } |
600 | else { | 546 | } else if (obj_desc->reference.object) { |
601 | acpi_os_printf ("%s\n", (char *) ret_buf.pointer); | 547 | acpi_os_printf("\nReferenced Object: %p\n", |
602 | ACPI_MEM_FREE (ret_buf.pointer); | 548 | obj_desc->reference.object); |
603 | } | ||
604 | } | ||
605 | else if (obj_desc->reference.object) { | ||
606 | acpi_os_printf ("\nReferenced Object: %p\n", obj_desc->reference.object); | ||
607 | } | 549 | } |
608 | } | 550 | } |
609 | 551 | ||
610 | |||
611 | /******************************************************************************* | 552 | /******************************************************************************* |
612 | * | 553 | * |
613 | * FUNCTION: acpi_ex_dump_package | 554 | * FUNCTION: acpi_ex_dump_package |
@@ -621,92 +562,85 @@ acpi_ex_dump_reference ( | |||
621 | ******************************************************************************/ | 562 | ******************************************************************************/ |
622 | 563 | ||
623 | static void | 564 | static void |
624 | acpi_ex_dump_package ( | 565 | acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index) |
625 | union acpi_operand_object *obj_desc, | ||
626 | u32 level, | ||
627 | u32 index) | ||
628 | { | 566 | { |
629 | u32 i; | 567 | u32 i; |
630 | |||
631 | 568 | ||
632 | /* Indentation and index output */ | 569 | /* Indentation and index output */ |
633 | 570 | ||
634 | if (level > 0) { | 571 | if (level > 0) { |
635 | for (i = 0; i < level; i++) { | 572 | for (i = 0; i < level; i++) { |
636 | acpi_os_printf (" "); | 573 | acpi_os_printf(" "); |
637 | } | 574 | } |
638 | 575 | ||
639 | acpi_os_printf ("[%.2d] ", index); | 576 | acpi_os_printf("[%.2d] ", index); |
640 | } | 577 | } |
641 | 578 | ||
642 | acpi_os_printf ("%p ", obj_desc); | 579 | acpi_os_printf("%p ", obj_desc); |
643 | 580 | ||
644 | /* Null package elements are allowed */ | 581 | /* Null package elements are allowed */ |
645 | 582 | ||
646 | if (!obj_desc) { | 583 | if (!obj_desc) { |
647 | acpi_os_printf ("[Null Object]\n"); | 584 | acpi_os_printf("[Null Object]\n"); |
648 | return; | 585 | return; |
649 | } | 586 | } |
650 | 587 | ||
651 | /* Packages may only contain a few object types */ | 588 | /* Packages may only contain a few object types */ |
652 | 589 | ||
653 | switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { | 590 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { |
654 | case ACPI_TYPE_INTEGER: | 591 | case ACPI_TYPE_INTEGER: |
655 | 592 | ||
656 | acpi_os_printf ("[Integer] = %8.8X%8.8X\n", | 593 | acpi_os_printf("[Integer] = %8.8X%8.8X\n", |
657 | ACPI_FORMAT_UINT64 (obj_desc->integer.value)); | 594 | ACPI_FORMAT_UINT64(obj_desc->integer.value)); |
658 | break; | 595 | break; |
659 | 596 | ||
660 | |||
661 | case ACPI_TYPE_STRING: | 597 | case ACPI_TYPE_STRING: |
662 | 598 | ||
663 | acpi_os_printf ("[String] Value: "); | 599 | acpi_os_printf("[String] Value: "); |
664 | for (i = 0; i < obj_desc->string.length; i++) { | 600 | for (i = 0; i < obj_desc->string.length; i++) { |
665 | acpi_os_printf ("%c", obj_desc->string.pointer[i]); | 601 | acpi_os_printf("%c", obj_desc->string.pointer[i]); |
666 | } | 602 | } |
667 | acpi_os_printf ("\n"); | 603 | acpi_os_printf("\n"); |
668 | break; | 604 | break; |
669 | 605 | ||
670 | |||
671 | case ACPI_TYPE_BUFFER: | 606 | case ACPI_TYPE_BUFFER: |
672 | 607 | ||
673 | acpi_os_printf ("[Buffer] Length %.2X = ", obj_desc->buffer.length); | 608 | acpi_os_printf("[Buffer] Length %.2X = ", |
609 | obj_desc->buffer.length); | ||
674 | if (obj_desc->buffer.length) { | 610 | if (obj_desc->buffer.length) { |
675 | acpi_ut_dump_buffer ((u8 *) obj_desc->buffer.pointer, | 611 | acpi_ut_dump_buffer((u8 *) obj_desc->buffer.pointer, |
676 | obj_desc->buffer.length, DB_DWORD_DISPLAY, _COMPONENT); | 612 | obj_desc->buffer.length, |
677 | } | 613 | DB_DWORD_DISPLAY, _COMPONENT); |
678 | else { | 614 | } else { |
679 | acpi_os_printf ("\n"); | 615 | acpi_os_printf("\n"); |
680 | } | 616 | } |
681 | break; | 617 | break; |
682 | 618 | ||
683 | |||
684 | case ACPI_TYPE_PACKAGE: | 619 | case ACPI_TYPE_PACKAGE: |
685 | 620 | ||
686 | acpi_os_printf ("[Package] Contains %d Elements: \n", | 621 | acpi_os_printf("[Package] Contains %d Elements: \n", |
687 | obj_desc->package.count); | 622 | obj_desc->package.count); |
688 | 623 | ||
689 | for (i = 0; i < obj_desc->package.count; i++) { | 624 | for (i = 0; i < obj_desc->package.count; i++) { |
690 | acpi_ex_dump_package (obj_desc->package.elements[i], level+1, i); | 625 | acpi_ex_dump_package(obj_desc->package.elements[i], |
626 | level + 1, i); | ||
691 | } | 627 | } |
692 | break; | 628 | break; |
693 | 629 | ||
694 | |||
695 | case ACPI_TYPE_LOCAL_REFERENCE: | 630 | case ACPI_TYPE_LOCAL_REFERENCE: |
696 | 631 | ||
697 | acpi_os_printf ("[Object Reference] "); | 632 | acpi_os_printf("[Object Reference] "); |
698 | acpi_ex_dump_reference (obj_desc); | 633 | acpi_ex_dump_reference(obj_desc); |
699 | break; | 634 | break; |
700 | 635 | ||
701 | |||
702 | default: | 636 | default: |
703 | 637 | ||
704 | acpi_os_printf ("[Unknown Type] %X\n", ACPI_GET_OBJECT_TYPE (obj_desc)); | 638 | acpi_os_printf("[Unknown Type] %X\n", |
639 | ACPI_GET_OBJECT_TYPE(obj_desc)); | ||
705 | break; | 640 | break; |
706 | } | 641 | } |
707 | } | 642 | } |
708 | 643 | ||
709 | |||
710 | /******************************************************************************* | 644 | /******************************************************************************* |
711 | * | 645 | * |
712 | * FUNCTION: acpi_ex_dump_object_descriptor | 646 | * FUNCTION: acpi_ex_dump_object_descriptor |
@@ -719,190 +653,213 @@ acpi_ex_dump_package ( | |||
719 | ******************************************************************************/ | 653 | ******************************************************************************/ |
720 | 654 | ||
721 | void | 655 | void |
722 | acpi_ex_dump_object_descriptor ( | 656 | acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) |
723 | union acpi_operand_object *obj_desc, | ||
724 | u32 flags) | ||
725 | { | 657 | { |
726 | ACPI_FUNCTION_TRACE ("ex_dump_object_descriptor"); | 658 | ACPI_FUNCTION_TRACE("ex_dump_object_descriptor"); |
727 | |||
728 | 659 | ||
729 | if (!obj_desc) { | 660 | if (!obj_desc) { |
730 | return_VOID; | 661 | return_VOID; |
731 | } | 662 | } |
732 | 663 | ||
733 | if (!flags) { | 664 | if (!flags) { |
734 | if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) { | 665 | if (! |
666 | ((ACPI_LV_OBJECTS & acpi_dbg_level) | ||
667 | && (_COMPONENT & acpi_dbg_layer))) { | ||
735 | return_VOID; | 668 | return_VOID; |
736 | } | 669 | } |
737 | } | 670 | } |
738 | 671 | ||
739 | if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) { | 672 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) { |
740 | acpi_ex_dump_node ((struct acpi_namespace_node *) obj_desc, flags); | 673 | acpi_ex_dump_node((struct acpi_namespace_node *)obj_desc, |
741 | acpi_os_printf ("\nAttached Object (%p):\n", | 674 | flags); |
742 | ((struct acpi_namespace_node *) obj_desc)->object); | 675 | acpi_os_printf("\nAttached Object (%p):\n", |
743 | acpi_ex_dump_object_descriptor ( | 676 | ((struct acpi_namespace_node *)obj_desc)-> |
744 | ((struct acpi_namespace_node *) obj_desc)->object, flags); | 677 | object); |
678 | acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *) | ||
679 | obj_desc)->object, flags); | ||
745 | return_VOID; | 680 | return_VOID; |
746 | } | 681 | } |
747 | 682 | ||
748 | if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) { | 683 | if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) { |
749 | acpi_os_printf ( | 684 | acpi_os_printf |
750 | "ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n", | 685 | ("ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n", |
751 | obj_desc, acpi_ut_get_descriptor_name (obj_desc)); | 686 | obj_desc, acpi_ut_get_descriptor_name(obj_desc)); |
752 | return_VOID; | 687 | return_VOID; |
753 | } | 688 | } |
754 | 689 | ||
755 | /* Common Fields */ | 690 | /* Common Fields */ |
756 | 691 | ||
757 | acpi_ex_out_string ("Type", acpi_ut_get_object_type_name (obj_desc)); | 692 | acpi_ex_out_string("Type", acpi_ut_get_object_type_name(obj_desc)); |
758 | acpi_ex_out_integer ("Reference Count", obj_desc->common.reference_count); | 693 | acpi_ex_out_integer("Reference Count", |
759 | acpi_ex_out_integer ("Flags", obj_desc->common.flags); | 694 | obj_desc->common.reference_count); |
695 | acpi_ex_out_integer("Flags", obj_desc->common.flags); | ||
760 | 696 | ||
761 | /* Object-specific Fields */ | 697 | /* Object-specific Fields */ |
762 | 698 | ||
763 | switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { | 699 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { |
764 | case ACPI_TYPE_INTEGER: | 700 | case ACPI_TYPE_INTEGER: |
765 | 701 | ||
766 | acpi_os_printf ("%20s : %8.8X%8.8X\n", "Value", | 702 | acpi_os_printf("%20s : %8.8X%8.8X\n", "Value", |
767 | ACPI_FORMAT_UINT64 (obj_desc->integer.value)); | 703 | ACPI_FORMAT_UINT64(obj_desc->integer.value)); |
768 | break; | 704 | break; |
769 | 705 | ||
770 | |||
771 | case ACPI_TYPE_STRING: | 706 | case ACPI_TYPE_STRING: |
772 | 707 | ||
773 | acpi_ex_out_integer ("Length", obj_desc->string.length); | 708 | acpi_ex_out_integer("Length", obj_desc->string.length); |
774 | 709 | ||
775 | acpi_os_printf ("%20s : %p ", "Pointer", obj_desc->string.pointer); | 710 | acpi_os_printf("%20s : %p ", "Pointer", |
776 | acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX); | 711 | obj_desc->string.pointer); |
777 | acpi_os_printf ("\n"); | 712 | acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX); |
713 | acpi_os_printf("\n"); | ||
778 | break; | 714 | break; |
779 | 715 | ||
780 | |||
781 | case ACPI_TYPE_BUFFER: | 716 | case ACPI_TYPE_BUFFER: |
782 | 717 | ||
783 | acpi_ex_out_integer ("Length", obj_desc->buffer.length); | 718 | acpi_ex_out_integer("Length", obj_desc->buffer.length); |
784 | acpi_ex_out_pointer ("Pointer", obj_desc->buffer.pointer); | 719 | acpi_ex_out_pointer("Pointer", obj_desc->buffer.pointer); |
785 | ACPI_DUMP_BUFFER (obj_desc->buffer.pointer, obj_desc->buffer.length); | 720 | ACPI_DUMP_BUFFER(obj_desc->buffer.pointer, |
721 | obj_desc->buffer.length); | ||
786 | break; | 722 | break; |
787 | 723 | ||
788 | |||
789 | case ACPI_TYPE_PACKAGE: | 724 | case ACPI_TYPE_PACKAGE: |
790 | 725 | ||
791 | acpi_ex_out_integer ("Flags", obj_desc->package.flags); | 726 | acpi_ex_out_integer("Flags", obj_desc->package.flags); |
792 | acpi_ex_out_integer ("Elements", obj_desc->package.count); | 727 | acpi_ex_out_integer("Elements", obj_desc->package.count); |
793 | acpi_ex_out_pointer ("Element List", obj_desc->package.elements); | 728 | acpi_ex_out_pointer("Element List", obj_desc->package.elements); |
794 | 729 | ||
795 | /* Dump the package contents */ | 730 | /* Dump the package contents */ |
796 | 731 | ||
797 | acpi_os_printf ("\nPackage Contents:\n"); | 732 | acpi_os_printf("\nPackage Contents:\n"); |
798 | acpi_ex_dump_package (obj_desc, 0, 0); | 733 | acpi_ex_dump_package(obj_desc, 0, 0); |
799 | break; | 734 | break; |
800 | 735 | ||
801 | |||
802 | case ACPI_TYPE_DEVICE: | 736 | case ACPI_TYPE_DEVICE: |
803 | 737 | ||
804 | acpi_ex_out_pointer ("Handler", obj_desc->device.handler); | 738 | acpi_ex_out_pointer("Handler", obj_desc->device.handler); |
805 | acpi_ex_out_pointer ("system_notify", obj_desc->device.system_notify); | 739 | acpi_ex_out_pointer("system_notify", |
806 | acpi_ex_out_pointer ("device_notify", obj_desc->device.device_notify); | 740 | obj_desc->device.system_notify); |
741 | acpi_ex_out_pointer("device_notify", | ||
742 | obj_desc->device.device_notify); | ||
807 | break; | 743 | break; |
808 | 744 | ||
809 | |||
810 | case ACPI_TYPE_EVENT: | 745 | case ACPI_TYPE_EVENT: |
811 | 746 | ||
812 | acpi_ex_out_pointer ("Semaphore", obj_desc->event.semaphore); | 747 | acpi_ex_out_pointer("Semaphore", obj_desc->event.semaphore); |
813 | break; | 748 | break; |
814 | 749 | ||
815 | |||
816 | case ACPI_TYPE_METHOD: | 750 | case ACPI_TYPE_METHOD: |
817 | 751 | ||
818 | acpi_ex_out_integer ("param_count", obj_desc->method.param_count); | 752 | acpi_ex_out_integer("param_count", |
819 | acpi_ex_out_integer ("Concurrency", obj_desc->method.concurrency); | 753 | obj_desc->method.param_count); |
820 | acpi_ex_out_pointer ("Semaphore", obj_desc->method.semaphore); | 754 | acpi_ex_out_integer("Concurrency", |
821 | acpi_ex_out_integer ("owner_id", obj_desc->method.owner_id); | 755 | obj_desc->method.concurrency); |
822 | acpi_ex_out_integer ("aml_length", obj_desc->method.aml_length); | 756 | acpi_ex_out_pointer("Semaphore", obj_desc->method.semaphore); |
823 | acpi_ex_out_pointer ("aml_start", obj_desc->method.aml_start); | 757 | acpi_ex_out_integer("owner_id", obj_desc->method.owner_id); |
758 | acpi_ex_out_integer("aml_length", obj_desc->method.aml_length); | ||
759 | acpi_ex_out_pointer("aml_start", obj_desc->method.aml_start); | ||
824 | break; | 760 | break; |
825 | 761 | ||
826 | |||
827 | case ACPI_TYPE_MUTEX: | 762 | case ACPI_TYPE_MUTEX: |
828 | 763 | ||
829 | acpi_ex_out_integer ("sync_level", obj_desc->mutex.sync_level); | 764 | acpi_ex_out_integer("sync_level", obj_desc->mutex.sync_level); |
830 | acpi_ex_out_pointer ("owner_thread", obj_desc->mutex.owner_thread); | 765 | acpi_ex_out_pointer("owner_thread", |
831 | acpi_ex_out_integer ("acquire_depth", obj_desc->mutex.acquisition_depth); | 766 | obj_desc->mutex.owner_thread); |
832 | acpi_ex_out_pointer ("Semaphore", obj_desc->mutex.semaphore); | 767 | acpi_ex_out_integer("acquire_depth", |
768 | obj_desc->mutex.acquisition_depth); | ||
769 | acpi_ex_out_pointer("Semaphore", obj_desc->mutex.semaphore); | ||
833 | break; | 770 | break; |
834 | 771 | ||
835 | |||
836 | case ACPI_TYPE_REGION: | 772 | case ACPI_TYPE_REGION: |
837 | 773 | ||
838 | acpi_ex_out_integer ("space_id", obj_desc->region.space_id); | 774 | acpi_ex_out_integer("space_id", obj_desc->region.space_id); |
839 | acpi_ex_out_integer ("Flags", obj_desc->region.flags); | 775 | acpi_ex_out_integer("Flags", obj_desc->region.flags); |
840 | acpi_ex_out_address ("Address", obj_desc->region.address); | 776 | acpi_ex_out_address("Address", obj_desc->region.address); |
841 | acpi_ex_out_integer ("Length", obj_desc->region.length); | 777 | acpi_ex_out_integer("Length", obj_desc->region.length); |
842 | acpi_ex_out_pointer ("Handler", obj_desc->region.handler); | 778 | acpi_ex_out_pointer("Handler", obj_desc->region.handler); |
843 | acpi_ex_out_pointer ("Next", obj_desc->region.next); | 779 | acpi_ex_out_pointer("Next", obj_desc->region.next); |
844 | break; | 780 | break; |
845 | 781 | ||
846 | |||
847 | case ACPI_TYPE_POWER: | 782 | case ACPI_TYPE_POWER: |
848 | 783 | ||
849 | acpi_ex_out_integer ("system_level", obj_desc->power_resource.system_level); | 784 | acpi_ex_out_integer("system_level", |
850 | acpi_ex_out_integer ("resource_order", obj_desc->power_resource.resource_order); | 785 | obj_desc->power_resource.system_level); |
851 | acpi_ex_out_pointer ("system_notify", obj_desc->power_resource.system_notify); | 786 | acpi_ex_out_integer("resource_order", |
852 | acpi_ex_out_pointer ("device_notify", obj_desc->power_resource.device_notify); | 787 | obj_desc->power_resource.resource_order); |
788 | acpi_ex_out_pointer("system_notify", | ||
789 | obj_desc->power_resource.system_notify); | ||
790 | acpi_ex_out_pointer("device_notify", | ||
791 | obj_desc->power_resource.device_notify); | ||
853 | break; | 792 | break; |
854 | 793 | ||
855 | |||
856 | case ACPI_TYPE_PROCESSOR: | 794 | case ACPI_TYPE_PROCESSOR: |
857 | 795 | ||
858 | acpi_ex_out_integer ("Processor ID", obj_desc->processor.proc_id); | 796 | acpi_ex_out_integer("Processor ID", |
859 | acpi_ex_out_integer ("Length", obj_desc->processor.length); | 797 | obj_desc->processor.proc_id); |
860 | acpi_ex_out_address ("Address", (acpi_physical_address) obj_desc->processor.address); | 798 | acpi_ex_out_integer("Length", obj_desc->processor.length); |
861 | acpi_ex_out_pointer ("system_notify", obj_desc->processor.system_notify); | 799 | acpi_ex_out_address("Address", |
862 | acpi_ex_out_pointer ("device_notify", obj_desc->processor.device_notify); | 800 | (acpi_physical_address) obj_desc->processor. |
863 | acpi_ex_out_pointer ("Handler", obj_desc->processor.handler); | 801 | address); |
802 | acpi_ex_out_pointer("system_notify", | ||
803 | obj_desc->processor.system_notify); | ||
804 | acpi_ex_out_pointer("device_notify", | ||
805 | obj_desc->processor.device_notify); | ||
806 | acpi_ex_out_pointer("Handler", obj_desc->processor.handler); | ||
864 | break; | 807 | break; |
865 | 808 | ||
866 | |||
867 | case ACPI_TYPE_THERMAL: | 809 | case ACPI_TYPE_THERMAL: |
868 | 810 | ||
869 | acpi_ex_out_pointer ("system_notify", obj_desc->thermal_zone.system_notify); | 811 | acpi_ex_out_pointer("system_notify", |
870 | acpi_ex_out_pointer ("device_notify", obj_desc->thermal_zone.device_notify); | 812 | obj_desc->thermal_zone.system_notify); |
871 | acpi_ex_out_pointer ("Handler", obj_desc->thermal_zone.handler); | 813 | acpi_ex_out_pointer("device_notify", |
814 | obj_desc->thermal_zone.device_notify); | ||
815 | acpi_ex_out_pointer("Handler", obj_desc->thermal_zone.handler); | ||
872 | break; | 816 | break; |
873 | 817 | ||
874 | |||
875 | case ACPI_TYPE_BUFFER_FIELD: | 818 | case ACPI_TYPE_BUFFER_FIELD: |
876 | case ACPI_TYPE_LOCAL_REGION_FIELD: | 819 | case ACPI_TYPE_LOCAL_REGION_FIELD: |
877 | case ACPI_TYPE_LOCAL_BANK_FIELD: | 820 | case ACPI_TYPE_LOCAL_BANK_FIELD: |
878 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | 821 | case ACPI_TYPE_LOCAL_INDEX_FIELD: |
879 | 822 | ||
880 | acpi_ex_out_integer ("field_flags", obj_desc->common_field.field_flags); | 823 | acpi_ex_out_integer("field_flags", |
881 | acpi_ex_out_integer ("access_byte_width",obj_desc->common_field.access_byte_width); | 824 | obj_desc->common_field.field_flags); |
882 | acpi_ex_out_integer ("bit_length", obj_desc->common_field.bit_length); | 825 | acpi_ex_out_integer("access_byte_width", |
883 | acpi_ex_out_integer ("fld_bit_offset", obj_desc->common_field.start_field_bit_offset); | 826 | obj_desc->common_field.access_byte_width); |
884 | acpi_ex_out_integer ("base_byte_offset", obj_desc->common_field.base_byte_offset); | 827 | acpi_ex_out_integer("bit_length", |
885 | acpi_ex_out_pointer ("parent_node", obj_desc->common_field.node); | 828 | obj_desc->common_field.bit_length); |
886 | 829 | acpi_ex_out_integer("fld_bit_offset", | |
887 | switch (ACPI_GET_OBJECT_TYPE (obj_desc)) { | 830 | obj_desc->common_field. |
831 | start_field_bit_offset); | ||
832 | acpi_ex_out_integer("base_byte_offset", | ||
833 | obj_desc->common_field.base_byte_offset); | ||
834 | acpi_ex_out_pointer("parent_node", obj_desc->common_field.node); | ||
835 | |||
836 | switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { | ||
888 | case ACPI_TYPE_BUFFER_FIELD: | 837 | case ACPI_TYPE_BUFFER_FIELD: |
889 | acpi_ex_out_pointer ("buffer_obj", obj_desc->buffer_field.buffer_obj); | 838 | acpi_ex_out_pointer("buffer_obj", |
839 | obj_desc->buffer_field.buffer_obj); | ||
890 | break; | 840 | break; |
891 | 841 | ||
892 | case ACPI_TYPE_LOCAL_REGION_FIELD: | 842 | case ACPI_TYPE_LOCAL_REGION_FIELD: |
893 | acpi_ex_out_pointer ("region_obj", obj_desc->field.region_obj); | 843 | acpi_ex_out_pointer("region_obj", |
844 | obj_desc->field.region_obj); | ||
894 | break; | 845 | break; |
895 | 846 | ||
896 | case ACPI_TYPE_LOCAL_BANK_FIELD: | 847 | case ACPI_TYPE_LOCAL_BANK_FIELD: |
897 | acpi_ex_out_integer ("Value", obj_desc->bank_field.value); | 848 | acpi_ex_out_integer("Value", |
898 | acpi_ex_out_pointer ("region_obj", obj_desc->bank_field.region_obj); | 849 | obj_desc->bank_field.value); |
899 | acpi_ex_out_pointer ("bank_obj", obj_desc->bank_field.bank_obj); | 850 | acpi_ex_out_pointer("region_obj", |
851 | obj_desc->bank_field.region_obj); | ||
852 | acpi_ex_out_pointer("bank_obj", | ||
853 | obj_desc->bank_field.bank_obj); | ||
900 | break; | 854 | break; |
901 | 855 | ||
902 | case ACPI_TYPE_LOCAL_INDEX_FIELD: | 856 | case ACPI_TYPE_LOCAL_INDEX_FIELD: |
903 | acpi_ex_out_integer ("Value", obj_desc->index_field.value); | 857 | acpi_ex_out_integer("Value", |
904 | acpi_ex_out_pointer ("Index", obj_desc->index_field.index_obj); | 858 | obj_desc->index_field.value); |
905 | acpi_ex_out_pointer ("Data", obj_desc->index_field.data_obj); | 859 | acpi_ex_out_pointer("Index", |
860 | obj_desc->index_field.index_obj); | ||
861 | acpi_ex_out_pointer("Data", | ||
862 | obj_desc->index_field.data_obj); | ||
906 | break; | 863 | break; |
907 | 864 | ||
908 | default: | 865 | default: |
@@ -911,53 +868,52 @@ acpi_ex_dump_object_descriptor ( | |||
911 | } | 868 | } |
912 | break; | 869 | break; |
913 | 870 | ||
914 | |||
915 | case ACPI_TYPE_LOCAL_REFERENCE: | 871 | case ACPI_TYPE_LOCAL_REFERENCE: |
916 | 872 | ||
917 | acpi_ex_out_integer ("target_type", obj_desc->reference.target_type); | 873 | acpi_ex_out_integer("target_type", |
918 | acpi_ex_out_string ("Opcode", (acpi_ps_get_opcode_info ( | 874 | obj_desc->reference.target_type); |
919 | obj_desc->reference.opcode))->name); | 875 | acpi_ex_out_string("Opcode", |
920 | acpi_ex_out_integer ("Offset", obj_desc->reference.offset); | 876 | (acpi_ps_get_opcode_info |
921 | acpi_ex_out_pointer ("obj_desc", obj_desc->reference.object); | 877 | (obj_desc->reference.opcode))->name); |
922 | acpi_ex_out_pointer ("Node", obj_desc->reference.node); | 878 | acpi_ex_out_integer("Offset", obj_desc->reference.offset); |
923 | acpi_ex_out_pointer ("Where", obj_desc->reference.where); | 879 | acpi_ex_out_pointer("obj_desc", obj_desc->reference.object); |
880 | acpi_ex_out_pointer("Node", obj_desc->reference.node); | ||
881 | acpi_ex_out_pointer("Where", obj_desc->reference.where); | ||
924 | 882 | ||
925 | acpi_ex_dump_reference (obj_desc); | 883 | acpi_ex_dump_reference(obj_desc); |
926 | break; | 884 | break; |
927 | 885 | ||
928 | |||
929 | case ACPI_TYPE_LOCAL_ADDRESS_HANDLER: | 886 | case ACPI_TYPE_LOCAL_ADDRESS_HANDLER: |
930 | 887 | ||
931 | acpi_ex_out_integer ("space_id", obj_desc->address_space.space_id); | 888 | acpi_ex_out_integer("space_id", |
932 | acpi_ex_out_pointer ("Next", obj_desc->address_space.next); | 889 | obj_desc->address_space.space_id); |
933 | acpi_ex_out_pointer ("region_list", obj_desc->address_space.region_list); | 890 | acpi_ex_out_pointer("Next", obj_desc->address_space.next); |
934 | acpi_ex_out_pointer ("Node", obj_desc->address_space.node); | 891 | acpi_ex_out_pointer("region_list", |
935 | acpi_ex_out_pointer ("Context", obj_desc->address_space.context); | 892 | obj_desc->address_space.region_list); |
893 | acpi_ex_out_pointer("Node", obj_desc->address_space.node); | ||
894 | acpi_ex_out_pointer("Context", obj_desc->address_space.context); | ||
936 | break; | 895 | break; |
937 | 896 | ||
938 | |||
939 | case ACPI_TYPE_LOCAL_NOTIFY: | 897 | case ACPI_TYPE_LOCAL_NOTIFY: |
940 | 898 | ||
941 | acpi_ex_out_pointer ("Node", obj_desc->notify.node); | 899 | acpi_ex_out_pointer("Node", obj_desc->notify.node); |
942 | acpi_ex_out_pointer ("Context", obj_desc->notify.context); | 900 | acpi_ex_out_pointer("Context", obj_desc->notify.context); |
943 | break; | 901 | break; |
944 | 902 | ||
945 | |||
946 | case ACPI_TYPE_LOCAL_ALIAS: | 903 | case ACPI_TYPE_LOCAL_ALIAS: |
947 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: | 904 | case ACPI_TYPE_LOCAL_METHOD_ALIAS: |
948 | case ACPI_TYPE_LOCAL_EXTRA: | 905 | case ACPI_TYPE_LOCAL_EXTRA: |
949 | case ACPI_TYPE_LOCAL_DATA: | 906 | case ACPI_TYPE_LOCAL_DATA: |
950 | default: | 907 | default: |
951 | 908 | ||
952 | acpi_os_printf ( | 909 | acpi_os_printf |
953 | "ex_dump_object_descriptor: Display not implemented for object type %s\n", | 910 | ("ex_dump_object_descriptor: Display not implemented for object type %s\n", |
954 | acpi_ut_get_object_type_name (obj_desc)); | 911 | acpi_ut_get_object_type_name(obj_desc)); |
955 | break; | 912 | break; |
956 | } | 913 | } |
957 | 914 | ||
958 | return_VOID; | 915 | return_VOID; |
959 | } | 916 | } |
960 | 917 | ||
961 | #endif /* ACPI_FUTURE_USAGE */ | 918 | #endif /* ACPI_FUTURE_USAGE */ |
962 | #endif | 919 | #endif |
963 | |||