Merge branch 'for-linus' from kernel.org:/.../shaggy/jfs-2.6 manually
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / acpi / executer / exdump.c
1 /******************************************************************************
2 *
3 * Module Name: exdump - Interpreter debug output routines
4 *
5 *****************************************************************************/
6
7 /*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44 #include <acpi/acpi.h>
45 #include <acpi/acinterp.h>
46 #include <acpi/amlcode.h>
47 #include <acpi/acnamesp.h>
48 #include <acpi/acparser.h>
49
50 #define _COMPONENT ACPI_EXECUTER
51 ACPI_MODULE_NAME("exdump")
52
53 /*
54 * The following routines are used for debug output only
55 */
56 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
57 /* Local prototypes */
58 #ifdef ACPI_FUTURE_USAGE
59 static void acpi_ex_out_string(char *title, char *value);
60
61 static void acpi_ex_out_pointer(char *title, void *value);
62
63 static void acpi_ex_out_integer(char *title, u32 value);
64
65 static void acpi_ex_out_address(char *title, acpi_physical_address value);
66
67 static void acpi_ex_dump_reference(union acpi_operand_object *obj_desc);
68
69 static void
70 acpi_ex_dump_package(union acpi_operand_object *obj_desc, u32 level, u32 index);
71 #endif /* ACPI_FUTURE_USAGE */
72
73 /*******************************************************************************
74 *
75 * FUNCTION: acpi_ex_dump_operand
76 *
77 * PARAMETERS: *obj_desc - Pointer to entry to be dumped
78 * Depth - Current nesting depth
79 *
80 * RETURN: None
81 *
82 * DESCRIPTION: Dump an operand object
83 *
84 ******************************************************************************/
85
86 void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
87 {
88 u32 length;
89 u32 index;
90
91 ACPI_FUNCTION_NAME("ex_dump_operand")
92
93 if (!
94 ((ACPI_LV_EXEC & acpi_dbg_level)
95 && (_COMPONENT & acpi_dbg_layer))) {
96 return;
97 }
98
99 if (!obj_desc) {
100 /* This could be a null element of a package */
101
102 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Null Object Descriptor\n"));
103 return;
104 }
105
106 if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) {
107 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%p Namespace Node: ",
108 obj_desc));
109 ACPI_DUMP_ENTRY(obj_desc, ACPI_LV_EXEC);
110 return;
111 }
112
113 if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) {
114 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
115 "%p is not a node or operand object: [%s]\n",
116 obj_desc,
117 acpi_ut_get_descriptor_name(obj_desc)));
118 ACPI_DUMP_BUFFER(obj_desc, sizeof(union acpi_operand_object));
119 return;
120 }
121
122 /* obj_desc is a valid object */
123
124 if (depth > 0) {
125 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%*s[%u] %p ",
126 depth, " ", depth, obj_desc));
127 } else {
128 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%p ", obj_desc));
129 }
130
131 /* Decode object type */
132
133 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
134 case ACPI_TYPE_LOCAL_REFERENCE:
135
136 switch (obj_desc->reference.opcode) {
137 case AML_DEBUG_OP:
138
139 acpi_os_printf("Reference: Debug\n");
140 break;
141
142 case AML_NAME_OP:
143
144 ACPI_DUMP_PATHNAME(obj_desc->reference.object,
145 "Reference: Name: ", ACPI_LV_INFO,
146 _COMPONENT);
147 ACPI_DUMP_ENTRY(obj_desc->reference.object,
148 ACPI_LV_INFO);
149 break;
150
151 case AML_INDEX_OP:
152
153 acpi_os_printf("Reference: Index %p\n",
154 obj_desc->reference.object);
155 break;
156
157 case AML_REF_OF_OP:
158
159 acpi_os_printf("Reference: (ref_of) %p\n",
160 obj_desc->reference.object);
161 break;
162
163 case AML_ARG_OP:
164
165 acpi_os_printf("Reference: Arg%d",
166 obj_desc->reference.offset);
167
168 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
169 /* Value is an Integer */
170
171 acpi_os_printf(" value is [%8.8X%8.8x]",
172 ACPI_FORMAT_UINT64(obj_desc->
173 integer.
174 value));
175 }
176
177 acpi_os_printf("\n");
178 break;
179
180 case AML_LOCAL_OP:
181
182 acpi_os_printf("Reference: Local%d",
183 obj_desc->reference.offset);
184
185 if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) {
186
187 /* Value is an Integer */
188
189 acpi_os_printf(" value is [%8.8X%8.8x]",
190 ACPI_FORMAT_UINT64(obj_desc->
191 integer.
192 value));
193 }
194
195 acpi_os_printf("\n");
196 break;
197
198 case AML_INT_NAMEPATH_OP:
199
200 acpi_os_printf("Reference.Node->Name %X\n",
201 obj_desc->reference.node->name.integer);
202 break;
203
204 default:
205
206 /* Unknown opcode */
207
208 acpi_os_printf("Unknown Reference opcode=%X\n",
209 obj_desc->reference.opcode);
210 break;
211
212 }
213 break;
214
215 case ACPI_TYPE_BUFFER:
216
217 acpi_os_printf("Buffer len %X @ %p \n",
218 obj_desc->buffer.length,
219 obj_desc->buffer.pointer);
220
221 length = obj_desc->buffer.length;
222 if (length > 64) {
223 length = 64;
224 }
225
226 /* Debug only -- dump the buffer contents */
227
228 if (obj_desc->buffer.pointer) {
229 acpi_os_printf("Buffer Contents: ");
230
231 for (index = 0; index < length; index++) {
232 acpi_os_printf(" %02x",
233 obj_desc->buffer.pointer[index]);
234 }
235 acpi_os_printf("\n");
236 }
237 break;
238
239 case ACPI_TYPE_INTEGER:
240
241 acpi_os_printf("Integer %8.8X%8.8X\n",
242 ACPI_FORMAT_UINT64(obj_desc->integer.value));
243 break;
244
245 case ACPI_TYPE_PACKAGE:
246
247 acpi_os_printf("Package [Len %X] element_array %p\n",
248 obj_desc->package.count,
249 obj_desc->package.elements);
250
251 /*
252 * If elements exist, package element pointer is valid,
253 * and debug_level exceeds 1, dump package's elements.
254 */
255 if (obj_desc->package.count &&
256 obj_desc->package.elements && acpi_dbg_level > 1) {
257 for (index = 0; index < obj_desc->package.count;
258 index++) {
259 acpi_ex_dump_operand(obj_desc->package.
260 elements[index],
261 depth + 1);
262 }
263 }
264 break;
265
266 case ACPI_TYPE_REGION:
267
268 acpi_os_printf("Region %s (%X)",
269 acpi_ut_get_region_name(obj_desc->region.
270 space_id),
271 obj_desc->region.space_id);
272
273 /*
274 * If the address and length have not been evaluated,
275 * don't print them.
276 */
277 if (!(obj_desc->region.flags & AOPOBJ_DATA_VALID)) {
278 acpi_os_printf("\n");
279 } else {
280 acpi_os_printf(" base %8.8X%8.8X Length %X\n",
281 ACPI_FORMAT_UINT64(obj_desc->region.
282 address),
283 obj_desc->region.length);
284 }
285 break;
286
287 case ACPI_TYPE_STRING:
288
289 acpi_os_printf("String length %X @ %p ",
290 obj_desc->string.length,
291 obj_desc->string.pointer);
292
293 acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX);
294 acpi_os_printf("\n");
295 break;
296
297 case ACPI_TYPE_LOCAL_BANK_FIELD:
298
299 acpi_os_printf("bank_field\n");
300 break;
301
302 case ACPI_TYPE_LOCAL_REGION_FIELD:
303
304 acpi_os_printf
305 ("region_field: Bits=%X acc_width=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n",
306 obj_desc->field.bit_length,
307 obj_desc->field.access_byte_width,
308 obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK,
309 obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK,
310 obj_desc->field.base_byte_offset,
311 obj_desc->field.start_field_bit_offset);
312
313 acpi_ex_dump_operand(obj_desc->field.region_obj, depth + 1);
314 break;
315
316 case ACPI_TYPE_LOCAL_INDEX_FIELD:
317
318 acpi_os_printf("index_field\n");
319 break;
320
321 case ACPI_TYPE_BUFFER_FIELD:
322
323 acpi_os_printf("buffer_field: %X bits at byte %X bit %X of \n",
324 obj_desc->buffer_field.bit_length,
325 obj_desc->buffer_field.base_byte_offset,
326 obj_desc->buffer_field.start_field_bit_offset);
327
328 if (!obj_desc->buffer_field.buffer_obj) {
329 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL* \n"));
330 } else
331 if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj)
332 != ACPI_TYPE_BUFFER) {
333 acpi_os_printf("*not a Buffer* \n");
334 } else {
335 acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj,
336 depth + 1);
337 }
338 break;
339
340 case ACPI_TYPE_EVENT:
341
342 acpi_os_printf("Event\n");
343 break;
344
345 case ACPI_TYPE_METHOD:
346
347 acpi_os_printf("Method(%X) @ %p:%X\n",
348 obj_desc->method.param_count,
349 obj_desc->method.aml_start,
350 obj_desc->method.aml_length);
351 break;
352
353 case ACPI_TYPE_MUTEX:
354
355 acpi_os_printf("Mutex\n");
356 break;
357
358 case ACPI_TYPE_DEVICE:
359
360 acpi_os_printf("Device\n");
361 break;
362
363 case ACPI_TYPE_POWER:
364
365 acpi_os_printf("Power\n");
366 break;
367
368 case ACPI_TYPE_PROCESSOR:
369
370 acpi_os_printf("Processor\n");
371 break;
372
373 case ACPI_TYPE_THERMAL:
374
375 acpi_os_printf("Thermal\n");
376 break;
377
378 default:
379 /* Unknown Type */
380
381 acpi_os_printf("Unknown Type %X\n",
382 ACPI_GET_OBJECT_TYPE(obj_desc));
383 break;
384 }
385
386 return;
387 }
388
389 /*******************************************************************************
390 *
391 * FUNCTION: acpi_ex_dump_operands
392 *
393 * PARAMETERS: Operands - Operand list
394 * interpreter_mode - Load or Exec
395 * Ident - Identification
396 * num_levels - # of stack entries to dump above line
397 * Note - Output notation
398 * module_name - Caller's module name
399 * line_number - Caller's invocation line number
400 *
401 * DESCRIPTION: Dump the object stack
402 *
403 ******************************************************************************/
404
405 void
406 acpi_ex_dump_operands(union acpi_operand_object **operands,
407 acpi_interpreter_mode interpreter_mode,
408 char *ident,
409 u32 num_levels,
410 char *note, char *module_name, u32 line_number)
411 {
412 acpi_native_uint i;
413
414 ACPI_FUNCTION_NAME("ex_dump_operands");
415
416 if (!ident) {
417 ident = "?";
418 }
419
420 if (!note) {
421 note = "?";
422 }
423
424 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
425 "************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
426 ident, num_levels));
427
428 if (num_levels == 0) {
429 num_levels = 1;
430 }
431
432 /* Dump the operand stack starting at the top */
433
434 for (i = 0; num_levels > 0; i--, num_levels--) {
435 acpi_ex_dump_operand(operands[i], 0);
436 }
437
438 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
439 "************* Operand Stack dump from %s(%d), %s\n",
440 module_name, line_number, note));
441 return;
442 }
443
444 #ifdef ACPI_FUTURE_USAGE
445 /*******************************************************************************
446 *
447 * FUNCTION: acpi_ex_out* functions
448 *
449 * PARAMETERS: Title - Descriptive text
450 * Value - Value to be displayed
451 *
452 * DESCRIPTION: Object dump output formatting functions. These functions
453 * reduce the number of format strings required and keeps them
454 * all in one place for easy modification.
455 *
456 ******************************************************************************/
457
458 static void acpi_ex_out_string(char *title, char *value)
459 {
460 acpi_os_printf("%20s : %s\n", title, value);
461 }
462
463 static void acpi_ex_out_pointer(char *title, void *value)
464 {
465 acpi_os_printf("%20s : %p\n", title, value);
466 }
467
468 static void acpi_ex_out_integer(char *title, u32 value)
469 {
470 acpi_os_printf("%20s : %.2X\n", title, value);
471 }
472
473 static void acpi_ex_out_address(char *title, acpi_physical_address value)
474 {
475
476 #if ACPI_MACHINE_WIDTH == 16
477 acpi_os_printf("%20s : %p\n", title, value);
478 #else
479 acpi_os_printf("%20s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64(value));
480 #endif
481 }
482
483 /*******************************************************************************
484 *
485 * FUNCTION: acpi_ex_dump_node
486 *
487 * PARAMETERS: *Node - Descriptor to dump
488 * Flags - Force display if TRUE
489 *
490 * DESCRIPTION: Dumps the members of the given.Node
491 *
492 ******************************************************************************/
493
494 void acpi_ex_dump_node(struct acpi_namespace_node *node, u32 flags)
495 {
496
497 ACPI_FUNCTION_ENTRY();
498
499 if (!flags) {
500 if (!
501 ((ACPI_LV_OBJECTS & acpi_dbg_level)
502 && (_COMPONENT & acpi_dbg_layer))) {
503 return;
504 }
505 }
506
507 acpi_os_printf("%20s : %4.4s\n", "Name", acpi_ut_get_node_name(node));
508 acpi_ex_out_string("Type", acpi_ut_get_type_name(node->type));
509 acpi_ex_out_integer("Flags", node->flags);
510 acpi_ex_out_integer("Owner Id", node->owner_id);
511 acpi_ex_out_integer("Reference Count", node->reference_count);
512 acpi_ex_out_pointer("Attached Object",
513 acpi_ns_get_attached_object(node));
514 acpi_ex_out_pointer("child_list", node->child);
515 acpi_ex_out_pointer("next_peer", node->peer);
516 acpi_ex_out_pointer("Parent", acpi_ns_get_parent_node(node));
517 }
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 }
643
644 /*******************************************************************************
645 *
646 * FUNCTION: acpi_ex_dump_object_descriptor
647 *
648 * PARAMETERS: Object - Descriptor to dump
649 * Flags - Force display if TRUE
650 *
651 * DESCRIPTION: Dumps the members of the object descriptor given.
652 *
653 ******************************************************************************/
654
655 void
656 acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags)
657 {
658 ACPI_FUNCTION_TRACE("ex_dump_object_descriptor");
659
660 if (!obj_desc) {
661 return_VOID;
662 }
663
664 if (!flags) {
665 if (!
666 ((ACPI_LV_OBJECTS & acpi_dbg_level)
667 && (_COMPONENT & acpi_dbg_layer))) {
668 return_VOID;
669 }
670 }
671
672 if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_NAMED) {
673 acpi_ex_dump_node((struct acpi_namespace_node *)obj_desc,
674 flags);
675 acpi_os_printf("\nAttached Object (%p):\n",
676 ((struct acpi_namespace_node *)obj_desc)->
677 object);
678 acpi_ex_dump_object_descriptor(((struct acpi_namespace_node *)
679 obj_desc)->object, flags);
680 return_VOID;
681 }
682
683 if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) {
684 acpi_os_printf
685 ("ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n",
686 obj_desc, acpi_ut_get_descriptor_name(obj_desc));
687 return_VOID;
688 }
689
690 /* Common Fields */
691
692 acpi_ex_out_string("Type", acpi_ut_get_object_type_name(obj_desc));
693 acpi_ex_out_integer("Reference Count",
694 obj_desc->common.reference_count);
695 acpi_ex_out_integer("Flags", obj_desc->common.flags);
696
697 /* Object-specific Fields */
698
699 switch (ACPI_GET_OBJECT_TYPE(obj_desc)) {
700 case ACPI_TYPE_INTEGER:
701
702 acpi_os_printf("%20s : %8.8X%8.8X\n", "Value",
703 ACPI_FORMAT_UINT64(obj_desc->integer.value));
704 break;
705
706 case ACPI_TYPE_STRING:
707
708 acpi_ex_out_integer("Length", obj_desc->string.length);
709
710 acpi_os_printf("%20s : %p ", "Pointer",
711 obj_desc->string.pointer);
712 acpi_ut_print_string(obj_desc->string.pointer, ACPI_UINT8_MAX);
713 acpi_os_printf("\n");
714 break;
715
716 case ACPI_TYPE_BUFFER:
717
718 acpi_ex_out_integer("Length", obj_desc->buffer.length);
719 acpi_ex_out_pointer("Pointer", obj_desc->buffer.pointer);
720 ACPI_DUMP_BUFFER(obj_desc->buffer.pointer,
721 obj_desc->buffer.length);
722 break;
723
724 case ACPI_TYPE_PACKAGE:
725
726 acpi_ex_out_integer("Flags", obj_desc->package.flags);
727 acpi_ex_out_integer("Elements", obj_desc->package.count);
728 acpi_ex_out_pointer("Element List", obj_desc->package.elements);
729
730 /* Dump the package contents */
731
732 acpi_os_printf("\nPackage Contents:\n");
733 acpi_ex_dump_package(obj_desc, 0, 0);
734 break;
735
736 case ACPI_TYPE_DEVICE:
737
738 acpi_ex_out_pointer("Handler", obj_desc->device.handler);
739 acpi_ex_out_pointer("system_notify",
740 obj_desc->device.system_notify);
741 acpi_ex_out_pointer("device_notify",
742 obj_desc->device.device_notify);
743 break;
744
745 case ACPI_TYPE_EVENT:
746
747 acpi_ex_out_pointer("Semaphore", obj_desc->event.semaphore);
748 break;
749
750 case ACPI_TYPE_METHOD:
751
752 acpi_ex_out_integer("param_count",
753 obj_desc->method.param_count);
754 acpi_ex_out_integer("Concurrency",
755 obj_desc->method.concurrency);
756 acpi_ex_out_pointer("Semaphore", obj_desc->method.semaphore);
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);
760 break;
761
762 case ACPI_TYPE_MUTEX:
763
764 acpi_ex_out_integer("sync_level", obj_desc->mutex.sync_level);
765 acpi_ex_out_pointer("owner_thread",
766 obj_desc->mutex.owner_thread);
767 acpi_ex_out_integer("acquire_depth",
768 obj_desc->mutex.acquisition_depth);
769 acpi_ex_out_pointer("Semaphore", obj_desc->mutex.semaphore);
770 break;
771
772 case ACPI_TYPE_REGION:
773
774 acpi_ex_out_integer("space_id", obj_desc->region.space_id);
775 acpi_ex_out_integer("Flags", obj_desc->region.flags);
776 acpi_ex_out_address("Address", obj_desc->region.address);
777 acpi_ex_out_integer("Length", obj_desc->region.length);
778 acpi_ex_out_pointer("Handler", obj_desc->region.handler);
779 acpi_ex_out_pointer("Next", obj_desc->region.next);
780 break;
781
782 case ACPI_TYPE_POWER:
783
784 acpi_ex_out_integer("system_level",
785 obj_desc->power_resource.system_level);
786 acpi_ex_out_integer("resource_order",
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);
792 break;
793
794 case ACPI_TYPE_PROCESSOR:
795
796 acpi_ex_out_integer("Processor ID",
797 obj_desc->processor.proc_id);
798 acpi_ex_out_integer("Length", obj_desc->processor.length);
799 acpi_ex_out_address("Address",
800 (acpi_physical_address) obj_desc->processor.
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);
807 break;
808
809 case ACPI_TYPE_THERMAL:
810
811 acpi_ex_out_pointer("system_notify",
812 obj_desc->thermal_zone.system_notify);
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);
816 break;
817
818 case ACPI_TYPE_BUFFER_FIELD:
819 case ACPI_TYPE_LOCAL_REGION_FIELD:
820 case ACPI_TYPE_LOCAL_BANK_FIELD:
821 case ACPI_TYPE_LOCAL_INDEX_FIELD:
822
823 acpi_ex_out_integer("field_flags",
824 obj_desc->common_field.field_flags);
825 acpi_ex_out_integer("access_byte_width",
826 obj_desc->common_field.access_byte_width);
827 acpi_ex_out_integer("bit_length",
828 obj_desc->common_field.bit_length);
829 acpi_ex_out_integer("fld_bit_offset",
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)) {
837 case ACPI_TYPE_BUFFER_FIELD:
838 acpi_ex_out_pointer("buffer_obj",
839 obj_desc->buffer_field.buffer_obj);
840 break;
841
842 case ACPI_TYPE_LOCAL_REGION_FIELD:
843 acpi_ex_out_pointer("region_obj",
844 obj_desc->field.region_obj);
845 break;
846
847 case ACPI_TYPE_LOCAL_BANK_FIELD:
848 acpi_ex_out_integer("Value",
849 obj_desc->bank_field.value);
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);
854 break;
855
856 case ACPI_TYPE_LOCAL_INDEX_FIELD:
857 acpi_ex_out_integer("Value",
858 obj_desc->index_field.value);
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);
863 break;
864
865 default:
866 /* All object types covered above */
867 break;
868 }
869 break;
870
871 case ACPI_TYPE_LOCAL_REFERENCE:
872
873 acpi_ex_out_integer("target_type",
874 obj_desc->reference.target_type);
875 acpi_ex_out_string("Opcode",
876 (acpi_ps_get_opcode_info
877 (obj_desc->reference.opcode))->name);
878 acpi_ex_out_integer("Offset", obj_desc->reference.offset);
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);
882
883 acpi_ex_dump_reference(obj_desc);
884 break;
885
886 case ACPI_TYPE_LOCAL_ADDRESS_HANDLER:
887
888 acpi_ex_out_integer("space_id",
889 obj_desc->address_space.space_id);
890 acpi_ex_out_pointer("Next", obj_desc->address_space.next);
891 acpi_ex_out_pointer("region_list",
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);
895 break;
896
897 case ACPI_TYPE_LOCAL_NOTIFY:
898
899 acpi_ex_out_pointer("Node", obj_desc->notify.node);
900 acpi_ex_out_pointer("Context", obj_desc->notify.context);
901 break;
902
903 case ACPI_TYPE_LOCAL_ALIAS:
904 case ACPI_TYPE_LOCAL_METHOD_ALIAS:
905 case ACPI_TYPE_LOCAL_EXTRA:
906 case ACPI_TYPE_LOCAL_DATA:
907 default:
908
909 acpi_os_printf
910 ("ex_dump_object_descriptor: Display not implemented for object type %s\n",
911 acpi_ut_get_object_type_name(obj_desc));
912 break;
913 }
914
915 return_VOID;
916 }
917
918 #endif /* ACPI_FUTURE_USAGE */
919 #endif