[ACPI] ACPICA 20050729 from Bob Moore
[linux-2.6.22.y-op.git] / drivers / acpi / executer / exdump.c
blob4f98dceed39a620a9d6527a7d060488b73ac342c
1 /******************************************************************************
3 * Module Name: exdump - Interpreter debug output routines
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
9 * All rights reserved.
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.
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.
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.
45 #include <acpi/acpi.h>
46 #include <acpi/acinterp.h>
47 #include <acpi/amlcode.h>
48 #include <acpi/acnamesp.h>
49 #include <acpi/acparser.h>
51 #define _COMPONENT ACPI_EXECUTER
52 ACPI_MODULE_NAME ("exdump")
55 * The following routines are used for debug output only
57 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
59 /* Local prototypes */
61 #ifdef ACPI_FUTURE_USAGE
62 static void
63 acpi_ex_out_string (
64 char *title,
65 char *value);
67 static void
68 acpi_ex_out_pointer (
69 char *title,
70 void *value);
72 static void
73 acpi_ex_out_integer (
74 char *title,
75 u32 value);
77 static void
78 acpi_ex_out_address (
79 char *title,
80 acpi_physical_address value);
82 static void
83 acpi_ex_dump_reference (
84 union acpi_operand_object *obj_desc);
86 static void
87 acpi_ex_dump_package (
88 union acpi_operand_object *obj_desc,
89 u32 level,
90 u32 index);
91 #endif /* ACPI_FUTURE_USAGE */
93 /*******************************************************************************
95 * FUNCTION: acpi_ex_dump_operand
97 * PARAMETERS: *obj_desc - Pointer to entry to be dumped
98 * Depth - Current nesting depth
100 * RETURN: None
102 * DESCRIPTION: Dump an operand object
104 ******************************************************************************/
106 void
107 acpi_ex_dump_operand (
108 union acpi_operand_object *obj_desc,
109 u32 depth)
111 u32 length;
112 u32 index;
115 ACPI_FUNCTION_NAME ("ex_dump_operand")
118 if (!((ACPI_LV_EXEC & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) {
119 return;
122 if (!obj_desc) {
123 /* This could be a null element of a package */
125 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
126 return;
129 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
130 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p Namespace Node: ", obj_desc));
131 ACPI_DUMP_ENTRY (obj_desc, ACPI_LV_EXEC);
132 return;
135 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
136 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
137 "%p is not a node or operand object: [%s]\n",
138 obj_desc, acpi_ut_get_descriptor_name (obj_desc)));
139 ACPI_DUMP_BUFFER (obj_desc, sizeof (union acpi_operand_object));
140 return;
143 /* obj_desc is a valid object */
145 if (depth > 0) {
146 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
147 depth, " ", depth, obj_desc));
149 else {
150 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", obj_desc));
153 /* Decode object type */
155 switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
156 case ACPI_TYPE_LOCAL_REFERENCE:
158 switch (obj_desc->reference.opcode) {
159 case AML_DEBUG_OP:
161 acpi_os_printf ("Reference: Debug\n");
162 break;
165 case AML_NAME_OP:
167 ACPI_DUMP_PATHNAME (obj_desc->reference.object,
168 "Reference: Name: ", ACPI_LV_INFO, _COMPONENT);
169 ACPI_DUMP_ENTRY (obj_desc->reference.object, ACPI_LV_INFO);
170 break;
173 case AML_INDEX_OP:
175 acpi_os_printf ("Reference: Index %p\n",
176 obj_desc->reference.object);
177 break;
180 case AML_REF_OF_OP:
182 acpi_os_printf ("Reference: (ref_of) %p\n",
183 obj_desc->reference.object);
184 break;
187 case AML_ARG_OP:
189 acpi_os_printf ("Reference: Arg%d",
190 obj_desc->reference.offset);
192 if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
193 /* Value is an Integer */
195 acpi_os_printf (" value is [%8.8X%8.8x]",
196 ACPI_FORMAT_UINT64 (obj_desc->integer.value));
199 acpi_os_printf ("\n");
200 break;
203 case AML_LOCAL_OP:
205 acpi_os_printf ("Reference: Local%d",
206 obj_desc->reference.offset);
208 if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {
210 /* Value is an Integer */
212 acpi_os_printf (" value is [%8.8X%8.8x]",
213 ACPI_FORMAT_UINT64 (obj_desc->integer.value));
216 acpi_os_printf ("\n");
217 break;
220 case AML_INT_NAMEPATH_OP:
222 acpi_os_printf ("Reference.Node->Name %X\n",
223 obj_desc->reference.node->name.integer);
224 break;
227 default:
229 /* Unknown opcode */
231 acpi_os_printf ("Unknown Reference opcode=%X\n",
232 obj_desc->reference.opcode);
233 break;
236 break;
239 case ACPI_TYPE_BUFFER:
241 acpi_os_printf ("Buffer len %X @ %p \n",
242 obj_desc->buffer.length, obj_desc->buffer.pointer);
244 length = obj_desc->buffer.length;
245 if (length > 64) {
246 length = 64;
249 /* Debug only -- dump the buffer contents */
251 if (obj_desc->buffer.pointer) {
252 acpi_os_printf ("Buffer Contents: ");
254 for (index = 0; index < length; index++) {
255 acpi_os_printf (" %02x", obj_desc->buffer.pointer[index]);
257 acpi_os_printf ("\n");
259 break;
262 case ACPI_TYPE_INTEGER:
264 acpi_os_printf ("Integer %8.8X%8.8X\n",
265 ACPI_FORMAT_UINT64 (obj_desc->integer.value));
266 break;
269 case ACPI_TYPE_PACKAGE:
271 acpi_os_printf ("Package [Len %X] element_array %p\n",
272 obj_desc->package.count, obj_desc->package.elements);
275 * If elements exist, package element pointer is valid,
276 * and debug_level exceeds 1, dump package's elements.
278 if (obj_desc->package.count &&
279 obj_desc->package.elements &&
280 acpi_dbg_level > 1) {
281 for (index = 0; index < obj_desc->package.count; index++) {
282 acpi_ex_dump_operand (obj_desc->package.elements[index], depth+1);
285 break;
288 case ACPI_TYPE_REGION:
290 acpi_os_printf ("Region %s (%X)",
291 acpi_ut_get_region_name (obj_desc->region.space_id),
292 obj_desc->region.space_id);
295 * If the address and length have not been evaluated,
296 * don't print them.
298 if (!(obj_desc->region.flags & AOPOBJ_DATA_VALID)) {
299 acpi_os_printf ("\n");
301 else {
302 acpi_os_printf (" base %8.8X%8.8X Length %X\n",
303 ACPI_FORMAT_UINT64 (obj_desc->region.address),
304 obj_desc->region.length);
306 break;
309 case ACPI_TYPE_STRING:
311 acpi_os_printf ("String length %X @ %p ",
312 obj_desc->string.length,
313 obj_desc->string.pointer);
315 acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX);
316 acpi_os_printf ("\n");
317 break;
320 case ACPI_TYPE_LOCAL_BANK_FIELD:
322 acpi_os_printf ("bank_field\n");
323 break;
326 case ACPI_TYPE_LOCAL_REGION_FIELD:
328 acpi_os_printf (
329 "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,
331 obj_desc->field.access_byte_width,
332 obj_desc->field.field_flags & AML_FIELD_LOCK_RULE_MASK,
333 obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK,
334 obj_desc->field.base_byte_offset,
335 obj_desc->field.start_field_bit_offset);
337 acpi_ex_dump_operand (obj_desc->field.region_obj, depth+1);
338 break;
341 case ACPI_TYPE_LOCAL_INDEX_FIELD:
343 acpi_os_printf ("index_field\n");
344 break;
347 case ACPI_TYPE_BUFFER_FIELD:
349 acpi_os_printf (
350 "buffer_field: %X bits at byte %X bit %X of \n",
351 obj_desc->buffer_field.bit_length,
352 obj_desc->buffer_field.base_byte_offset,
353 obj_desc->buffer_field.start_field_bit_offset);
355 if (!obj_desc->buffer_field.buffer_obj) {
356 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL* \n"));
358 else if (ACPI_GET_OBJECT_TYPE (obj_desc->buffer_field.buffer_obj) !=
359 ACPI_TYPE_BUFFER) {
360 acpi_os_printf ("*not a Buffer* \n");
362 else {
363 acpi_ex_dump_operand (obj_desc->buffer_field.buffer_obj, depth+1);
365 break;
368 case ACPI_TYPE_EVENT:
370 acpi_os_printf ("Event\n");
371 break;
374 case ACPI_TYPE_METHOD:
376 acpi_os_printf ("Method(%X) @ %p:%X\n",
377 obj_desc->method.param_count,
378 obj_desc->method.aml_start,
379 obj_desc->method.aml_length);
380 break;
383 case ACPI_TYPE_MUTEX:
385 acpi_os_printf ("Mutex\n");
386 break;
389 case ACPI_TYPE_DEVICE:
391 acpi_os_printf ("Device\n");
392 break;
395 case ACPI_TYPE_POWER:
397 acpi_os_printf ("Power\n");
398 break;
401 case ACPI_TYPE_PROCESSOR:
403 acpi_os_printf ("Processor\n");
404 break;
407 case ACPI_TYPE_THERMAL:
409 acpi_os_printf ("Thermal\n");
410 break;
413 default:
414 /* Unknown Type */
416 acpi_os_printf ("Unknown Type %X\n", ACPI_GET_OBJECT_TYPE (obj_desc));
417 break;
420 return;
424 /*******************************************************************************
426 * FUNCTION: acpi_ex_dump_operands
428 * PARAMETERS: Operands - Operand list
429 * interpreter_mode - Load or Exec
430 * Ident - Identification
431 * num_levels - # of stack entries to dump above line
432 * Note - Output notation
433 * module_name - Caller's module name
434 * line_number - Caller's invocation line number
436 * DESCRIPTION: Dump the object stack
438 ******************************************************************************/
440 void
441 acpi_ex_dump_operands (
442 union acpi_operand_object **operands,
443 acpi_interpreter_mode interpreter_mode,
444 char *ident,
445 u32 num_levels,
446 char *note,
447 char *module_name,
448 u32 line_number)
450 acpi_native_uint i;
453 ACPI_FUNCTION_NAME ("ex_dump_operands");
456 if (!ident) {
457 ident = "?";
460 if (!note) {
461 note = "?";
464 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
465 "************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
466 ident, num_levels));
468 if (num_levels == 0) {
469 num_levels = 1;
472 /* Dump the operand stack starting at the top */
474 for (i = 0; num_levels > 0; i--, num_levels--) {
475 acpi_ex_dump_operand (operands[i], 0);
478 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
479 "************* Operand Stack dump from %s(%d), %s\n",
480 module_name, line_number, note));
481 return;
485 #ifdef ACPI_FUTURE_USAGE
486 /*******************************************************************************
488 * FUNCTION: acpi_ex_out* functions
490 * PARAMETERS: Title - Descriptive text
491 * Value - Value to be displayed
493 * DESCRIPTION: Object dump output formatting functions. These functions
494 * reduce the number of format strings required and keeps them
495 * all in one place for easy modification.
497 ******************************************************************************/
499 static void
500 acpi_ex_out_string (
501 char *title,
502 char *value)
504 acpi_os_printf ("%20s : %s\n", title, value);
507 static void
508 acpi_ex_out_pointer (
509 char *title,
510 void *value)
512 acpi_os_printf ("%20s : %p\n", title, value);
515 static void
516 acpi_ex_out_integer (
517 char *title,
518 u32 value)
520 acpi_os_printf ("%20s : %.2X\n", title, value);
523 static void
524 acpi_ex_out_address (
525 char *title,
526 acpi_physical_address value)
529 #if ACPI_MACHINE_WIDTH == 16
530 acpi_os_printf ("%20s : %p\n", title, value);
531 #else
532 acpi_os_printf ("%20s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64 (value));
533 #endif
537 /*******************************************************************************
539 * FUNCTION: acpi_ex_dump_node
541 * PARAMETERS: *Node - Descriptor to dump
542 * Flags - Force display if TRUE
544 * DESCRIPTION: Dumps the members of the given.Node
546 ******************************************************************************/
548 void
549 acpi_ex_dump_node (
550 struct acpi_namespace_node *node,
551 u32 flags)
554 ACPI_FUNCTION_ENTRY ();
557 if (!flags) {
558 if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) {
559 return;
563 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));
565 acpi_ex_out_integer ("Flags", node->flags);
566 acpi_ex_out_integer ("Owner Id", node->owner_id);
567 acpi_ex_out_integer ("Reference Count", node->reference_count);
568 acpi_ex_out_pointer ("Attached Object", acpi_ns_get_attached_object (node));
569 acpi_ex_out_pointer ("child_list", node->child);
570 acpi_ex_out_pointer ("next_peer", node->peer);
571 acpi_ex_out_pointer ("Parent", acpi_ns_get_parent_node (node));
575 /*******************************************************************************
577 * FUNCTION: acpi_ex_dump_reference
579 * PARAMETERS: Object - Descriptor to dump
581 * DESCRIPTION: Dumps a reference object
583 ******************************************************************************/
585 static void
586 acpi_ex_dump_reference (
587 union acpi_operand_object *obj_desc)
589 struct acpi_buffer ret_buf;
590 acpi_status status;
593 if (obj_desc->reference.opcode == AML_INT_NAMEPATH_OP) {
594 acpi_os_printf ("Named Object %p ", obj_desc->reference.node);
595 ret_buf.length = ACPI_ALLOCATE_LOCAL_BUFFER;
596 status = acpi_ns_handle_to_pathname (obj_desc->reference.node, &ret_buf);
597 if (ACPI_FAILURE (status)) {
598 acpi_os_printf ("Could not convert name to pathname\n");
600 else {
601 acpi_os_printf ("%s\n", (char *) ret_buf.pointer);
602 ACPI_MEM_FREE (ret_buf.pointer);
605 else if (obj_desc->reference.object) {
606 acpi_os_printf ("\nReferenced Object: %p\n", obj_desc->reference.object);
611 /*******************************************************************************
613 * FUNCTION: acpi_ex_dump_package
615 * PARAMETERS: Object - Descriptor to dump
616 * Level - Indentation Level
617 * Index - Package index for this object
619 * DESCRIPTION: Dumps the elements of the package
621 ******************************************************************************/
623 static void
624 acpi_ex_dump_package (
625 union acpi_operand_object *obj_desc,
626 u32 level,
627 u32 index)
629 u32 i;
632 /* Indentation and index output */
634 if (level > 0) {
635 for (i = 0; i < level; i++) {
636 acpi_os_printf (" ");
639 acpi_os_printf ("[%.2d] ", index);
642 acpi_os_printf ("%p ", obj_desc);
644 /* Null package elements are allowed */
646 if (!obj_desc) {
647 acpi_os_printf ("[Null Object]\n");
648 return;
651 /* Packages may only contain a few object types */
653 switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
654 case ACPI_TYPE_INTEGER:
656 acpi_os_printf ("[Integer] = %8.8X%8.8X\n",
657 ACPI_FORMAT_UINT64 (obj_desc->integer.value));
658 break;
661 case ACPI_TYPE_STRING:
663 acpi_os_printf ("[String] Value: ");
664 for (i = 0; i < obj_desc->string.length; i++) {
665 acpi_os_printf ("%c", obj_desc->string.pointer[i]);
667 acpi_os_printf ("\n");
668 break;
671 case ACPI_TYPE_BUFFER:
673 acpi_os_printf ("[Buffer] Length %.2X = ", obj_desc->buffer.length);
674 if (obj_desc->buffer.length) {
675 acpi_ut_dump_buffer ((u8 *) obj_desc->buffer.pointer,
676 obj_desc->buffer.length, DB_DWORD_DISPLAY, _COMPONENT);
678 else {
679 acpi_os_printf ("\n");
681 break;
684 case ACPI_TYPE_PACKAGE:
686 acpi_os_printf ("[Package] Contains %d Elements: \n",
687 obj_desc->package.count);
689 for (i = 0; i < obj_desc->package.count; i++) {
690 acpi_ex_dump_package (obj_desc->package.elements[i], level+1, i);
692 break;
695 case ACPI_TYPE_LOCAL_REFERENCE:
697 acpi_os_printf ("[Object Reference] ");
698 acpi_ex_dump_reference (obj_desc);
699 break;
702 default:
704 acpi_os_printf ("[Unknown Type] %X\n", ACPI_GET_OBJECT_TYPE (obj_desc));
705 break;
710 /*******************************************************************************
712 * FUNCTION: acpi_ex_dump_object_descriptor
714 * PARAMETERS: Object - Descriptor to dump
715 * Flags - Force display if TRUE
717 * DESCRIPTION: Dumps the members of the object descriptor given.
719 ******************************************************************************/
721 void
722 acpi_ex_dump_object_descriptor (
723 union acpi_operand_object *obj_desc,
724 u32 flags)
726 ACPI_FUNCTION_TRACE ("ex_dump_object_descriptor");
729 if (!obj_desc) {
730 return_VOID;
733 if (!flags) {
734 if (!((ACPI_LV_OBJECTS & acpi_dbg_level) && (_COMPONENT & acpi_dbg_layer))) {
735 return_VOID;
739 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_NAMED) {
740 acpi_ex_dump_node ((struct acpi_namespace_node *) obj_desc, flags);
741 acpi_os_printf ("\nAttached Object (%p):\n",
742 ((struct acpi_namespace_node *) obj_desc)->object);
743 acpi_ex_dump_object_descriptor (
744 ((struct acpi_namespace_node *) obj_desc)->object, flags);
745 return_VOID;
748 if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) != ACPI_DESC_TYPE_OPERAND) {
749 acpi_os_printf (
750 "ex_dump_object_descriptor: %p is not an ACPI operand object: [%s]\n",
751 obj_desc, acpi_ut_get_descriptor_name (obj_desc));
752 return_VOID;
755 /* Common Fields */
757 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);
759 acpi_ex_out_integer ("Flags", obj_desc->common.flags);
761 /* Object-specific Fields */
763 switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
764 case ACPI_TYPE_INTEGER:
766 acpi_os_printf ("%20s : %8.8X%8.8X\n", "Value",
767 ACPI_FORMAT_UINT64 (obj_desc->integer.value));
768 break;
771 case ACPI_TYPE_STRING:
773 acpi_ex_out_integer ("Length", obj_desc->string.length);
775 acpi_os_printf ("%20s : %p ", "Pointer", obj_desc->string.pointer);
776 acpi_ut_print_string (obj_desc->string.pointer, ACPI_UINT8_MAX);
777 acpi_os_printf ("\n");
778 break;
781 case ACPI_TYPE_BUFFER:
783 acpi_ex_out_integer ("Length", obj_desc->buffer.length);
784 acpi_ex_out_pointer ("Pointer", obj_desc->buffer.pointer);
785 ACPI_DUMP_BUFFER (obj_desc->buffer.pointer, obj_desc->buffer.length);
786 break;
789 case ACPI_TYPE_PACKAGE:
791 acpi_ex_out_integer ("Flags", obj_desc->package.flags);
792 acpi_ex_out_integer ("Elements", obj_desc->package.count);
793 acpi_ex_out_pointer ("Element List", obj_desc->package.elements);
795 /* Dump the package contents */
797 acpi_os_printf ("\nPackage Contents:\n");
798 acpi_ex_dump_package (obj_desc, 0, 0);
799 break;
802 case ACPI_TYPE_DEVICE:
804 acpi_ex_out_pointer ("Handler", obj_desc->device.handler);
805 acpi_ex_out_pointer ("system_notify", obj_desc->device.system_notify);
806 acpi_ex_out_pointer ("device_notify", obj_desc->device.device_notify);
807 break;
810 case ACPI_TYPE_EVENT:
812 acpi_ex_out_pointer ("Semaphore", obj_desc->event.semaphore);
813 break;
816 case ACPI_TYPE_METHOD:
818 acpi_ex_out_integer ("param_count", obj_desc->method.param_count);
819 acpi_ex_out_integer ("Concurrency", obj_desc->method.concurrency);
820 acpi_ex_out_pointer ("Semaphore", obj_desc->method.semaphore);
821 acpi_ex_out_integer ("owner_id", obj_desc->method.owner_id);
822 acpi_ex_out_integer ("aml_length", obj_desc->method.aml_length);
823 acpi_ex_out_pointer ("aml_start", obj_desc->method.aml_start);
824 break;
827 case ACPI_TYPE_MUTEX:
829 acpi_ex_out_integer ("sync_level", obj_desc->mutex.sync_level);
830 acpi_ex_out_pointer ("owner_thread", obj_desc->mutex.owner_thread);
831 acpi_ex_out_integer ("acquire_depth", obj_desc->mutex.acquisition_depth);
832 acpi_ex_out_pointer ("Semaphore", obj_desc->mutex.semaphore);
833 break;
836 case ACPI_TYPE_REGION:
838 acpi_ex_out_integer ("space_id", obj_desc->region.space_id);
839 acpi_ex_out_integer ("Flags", obj_desc->region.flags);
840 acpi_ex_out_address ("Address", obj_desc->region.address);
841 acpi_ex_out_integer ("Length", obj_desc->region.length);
842 acpi_ex_out_pointer ("Handler", obj_desc->region.handler);
843 acpi_ex_out_pointer ("Next", obj_desc->region.next);
844 break;
847 case ACPI_TYPE_POWER:
849 acpi_ex_out_integer ("system_level", obj_desc->power_resource.system_level);
850 acpi_ex_out_integer ("resource_order", obj_desc->power_resource.resource_order);
851 acpi_ex_out_pointer ("system_notify", obj_desc->power_resource.system_notify);
852 acpi_ex_out_pointer ("device_notify", obj_desc->power_resource.device_notify);
853 break;
856 case ACPI_TYPE_PROCESSOR:
858 acpi_ex_out_integer ("Processor ID", obj_desc->processor.proc_id);
859 acpi_ex_out_integer ("Length", obj_desc->processor.length);
860 acpi_ex_out_address ("Address", (acpi_physical_address) obj_desc->processor.address);
861 acpi_ex_out_pointer ("system_notify", obj_desc->processor.system_notify);
862 acpi_ex_out_pointer ("device_notify", obj_desc->processor.device_notify);
863 acpi_ex_out_pointer ("Handler", obj_desc->processor.handler);
864 break;
867 case ACPI_TYPE_THERMAL:
869 acpi_ex_out_pointer ("system_notify", obj_desc->thermal_zone.system_notify);
870 acpi_ex_out_pointer ("device_notify", obj_desc->thermal_zone.device_notify);
871 acpi_ex_out_pointer ("Handler", obj_desc->thermal_zone.handler);
872 break;
875 case ACPI_TYPE_BUFFER_FIELD:
876 case ACPI_TYPE_LOCAL_REGION_FIELD:
877 case ACPI_TYPE_LOCAL_BANK_FIELD:
878 case ACPI_TYPE_LOCAL_INDEX_FIELD:
880 acpi_ex_out_integer ("field_flags", obj_desc->common_field.field_flags);
881 acpi_ex_out_integer ("access_byte_width",obj_desc->common_field.access_byte_width);
882 acpi_ex_out_integer ("bit_length", obj_desc->common_field.bit_length);
883 acpi_ex_out_integer ("fld_bit_offset", obj_desc->common_field.start_field_bit_offset);
884 acpi_ex_out_integer ("base_byte_offset", obj_desc->common_field.base_byte_offset);
885 acpi_ex_out_pointer ("parent_node", obj_desc->common_field.node);
887 switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {
888 case ACPI_TYPE_BUFFER_FIELD:
889 acpi_ex_out_pointer ("buffer_obj", obj_desc->buffer_field.buffer_obj);
890 break;
892 case ACPI_TYPE_LOCAL_REGION_FIELD:
893 acpi_ex_out_pointer ("region_obj", obj_desc->field.region_obj);
894 break;
896 case ACPI_TYPE_LOCAL_BANK_FIELD:
897 acpi_ex_out_integer ("Value", obj_desc->bank_field.value);
898 acpi_ex_out_pointer ("region_obj", obj_desc->bank_field.region_obj);
899 acpi_ex_out_pointer ("bank_obj", obj_desc->bank_field.bank_obj);
900 break;
902 case ACPI_TYPE_LOCAL_INDEX_FIELD:
903 acpi_ex_out_integer ("Value", obj_desc->index_field.value);
904 acpi_ex_out_pointer ("Index", obj_desc->index_field.index_obj);
905 acpi_ex_out_pointer ("Data", obj_desc->index_field.data_obj);
906 break;
908 default:
909 /* All object types covered above */
910 break;
912 break;
915 case ACPI_TYPE_LOCAL_REFERENCE:
917 acpi_ex_out_integer ("target_type", obj_desc->reference.target_type);
918 acpi_ex_out_string ("Opcode", (acpi_ps_get_opcode_info (
919 obj_desc->reference.opcode))->name);
920 acpi_ex_out_integer ("Offset", obj_desc->reference.offset);
921 acpi_ex_out_pointer ("obj_desc", obj_desc->reference.object);
922 acpi_ex_out_pointer ("Node", obj_desc->reference.node);
923 acpi_ex_out_pointer ("Where", obj_desc->reference.where);
925 acpi_ex_dump_reference (obj_desc);
926 break;
929 case ACPI_TYPE_LOCAL_ADDRESS_HANDLER:
931 acpi_ex_out_integer ("space_id", obj_desc->address_space.space_id);
932 acpi_ex_out_pointer ("Next", obj_desc->address_space.next);
933 acpi_ex_out_pointer ("region_list", obj_desc->address_space.region_list);
934 acpi_ex_out_pointer ("Node", obj_desc->address_space.node);
935 acpi_ex_out_pointer ("Context", obj_desc->address_space.context);
936 break;
939 case ACPI_TYPE_LOCAL_NOTIFY:
941 acpi_ex_out_pointer ("Node", obj_desc->notify.node);
942 acpi_ex_out_pointer ("Context", obj_desc->notify.context);
943 break;
946 case ACPI_TYPE_LOCAL_ALIAS:
947 case ACPI_TYPE_LOCAL_METHOD_ALIAS:
948 case ACPI_TYPE_LOCAL_EXTRA:
949 case ACPI_TYPE_LOCAL_DATA:
950 default:
952 acpi_os_printf (
953 "ex_dump_object_descriptor: Display not implemented for object type %s\n",
954 acpi_ut_get_object_type_name (obj_desc));
955 break;
958 return_VOID;
961 #endif /* ACPI_FUTURE_USAGE */
962 #endif