1 /******************************************************************************
3 * Module Name: exdump - Interpreter debug output routines
6 *****************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
13 * All rights reserved.
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code. No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
38 * The above copyright and patent license is granted only if the following
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision. In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change. Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee. Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution. In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
73 * 3.4. Intel retains all right, title, and interest in and to the Original
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
81 * 4. Disclaimer and Export Compliance
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government. In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
115 *****************************************************************************/
119 #include <contrib/dev/acpica/acpi.h>
120 #include <contrib/dev/acpica/acinterp.h>
121 #include <contrib/dev/acpica/amlcode.h>
122 #include <contrib/dev/acpica/acnamesp.h>
123 #include <contrib/dev/acpica/acparser.h>
125 #define _COMPONENT ACPI_EXECUTER
126 ACPI_MODULE_NAME ("exdump")
129 * The following routines are used for debug output only
131 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
133 /* Local prototypes */
153 ACPI_PHYSICAL_ADDRESS Value);
156 AcpiExDumpReference (
157 ACPI_OPERAND_OBJECT *ObjDesc);
161 ACPI_OPERAND_OBJECT *ObjDesc,
166 /*******************************************************************************
168 * FUNCTION: AcpiExDumpOperand
170 * PARAMETERS: *ObjDesc - Pointer to entry to be dumped
171 * Depth - Current nesting depth
175 * DESCRIPTION: Dump an operand object
177 ******************************************************************************/
181 ACPI_OPERAND_OBJECT *ObjDesc,
188 ACPI_FUNCTION_NAME ("ExDumpOperand")
191 if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
198 /* This could be a null element of a package */
200 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
204 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
206 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p Namespace Node: ", ObjDesc));
207 ACPI_DUMP_ENTRY (ObjDesc, ACPI_LV_EXEC);
211 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
213 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
214 "%p is not a node or operand object: [%s]\n",
215 ObjDesc, AcpiUtGetDescriptorName (ObjDesc)));
216 ACPI_DUMP_BUFFER (ObjDesc, sizeof (ACPI_OPERAND_OBJECT));
220 /* ObjDesc is a valid object */
224 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
225 Depth, " ", Depth, ObjDesc));
229 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", ObjDesc));
232 /* Decode object type */
234 switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
236 case ACPI_TYPE_LOCAL_REFERENCE:
238 switch (ObjDesc->Reference.Opcode)
242 AcpiOsPrintf ("Reference: Debug\n");
248 ACPI_DUMP_PATHNAME (ObjDesc->Reference.Object,
249 "Reference: Name: ", ACPI_LV_INFO, _COMPONENT);
250 ACPI_DUMP_ENTRY (ObjDesc->Reference.Object, ACPI_LV_INFO);
256 AcpiOsPrintf ("Reference: Index %p\n",
257 ObjDesc->Reference.Object);
263 AcpiOsPrintf ("Reference: (RefOf) %p\n",
264 ObjDesc->Reference.Object);
270 AcpiOsPrintf ("Reference: Arg%d",
271 ObjDesc->Reference.Offset);
273 if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
275 /* Value is an Integer */
277 AcpiOsPrintf (" value is [%8.8X%8.8x]",
278 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
287 AcpiOsPrintf ("Reference: Local%d",
288 ObjDesc->Reference.Offset);
290 if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
293 /* Value is an Integer */
295 AcpiOsPrintf (" value is [%8.8X%8.8x]",
296 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
303 case AML_INT_NAMEPATH_OP:
305 AcpiOsPrintf ("Reference.Node->Name %X\n",
306 ObjDesc->Reference.Node->Name.Integer);
314 AcpiOsPrintf ("Unknown Reference opcode=%X\n",
315 ObjDesc->Reference.Opcode);
322 case ACPI_TYPE_BUFFER:
324 AcpiOsPrintf ("Buffer len %X @ %p\n",
325 ObjDesc->Buffer.Length, ObjDesc->Buffer.Pointer);
327 Length = ObjDesc->Buffer.Length;
333 /* Debug only -- dump the buffer contents */
335 if (ObjDesc->Buffer.Pointer)
337 AcpiOsPrintf ("Buffer Contents: ");
339 for (Index = 0; Index < Length; Index++)
341 AcpiOsPrintf (" %02x", ObjDesc->Buffer.Pointer[Index]);
348 case ACPI_TYPE_INTEGER:
350 AcpiOsPrintf ("Integer %8.8X%8.8X\n",
351 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
355 case ACPI_TYPE_PACKAGE:
357 AcpiOsPrintf ("Package [Len %X] ElementArray %p\n",
358 ObjDesc->Package.Count, ObjDesc->Package.Elements);
361 * If elements exist, package element pointer is valid,
362 * and debug_level exceeds 1, dump package's elements.
364 if (ObjDesc->Package.Count &&
365 ObjDesc->Package.Elements &&
368 for (Index = 0; Index < ObjDesc->Package.Count; Index++)
370 AcpiExDumpOperand (ObjDesc->Package.Elements[Index], Depth+1);
376 case ACPI_TYPE_REGION:
378 AcpiOsPrintf ("Region %s (%X)",
379 AcpiUtGetRegionName (ObjDesc->Region.SpaceId),
380 ObjDesc->Region.SpaceId);
383 * If the address and length have not been evaluated,
386 if (!(ObjDesc->Region.Flags & AOPOBJ_DATA_VALID))
392 AcpiOsPrintf (" base %8.8X%8.8X Length %X\n",
393 ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
394 ObjDesc->Region.Length);
399 case ACPI_TYPE_STRING:
401 AcpiOsPrintf ("String length %X @ %p ",
402 ObjDesc->String.Length,
403 ObjDesc->String.Pointer);
405 AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
410 case ACPI_TYPE_LOCAL_BANK_FIELD:
412 AcpiOsPrintf ("BankField\n");
416 case ACPI_TYPE_LOCAL_REGION_FIELD:
419 "RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at byte=%X bit=%X of below:\n",
420 ObjDesc->Field.BitLength,
421 ObjDesc->Field.AccessByteWidth,
422 ObjDesc->Field.FieldFlags & AML_FIELD_LOCK_RULE_MASK,
423 ObjDesc->Field.FieldFlags & AML_FIELD_UPDATE_RULE_MASK,
424 ObjDesc->Field.BaseByteOffset,
425 ObjDesc->Field.StartFieldBitOffset);
427 AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
431 case ACPI_TYPE_LOCAL_INDEX_FIELD:
433 AcpiOsPrintf ("IndexField\n");
437 case ACPI_TYPE_BUFFER_FIELD:
440 "BufferField: %X bits at byte %X bit %X of\n",
441 ObjDesc->BufferField.BitLength,
442 ObjDesc->BufferField.BaseByteOffset,
443 ObjDesc->BufferField.StartFieldBitOffset);
445 if (!ObjDesc->BufferField.BufferObj)
447 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL*\n"));
449 else if (ACPI_GET_OBJECT_TYPE (ObjDesc->BufferField.BufferObj) !=
452 AcpiOsPrintf ("*not a Buffer*\n");
456 AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1);
461 case ACPI_TYPE_EVENT:
463 AcpiOsPrintf ("Event\n");
467 case ACPI_TYPE_METHOD:
469 AcpiOsPrintf ("Method(%X) @ %p:%X\n",
470 ObjDesc->Method.ParamCount,
471 ObjDesc->Method.AmlStart,
472 ObjDesc->Method.AmlLength);
476 case ACPI_TYPE_MUTEX:
478 AcpiOsPrintf ("Mutex\n");
482 case ACPI_TYPE_DEVICE:
484 AcpiOsPrintf ("Device\n");
488 case ACPI_TYPE_POWER:
490 AcpiOsPrintf ("Power\n");
494 case ACPI_TYPE_PROCESSOR:
496 AcpiOsPrintf ("Processor\n");
500 case ACPI_TYPE_THERMAL:
502 AcpiOsPrintf ("Thermal\n");
509 AcpiOsPrintf ("Unknown Type %X\n", ACPI_GET_OBJECT_TYPE (ObjDesc));
517 /*******************************************************************************
519 * FUNCTION: AcpiExDumpOperands
521 * PARAMETERS: Operands - Operand list
522 * InterpreterMode - Load or Exec
523 * Ident - Identification
524 * NumLevels - # of stack entries to dump above line
525 * Note - Output notation
526 * ModuleName - Caller's module name
527 * LineNumber - Caller's invocation line number
529 * DESCRIPTION: Dump the object stack
531 ******************************************************************************/
535 ACPI_OPERAND_OBJECT **Operands,
536 ACPI_INTERPRETER_MODE InterpreterMode,
546 ACPI_FUNCTION_NAME ("ExDumpOperands");
559 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
560 "************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
568 /* Dump the operand stack starting at the top */
570 for (i = 0; NumLevels > 0; i--, NumLevels--)
572 AcpiExDumpOperand (Operands[i], 0);
575 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
576 "************* Operand Stack dump from %s(%d), %s\n",
577 ModuleName, LineNumber, Note));
582 /*******************************************************************************
584 * FUNCTION: AcpiExOut* functions
586 * PARAMETERS: Title - Descriptive text
587 * Value - Value to be displayed
589 * DESCRIPTION: Object dump output formatting functions. These functions
590 * reduce the number of format strings required and keeps them
591 * all in one place for easy modification.
593 ******************************************************************************/
600 AcpiOsPrintf ("%20s : %s\n", Title, Value);
608 AcpiOsPrintf ("%20s : %p\n", Title, Value);
616 AcpiOsPrintf ("%20s : %.2X\n", Title, Value);
622 ACPI_PHYSICAL_ADDRESS Value)
625 #if ACPI_MACHINE_WIDTH == 16
626 AcpiOsPrintf ("%20s : %p\n", Title, Value);
628 AcpiOsPrintf ("%20s : %8.8X%8.8X\n", Title, ACPI_FORMAT_UINT64 (Value));
633 /*******************************************************************************
635 * FUNCTION: AcpiExDumpNode
637 * PARAMETERS: *Node - Descriptor to dump
638 * Flags - Force display if TRUE
640 * DESCRIPTION: Dumps the members of the given.Node
642 ******************************************************************************/
646 ACPI_NAMESPACE_NODE *Node,
650 ACPI_FUNCTION_ENTRY ();
655 if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
661 AcpiOsPrintf ("%20s : %4.4s\n", "Name", AcpiUtGetNodeName (Node));
662 AcpiExOutString ("Type", AcpiUtGetTypeName (Node->Type));
663 AcpiExOutInteger ("Flags", Node->Flags);
664 AcpiExOutInteger ("Owner Id", Node->OwnerId);
665 AcpiExOutInteger ("Reference Count", Node->ReferenceCount);
666 AcpiExOutPointer ("Attached Object", AcpiNsGetAttachedObject (Node));
667 AcpiExOutPointer ("ChildList", Node->Child);
668 AcpiExOutPointer ("NextPeer", Node->Peer);
669 AcpiExOutPointer ("Parent", AcpiNsGetParentNode (Node));
673 /*******************************************************************************
675 * FUNCTION: AcpiExDumpReference
677 * PARAMETERS: Object - Descriptor to dump
679 * DESCRIPTION: Dumps a reference object
681 ******************************************************************************/
684 AcpiExDumpReference (
685 ACPI_OPERAND_OBJECT *ObjDesc)
691 if (ObjDesc->Reference.Opcode == AML_INT_NAMEPATH_OP)
693 AcpiOsPrintf ("Named Object %p ", ObjDesc->Reference.Node);
694 RetBuf.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
695 Status = AcpiNsHandleToPathname (ObjDesc->Reference.Node, &RetBuf);
696 if (ACPI_FAILURE (Status))
698 AcpiOsPrintf ("Could not convert name to pathname\n");
702 AcpiOsPrintf ("%s\n", (char *) RetBuf.Pointer);
703 ACPI_MEM_FREE (RetBuf.Pointer);
706 else if (ObjDesc->Reference.Object)
708 AcpiOsPrintf ("\nReferenced Object: %p\n", ObjDesc->Reference.Object);
713 /*******************************************************************************
715 * FUNCTION: AcpiExDumpPackage
717 * PARAMETERS: Object - Descriptor to dump
718 * Level - Indentation Level
719 * Index - Package index for this object
721 * DESCRIPTION: Dumps the elements of the package
723 ******************************************************************************/
727 ACPI_OPERAND_OBJECT *ObjDesc,
734 /* Indentation and index output */
738 for (i = 0; i < Level; i++)
743 AcpiOsPrintf ("[%.2d] ", Index);
746 AcpiOsPrintf ("%p ", ObjDesc);
748 /* Null package elements are allowed */
752 AcpiOsPrintf ("[Null Object]\n");
756 /* Packages may only contain a few object types */
758 switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
760 case ACPI_TYPE_INTEGER:
762 AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
763 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
767 case ACPI_TYPE_STRING:
769 AcpiOsPrintf ("[String] Value: ");
770 for (i = 0; i < ObjDesc->String.Length; i++)
772 AcpiOsPrintf ("%c", ObjDesc->String.Pointer[i]);
778 case ACPI_TYPE_BUFFER:
780 AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
781 if (ObjDesc->Buffer.Length)
783 AcpiUtDumpBuffer ((UINT8 *) ObjDesc->Buffer.Pointer,
784 ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
793 case ACPI_TYPE_PACKAGE:
795 AcpiOsPrintf ("[Package] Contains %d Elements:\n",
796 ObjDesc->Package.Count);
798 for (i = 0; i < ObjDesc->Package.Count; i++)
800 AcpiExDumpPackage (ObjDesc->Package.Elements[i], Level+1, i);
805 case ACPI_TYPE_LOCAL_REFERENCE:
807 AcpiOsPrintf ("[Object Reference] ");
808 AcpiExDumpReference (ObjDesc);
814 AcpiOsPrintf ("[Unknown Type] %X\n", ACPI_GET_OBJECT_TYPE (ObjDesc));
820 /*******************************************************************************
822 * FUNCTION: AcpiExDumpObjectDescriptor
824 * PARAMETERS: Object - Descriptor to dump
825 * Flags - Force display if TRUE
827 * DESCRIPTION: Dumps the members of the object descriptor given.
829 ******************************************************************************/
832 AcpiExDumpObjectDescriptor (
833 ACPI_OPERAND_OBJECT *ObjDesc,
836 ACPI_FUNCTION_TRACE ("ExDumpObjectDescriptor");
846 if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
852 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
854 AcpiExDumpNode ((ACPI_NAMESPACE_NODE *) ObjDesc, Flags);
855 AcpiOsPrintf ("\nAttached Object (%p):\n",
856 ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object);
857 AcpiExDumpObjectDescriptor (
858 ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object, Flags);
862 if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
865 "ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n",
866 ObjDesc, AcpiUtGetDescriptorName (ObjDesc));
872 AcpiExOutString ("Type", AcpiUtGetObjectTypeName (ObjDesc));
873 AcpiExOutInteger ("Reference Count", ObjDesc->Common.ReferenceCount);
874 AcpiExOutInteger ("Flags", ObjDesc->Common.Flags);
876 /* Object-specific Fields */
878 switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
880 case ACPI_TYPE_INTEGER:
882 AcpiOsPrintf ("%20s : %8.8X%8.8X\n", "Value",
883 ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
887 case ACPI_TYPE_STRING:
889 AcpiExOutInteger ("Length", ObjDesc->String.Length);
891 AcpiOsPrintf ("%20s : %p ", "Pointer", ObjDesc->String.Pointer);
892 AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
897 case ACPI_TYPE_BUFFER:
899 AcpiExOutInteger ("Length", ObjDesc->Buffer.Length);
900 AcpiExOutPointer ("Pointer", ObjDesc->Buffer.Pointer);
901 ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length);
905 case ACPI_TYPE_PACKAGE:
907 AcpiExOutInteger ("Flags", ObjDesc->Package.Flags);
908 AcpiExOutInteger ("Elements", ObjDesc->Package.Count);
909 AcpiExOutPointer ("Element List", ObjDesc->Package.Elements);
911 /* Dump the package contents */
913 AcpiOsPrintf ("\nPackage Contents:\n");
914 AcpiExDumpPackage (ObjDesc, 0, 0);
918 case ACPI_TYPE_DEVICE:
920 AcpiExOutPointer ("Handler", ObjDesc->Device.Handler);
921 AcpiExOutPointer ("SystemNotify", ObjDesc->Device.SystemNotify);
922 AcpiExOutPointer ("DeviceNotify", ObjDesc->Device.DeviceNotify);
926 case ACPI_TYPE_EVENT:
928 AcpiExOutPointer ("Semaphore", ObjDesc->Event.Semaphore);
932 case ACPI_TYPE_METHOD:
934 AcpiExOutInteger ("ParamCount", ObjDesc->Method.ParamCount);
935 AcpiExOutInteger ("Concurrency", ObjDesc->Method.Concurrency);
936 AcpiExOutPointer ("Semaphore", ObjDesc->Method.Semaphore);
937 AcpiExOutInteger ("OwnerId", ObjDesc->Method.OwnerId);
938 AcpiExOutInteger ("AmlLength", ObjDesc->Method.AmlLength);
939 AcpiExOutPointer ("AmlStart", ObjDesc->Method.AmlStart);
943 case ACPI_TYPE_MUTEX:
945 AcpiExOutInteger ("SyncLevel", ObjDesc->Mutex.SyncLevel);
946 AcpiExOutPointer ("OwnerThread", ObjDesc->Mutex.OwnerThread);
947 AcpiExOutInteger ("AcquireDepth", ObjDesc->Mutex.AcquisitionDepth);
948 AcpiExOutPointer ("Semaphore", ObjDesc->Mutex.Semaphore);
952 case ACPI_TYPE_REGION:
954 AcpiExOutInteger ("SpaceId", ObjDesc->Region.SpaceId);
955 AcpiExOutInteger ("Flags", ObjDesc->Region.Flags);
956 AcpiExOutAddress ("Address", ObjDesc->Region.Address);
957 AcpiExOutInteger ("Length", ObjDesc->Region.Length);
958 AcpiExOutPointer ("Handler", ObjDesc->Region.Handler);
959 AcpiExOutPointer ("Next", ObjDesc->Region.Next);
963 case ACPI_TYPE_POWER:
965 AcpiExOutInteger ("SystemLevel", ObjDesc->PowerResource.SystemLevel);
966 AcpiExOutInteger ("ResourceOrder", ObjDesc->PowerResource.ResourceOrder);
967 AcpiExOutPointer ("SystemNotify", ObjDesc->PowerResource.SystemNotify);
968 AcpiExOutPointer ("DeviceNotify", ObjDesc->PowerResource.DeviceNotify);
972 case ACPI_TYPE_PROCESSOR:
974 AcpiExOutInteger ("Processor ID", ObjDesc->Processor.ProcId);
975 AcpiExOutInteger ("Length", ObjDesc->Processor.Length);
976 AcpiExOutAddress ("Address", (ACPI_PHYSICAL_ADDRESS) ObjDesc->Processor.Address);
977 AcpiExOutPointer ("SystemNotify", ObjDesc->Processor.SystemNotify);
978 AcpiExOutPointer ("DeviceNotify", ObjDesc->Processor.DeviceNotify);
979 AcpiExOutPointer ("Handler", ObjDesc->Processor.Handler);
983 case ACPI_TYPE_THERMAL:
985 AcpiExOutPointer ("SystemNotify", ObjDesc->ThermalZone.SystemNotify);
986 AcpiExOutPointer ("DeviceNotify", ObjDesc->ThermalZone.DeviceNotify);
987 AcpiExOutPointer ("Handler", ObjDesc->ThermalZone.Handler);
991 case ACPI_TYPE_BUFFER_FIELD:
992 case ACPI_TYPE_LOCAL_REGION_FIELD:
993 case ACPI_TYPE_LOCAL_BANK_FIELD:
994 case ACPI_TYPE_LOCAL_INDEX_FIELD:
996 AcpiExOutInteger ("FieldFlags", ObjDesc->CommonField.FieldFlags);
997 AcpiExOutInteger ("AccessByteWidth",ObjDesc->CommonField.AccessByteWidth);
998 AcpiExOutInteger ("BitLength", ObjDesc->CommonField.BitLength);
999 AcpiExOutInteger ("FldBitOffset", ObjDesc->CommonField.StartFieldBitOffset);
1000 AcpiExOutInteger ("BaseByteOffset", ObjDesc->CommonField.BaseByteOffset);
1001 AcpiExOutPointer ("ParentNode", ObjDesc->CommonField.Node);
1003 switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
1005 case ACPI_TYPE_BUFFER_FIELD:
1006 AcpiExOutPointer ("BufferObj", ObjDesc->BufferField.BufferObj);
1009 case ACPI_TYPE_LOCAL_REGION_FIELD:
1010 AcpiExOutPointer ("RegionObj", ObjDesc->Field.RegionObj);
1013 case ACPI_TYPE_LOCAL_BANK_FIELD:
1014 AcpiExOutInteger ("Value", ObjDesc->BankField.Value);
1015 AcpiExOutPointer ("RegionObj", ObjDesc->BankField.RegionObj);
1016 AcpiExOutPointer ("BankObj", ObjDesc->BankField.BankObj);
1019 case ACPI_TYPE_LOCAL_INDEX_FIELD:
1020 AcpiExOutInteger ("Value", ObjDesc->IndexField.Value);
1021 AcpiExOutPointer ("Index", ObjDesc->IndexField.IndexObj);
1022 AcpiExOutPointer ("Data", ObjDesc->IndexField.DataObj);
1026 /* All object types covered above */
1032 case ACPI_TYPE_LOCAL_REFERENCE:
1034 AcpiExOutInteger ("TargetType", ObjDesc->Reference.TargetType);
1035 AcpiExOutString ("Opcode", (AcpiPsGetOpcodeInfo (
1036 ObjDesc->Reference.Opcode))->Name);
1037 AcpiExOutInteger ("Offset", ObjDesc->Reference.Offset);
1038 AcpiExOutPointer ("ObjDesc", ObjDesc->Reference.Object);
1039 AcpiExOutPointer ("Node", ObjDesc->Reference.Node);
1040 AcpiExOutPointer ("Where", ObjDesc->Reference.Where);
1042 AcpiExDumpReference (ObjDesc);
1046 case ACPI_TYPE_LOCAL_ADDRESS_HANDLER:
1048 AcpiExOutInteger ("SpaceId", ObjDesc->AddressSpace.SpaceId);
1049 AcpiExOutPointer ("Next", ObjDesc->AddressSpace.Next);
1050 AcpiExOutPointer ("RegionList", ObjDesc->AddressSpace.RegionList);
1051 AcpiExOutPointer ("Node", ObjDesc->AddressSpace.Node);
1052 AcpiExOutPointer ("Context", ObjDesc->AddressSpace.Context);
1056 case ACPI_TYPE_LOCAL_NOTIFY:
1058 AcpiExOutPointer ("Node", ObjDesc->Notify.Node);
1059 AcpiExOutPointer ("Context", ObjDesc->Notify.Context);
1063 case ACPI_TYPE_LOCAL_ALIAS:
1064 case ACPI_TYPE_LOCAL_METHOD_ALIAS:
1065 case ACPI_TYPE_LOCAL_EXTRA:
1066 case ACPI_TYPE_LOCAL_DATA:
1070 "ExDumpObjectDescriptor: Display not implemented for object type %s\n",
1071 AcpiUtGetObjectTypeName (ObjDesc));