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