1 /******************************************************************************
3 * Module Name: amdump - Interpreter debug output routines
6 *****************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
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 *****************************************************************************/
120 #include "acinterp.h"
122 #include "acnamesp.h"
123 #include "actables.h"
125 #define _COMPONENT INTERPRETER
126 MODULE_NAME ("amdump")
130 * The following routines are used for debug output only
135 /*****************************************************************************
137 * FUNCTION: AcpiAmlShowHexValue
139 * PARAMETERS: ByteCount - Number of bytes to print (1, 2, or 4)
140 * *AmlPtr - Address in AML stream of bytes to print
141 * InterpreterMode - Current running mode (load1/Load2/Exec)
142 * LeadSpace - # of spaces to print ahead of value
143 * 0 => none ahead but one behind
145 * DESCRIPTION: Print ByteCount byte(s) starting at AcpiAmlPtr as a single
146 * value, in hex. If ByteCount > 1 or the value printed is > 9, also
149 ****************************************************************************/
152 AcpiAmlShowHexValue (
157 UINT32 Value; /* Value retrieved from AML stream */
158 UINT32 ShowDecimalValue;
159 UINT32 Length; /* Length of printed field */
160 UINT8 *CurrentAmlPtr = NULL; /* Pointer to current byte of AML value */
163 FUNCTION_TRACE ("AmlShowHexValue");
168 REPORT_ERROR (("AmlShowHexValue: null pointer\n"));
172 * AML numbers are always stored little-endian,
173 * even if the processor is big-endian.
175 for (CurrentAmlPtr = AmlPtr + ByteCount,
177 CurrentAmlPtr > AmlPtr; )
179 Value = (Value << 8) + (UINT32)* --CurrentAmlPtr;
182 Length = LeadSpace * ByteCount + 2;
185 Length += (ByteCount - 1);
188 ShowDecimalValue = (ByteCount > 1 || Value > 9);
189 if (ShowDecimalValue)
191 Length += 3 + AcpiAmlDigitsNeeded (Value, 10);
194 DEBUG_PRINT (TRACE_LOAD, (""));
196 for (Length = LeadSpace; Length; --Length )
198 DEBUG_PRINT_RAW (TRACE_LOAD, (" "));
203 DEBUG_PRINT_RAW (TRACE_LOAD, ("%02x", *AmlPtr++));
207 DEBUG_PRINT_RAW (TRACE_LOAD, (" "));
211 if (ShowDecimalValue)
213 DEBUG_PRINT_RAW (TRACE_LOAD, (" [%ld]", Value));
218 DEBUG_PRINT_RAW (TRACE_LOAD, (" "));
221 DEBUG_PRINT_RAW (TRACE_LOAD, ("\n"));
226 /*****************************************************************************
228 * FUNCTION: AcpiAmlDumpOperand
230 * PARAMETERS: *EntryDesc - Pointer to entry to be dumped
234 * DESCRIPTION: Dump a stack entry
236 ****************************************************************************/
240 ACPI_OPERAND_OBJECT *EntryDesc)
250 * This usually indicates that something serious is wrong --
251 * since most (if not all)
252 * code that dumps the stack expects something to be there!
254 DEBUG_PRINT (ACPI_INFO,
255 ("AmlDumpOperand: *** Possible error: Null stack entry ptr\n"));
259 if (VALID_DESCRIPTOR_TYPE (EntryDesc, ACPI_DESC_TYPE_NAMED))
261 DEBUG_PRINT (ACPI_INFO,
262 ("AmlDumpOperand: Node: \n"));
263 DUMP_ENTRY (EntryDesc, ACPI_INFO);
267 if (AcpiTbSystemTablePointer (EntryDesc))
269 DEBUG_PRINT (ACPI_INFO,
270 ("AmlDumpOperand: %p is a Pcode pointer\n",
275 if (!VALID_DESCRIPTOR_TYPE (EntryDesc, ACPI_DESC_TYPE_INTERNAL))
277 DEBUG_PRINT (ACPI_INFO,
278 ("AmlDumpOperand: %p Not a local object \n", EntryDesc));
279 DUMP_BUFFER (EntryDesc, sizeof (ACPI_OPERAND_OBJECT));
283 /* EntryDesc is a valid object */
285 DEBUG_PRINT (ACPI_INFO, ("AmlDumpOperand: %p ", EntryDesc));
287 switch (EntryDesc->Common.Type)
289 case INTERNAL_TYPE_REFERENCE:
291 switch (EntryDesc->Reference.OpCode)
295 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Zero\n"));
301 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: One\n"));
307 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Ones\n"));
313 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Debug\n"));
319 DUMP_PATHNAME (EntryDesc->Reference.Object, "Reference: Name: ",
320 ACPI_INFO, _COMPONENT);
321 DUMP_ENTRY (EntryDesc->Reference.Object, ACPI_INFO);
327 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Index %p\n",
328 EntryDesc->Reference.Object));
334 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Arg%d",
335 EntryDesc->Reference.Offset));
337 if (ACPI_TYPE_NUMBER == EntryDesc->Common.Type)
339 /* Value is a Number */
341 DEBUG_PRINT_RAW (ACPI_INFO, (" value is [%ld]",
342 EntryDesc->Number.Value));
345 DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
351 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Local%d",
352 EntryDesc->Reference.Offset));
354 if (ACPI_TYPE_NUMBER == EntryDesc->Common.Type)
357 /* Value is a Number */
359 DEBUG_PRINT_RAW (ACPI_INFO, (" value is [%ld]",
360 EntryDesc->Number.Value));
363 DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
367 case AML_NAMEPATH_OP:
368 DEBUG_PRINT_RAW (ACPI_INFO, ("Reference.Node->Name %x\n",
369 EntryDesc->Reference.Node->Name));
376 DEBUG_PRINT_RAW (ACPI_INFO, ("Unknown opcode=%X\n",
377 EntryDesc->Reference.OpCode));
385 case ACPI_TYPE_BUFFER:
387 DEBUG_PRINT_RAW (ACPI_INFO, ("Buffer len %X @ %p \n",
388 EntryDesc->Buffer.Length,
389 EntryDesc->Buffer.Pointer));
391 Length = EntryDesc->Buffer.Length;
398 /* Debug only -- dump the buffer contents */
400 if (EntryDesc->Buffer.Pointer)
402 DEBUG_PRINT_RAW (ACPI_INFO, ("Buffer Contents: "));
404 for (Buf = EntryDesc->Buffer.Pointer; Length--; ++Buf)
406 DEBUG_PRINT_RAW (ACPI_INFO,
407 (Length ? " %02x" : " %02x", *Buf));
409 DEBUG_PRINT_RAW (ACPI_INFO,("\n"));
415 case ACPI_TYPE_NUMBER:
417 DEBUG_PRINT_RAW (ACPI_INFO, ("Number %lX\n",
418 EntryDesc->Number.Value));
422 case INTERNAL_TYPE_IF:
424 DEBUG_PRINT_RAW (ACPI_INFO, ("If [Number] %lX\n",
425 EntryDesc->Number.Value));
429 case INTERNAL_TYPE_WHILE:
431 DEBUG_PRINT_RAW (ACPI_INFO, ("While [Number] %lX\n",
432 EntryDesc->Number.Value));
436 case ACPI_TYPE_PACKAGE:
438 DEBUG_PRINT_RAW (ACPI_INFO, ("Package count %X @ %p\n",
439 EntryDesc->Package.Count, EntryDesc->Package.Elements));
443 * If elements exist, package vector pointer is valid,
444 * and debug_level exceeds 1, dump package's elements.
446 if (EntryDesc->Package.Count &&
447 EntryDesc->Package.Elements &&
448 GetDebugLevel () > 1)
450 ACPI_OPERAND_OBJECT**Element;
453 for (ElementIndex = 0, Element = EntryDesc->Package.Elements;
454 ElementIndex < EntryDesc->Package.Count;
455 ++ElementIndex, ++Element)
457 AcpiAmlDumpOperand (*Element);
461 DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
466 case ACPI_TYPE_REGION:
468 DEBUG_PRINT_RAW (ACPI_INFO, ("Region %s (%X)",
469 AcpiCmGetRegionName (EntryDesc->Region.SpaceId),
470 EntryDesc->Region.SpaceId));
473 * If the address and length have not been evaluated,
476 if (!(EntryDesc->Region.Flags & AOPOBJ_DATA_VALID))
478 DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
482 DEBUG_PRINT_RAW (ACPI_INFO, (" base %p Length %X\n",
483 EntryDesc->Region.Address, EntryDesc->Region.Length));
488 case ACPI_TYPE_STRING:
490 DEBUG_PRINT_RAW (ACPI_INFO, ("String length %X @ %p\n\n",
491 EntryDesc->String.Length, EntryDesc->String.Pointer));
493 for (i=0; i < EntryDesc->String.Length; i++)
495 DEBUG_PRINT_RAW (ACPI_INFO, ("%c",
496 EntryDesc->String.Pointer[i]));
499 DEBUG_PRINT_RAW (ACPI_INFO, ("\n\n"));
503 case INTERNAL_TYPE_BANK_FIELD:
505 DEBUG_PRINT_RAW (ACPI_INFO, ("BankField\n"));
509 case INTERNAL_TYPE_DEF_FIELD:
511 DEBUG_PRINT_RAW (ACPI_INFO,
512 ("DefField: bits=%X acc=%X lock=%X update=%X at byte=%lX bit=%X of below:\n",
513 EntryDesc->Field.Length, EntryDesc->Field.Access,
514 EntryDesc->Field.LockRule, EntryDesc->Field.UpdateRule,
515 EntryDesc->Field.Offset, EntryDesc->Field.BitOffset));
516 DUMP_STACK_ENTRY (EntryDesc->Field.Container);
520 case INTERNAL_TYPE_INDEX_FIELD:
522 DEBUG_PRINT_RAW (ACPI_INFO, ("IndexField\n"));
526 case ACPI_TYPE_FIELD_UNIT:
528 DEBUG_PRINT_RAW (ACPI_INFO,
529 ("FieldUnit: %X bits acc %X lock %X update %X at byte %lX bit %X of \n",
530 EntryDesc->FieldUnit.Length, EntryDesc->FieldUnit.Access,
531 EntryDesc->FieldUnit.LockRule, EntryDesc->FieldUnit.UpdateRule,
532 EntryDesc->FieldUnit.Offset, EntryDesc->FieldUnit.BitOffset));
534 if (!EntryDesc->FieldUnit.Container)
536 DEBUG_PRINT (ACPI_INFO, ("*NULL* \n"));
539 else if (ACPI_TYPE_BUFFER !=
540 EntryDesc->FieldUnit.Container->Common.Type)
542 DEBUG_PRINT_RAW (ACPI_INFO, ("*not a Buffer* \n"));
547 DUMP_STACK_ENTRY (EntryDesc->FieldUnit.Container);
553 case ACPI_TYPE_EVENT:
555 DEBUG_PRINT_RAW (ACPI_INFO, ("Event\n"));
559 case ACPI_TYPE_METHOD:
561 DEBUG_PRINT_RAW (ACPI_INFO,
562 ("Method(%X) @ %p:%lX\n",
563 EntryDesc->Method.ParamCount,
564 EntryDesc->Method.Pcode, EntryDesc->Method.PcodeLength));
568 case ACPI_TYPE_MUTEX:
570 DEBUG_PRINT_RAW (ACPI_INFO, ("Mutex\n"));
574 case ACPI_TYPE_DEVICE:
576 DEBUG_PRINT_RAW (ACPI_INFO, ("Device\n"));
580 case ACPI_TYPE_POWER:
582 DEBUG_PRINT_RAW (ACPI_INFO, ("Power\n"));
586 case ACPI_TYPE_PROCESSOR:
588 DEBUG_PRINT_RAW (ACPI_INFO, ("Processor\n"));
592 case ACPI_TYPE_THERMAL:
594 DEBUG_PRINT_RAW (ACPI_INFO, ("Thermal\n"));
599 /* unknown EntryDesc->Common.Type value */
601 DEBUG_PRINT_RAW (ACPI_INFO, ("Unknown Type %X\n",
602 EntryDesc->Common.Type));
604 /* Back up to previous entry */
609 /* TBD: [Restructure] Change to use dump object routine !! */
610 /* What is all of this?? */
612 DUMP_BUFFER (EntryDesc, sizeof (ACPI_OPERAND_OBJECT));
613 DUMP_BUFFER (++EntryDesc, sizeof (ACPI_OPERAND_OBJECT));
614 DUMP_BUFFER (++EntryDesc, sizeof (ACPI_OPERAND_OBJECT));
623 /*****************************************************************************
625 * FUNCTION: AcpiAmlDumpOperands
627 * PARAMETERS: InterpreterMode - Load or Exec
628 * *Ident - Identification
629 * NumLevels - # of stack entries to dump above line
630 * *Note - Output notation
632 * DESCRIPTION: Dump the object stack
634 ****************************************************************************/
637 AcpiAmlDumpOperands (
638 ACPI_OPERAND_OBJECT **Operands,
639 OPERATING_MODE InterpreterMode,
643 NATIVE_CHAR *ModuleName,
647 ACPI_OPERAND_OBJECT **EntryDesc;
661 DEBUG_PRINT (ACPI_INFO,
662 ("************* AcpiAmlDumpOperands Mode=%X ******************\n",
664 DEBUG_PRINT (ACPI_INFO,
665 ("From %12s(%d) %s: %s\n", ModuleName, LineNumber, Ident, Note));
670 /* Dump the stack starting at the top, working down */
672 for (i = 0; NumLevels > 0; i--, NumLevels--)
674 EntryDesc = &Operands[i];
676 if (ACPI_FAILURE (AcpiAmlDumpOperand (*EntryDesc)))
686 /*****************************************************************************
688 * FUNCTION: AcpiAmlDumpNode
690 * PARAMETERS: *Node - Descriptor to dump
691 * Flags - Force display
693 * DESCRIPTION: Dumps the members of the given.Node
695 ****************************************************************************/
699 ACPI_NAMESPACE_NODE *Node,
705 if (!((TRACE_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
712 AcpiOsPrintf ("%20s : %4.4s\n", "Name", &Node->Name);
713 AcpiOsPrintf ("%20s : %s\n", "Type", AcpiCmGetTypeName (Node->Type));
714 AcpiOsPrintf ("%20s : %X\n", "Flags", Node->Flags);
715 AcpiOsPrintf ("%20s : %X\n", "Owner Id", Node->OwnerId);
716 AcpiOsPrintf ("%20s : %X\n", "Reference Count", Node->ReferenceCount);
717 AcpiOsPrintf ("%20s : %p\n", "Attached Object", Node->Object);
718 AcpiOsPrintf ("%20s : %p\n", "ChildList", Node->Child);
719 AcpiOsPrintf ("%20s : %p\n", "NextPeer", Node->Peer);
720 AcpiOsPrintf ("%20s : %p\n", "Parent", AcpiNsGetParentObject (Node));
724 /*****************************************************************************
726 * FUNCTION: AcpiAmlDumpObjectDescriptor
728 * PARAMETERS: *Object - Descriptor to dump
729 * Flags - Force display
731 * DESCRIPTION: Dumps the members of the object descriptor given.
733 ****************************************************************************/
736 AcpiAmlDumpObjectDescriptor (
737 ACPI_OPERAND_OBJECT *ObjDesc,
740 FUNCTION_TRACE ("AmlDumpObjectDescriptor");
745 if (!((TRACE_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
751 if (!(VALID_DESCRIPTOR_TYPE (ObjDesc, ACPI_DESC_TYPE_INTERNAL)))
753 AcpiOsPrintf ("%p is not a valid ACPI object\n", ObjDesc);
759 AcpiOsPrintf ("%20s : %X\n", "Reference Count", ObjDesc->Common.ReferenceCount);
760 AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Common.Flags);
762 /* Object-specific Fields */
764 switch (ObjDesc->Common.Type)
766 case ACPI_TYPE_NUMBER:
768 AcpiOsPrintf ("%20s : %s\n", "Type", "Number");
769 AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->Number.Value);
773 case ACPI_TYPE_STRING:
775 AcpiOsPrintf ("%20s : %s\n", "Type", "String");
776 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->String.Length);
777 AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->String.Pointer);
781 case ACPI_TYPE_BUFFER:
783 AcpiOsPrintf ("%20s : %s\n", "Type", "Buffer");
784 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Buffer.Length);
785 AcpiOsPrintf ("%20s : %X\n", "Sequence", ObjDesc->Buffer.Sequence);
786 AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->Buffer.Pointer);
790 case ACPI_TYPE_PACKAGE:
792 AcpiOsPrintf ("%20s : %s\n", "Type", "Package");
793 AcpiOsPrintf ("%20s : %X\n", "Count", ObjDesc->Package.Count);
794 AcpiOsPrintf ("%20s : %p\n", "Elements", ObjDesc->Package.Elements);
795 AcpiOsPrintf ("%20s : %p\n", "NextElement", ObjDesc->Package.NextElement);
799 case ACPI_TYPE_FIELD_UNIT:
801 AcpiOsPrintf ("%20s : %s\n", "Type", "FieldUnit");
802 AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->FieldUnit.Access);
803 AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->FieldUnit.LockRule);
804 AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->FieldUnit.UpdateRule);
805 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->FieldUnit.Length);
806 AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->FieldUnit.BitOffset);
807 AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->FieldUnit.Offset);
808 AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->FieldUnit.Container);
812 case ACPI_TYPE_DEVICE:
814 AcpiOsPrintf ("%20s : %s\n", "Type", "Device");
815 AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Device.AddrHandler);
816 AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->Device.SysHandler);
817 AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->Device.DrvHandler);
820 case ACPI_TYPE_EVENT:
822 AcpiOsPrintf ("%20s : %s\n", "Type", "Event");
823 AcpiOsPrintf ("%20s : %X\n", "Semaphore", ObjDesc->Event.Semaphore);
827 case ACPI_TYPE_METHOD:
829 AcpiOsPrintf ("%20s : %s\n", "Type", "Method");
830 AcpiOsPrintf ("%20s : %X\n", "ParamCount", ObjDesc->Method.ParamCount);
831 AcpiOsPrintf ("%20s : %X\n", "Concurrency", ObjDesc->Method.Concurrency);
832 AcpiOsPrintf ("%20s : %p\n", "Semaphore", ObjDesc->Method.Semaphore);
833 AcpiOsPrintf ("%20s : %X\n", "PcodeLength", ObjDesc->Method.PcodeLength);
834 AcpiOsPrintf ("%20s : %X\n", "Pcode", ObjDesc->Method.Pcode);
838 case ACPI_TYPE_MUTEX:
840 AcpiOsPrintf ("%20s : %s\n", "Type", "Mutex");
841 AcpiOsPrintf ("%20s : %X\n", "SyncLevel", ObjDesc->Mutex.SyncLevel);
842 AcpiOsPrintf ("%20s : %p\n", "Semaphore", ObjDesc->Mutex.Semaphore);
846 case ACPI_TYPE_REGION:
848 AcpiOsPrintf ("%20s : %s\n", "Type", "Region");
849 AcpiOsPrintf ("%20s : %X\n", "SpaceId", ObjDesc->Region.SpaceId);
850 AcpiOsPrintf ("%20s : %X\n", "Flags", ObjDesc->Region.Flags);
851 AcpiOsPrintf ("%20s : %X\n", "Address", ObjDesc->Region.Address);
852 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Region.Length);
853 AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Region.AddrHandler);
854 AcpiOsPrintf ("%20s : %p\n", "Next", ObjDesc->Region.Next);
858 case ACPI_TYPE_POWER:
860 AcpiOsPrintf ("%20s : %s\n", "Type", "PowerResource");
861 AcpiOsPrintf ("%20s : %X\n", "SystemLevel", ObjDesc->PowerResource.SystemLevel);
862 AcpiOsPrintf ("%20s : %X\n", "ResourceOrder", ObjDesc->PowerResource.ResourceOrder);
863 AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->PowerResource.SysHandler);
864 AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->PowerResource.DrvHandler);
868 case ACPI_TYPE_PROCESSOR:
870 AcpiOsPrintf ("%20s : %s\n", "Type", "Processor");
871 AcpiOsPrintf ("%20s : %X\n", "Processor ID", ObjDesc->Processor.ProcId);
872 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Processor.Length);
873 AcpiOsPrintf ("%20s : %X\n", "Address", ObjDesc->Processor.Address);
874 AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->Processor.SysHandler);
875 AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->Processor.DrvHandler);
876 AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->Processor.AddrHandler);
880 case ACPI_TYPE_THERMAL:
882 AcpiOsPrintf ("%20s : %s\n", "Type", "ThermalZone");
883 AcpiOsPrintf ("%20s : %p\n", "SysHandler", ObjDesc->ThermalZone.SysHandler);
884 AcpiOsPrintf ("%20s : %p\n", "DrvHandler", ObjDesc->ThermalZone.DrvHandler);
885 AcpiOsPrintf ("%20s : %p\n", "AddrHandler", ObjDesc->ThermalZone.AddrHandler);
888 case INTERNAL_TYPE_BANK_FIELD:
890 AcpiOsPrintf ("%20s : %s\n", "Type", "BankField");
891 AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->BankField.Access);
892 AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->BankField.LockRule);
893 AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->BankField.UpdateRule);
894 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->BankField.Length);
895 AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->BankField.BitOffset);
896 AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->BankField.Offset);
897 AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->BankField.Value);
898 AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->BankField.Container);
899 AcpiOsPrintf ("%20s : %X\n", "BankSelect", ObjDesc->BankField.BankSelect);
903 case INTERNAL_TYPE_INDEX_FIELD:
905 AcpiOsPrintf ("%20s : %s\n", "Type", "IndexField");
906 AcpiOsPrintf ("%20s : %X\n", "Access", ObjDesc->IndexField.Access);
907 AcpiOsPrintf ("%20s : %X\n", "LockRule", ObjDesc->IndexField.LockRule);
908 AcpiOsPrintf ("%20s : %X\n", "UpdateRule", ObjDesc->IndexField.UpdateRule);
909 AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->IndexField.Length);
910 AcpiOsPrintf ("%20s : %X\n", "BitOffset", ObjDesc->IndexField.BitOffset);
911 AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->IndexField.Value);
912 AcpiOsPrintf ("%20s : %X\n", "Index", ObjDesc->IndexField.Index);
913 AcpiOsPrintf ("%20s : %X\n", "Data", ObjDesc->IndexField.Data);
917 case INTERNAL_TYPE_REFERENCE:
919 AcpiOsPrintf ("%20s : %s\n", "Type", "Reference");
920 AcpiOsPrintf ("%20s : %X\n", "TargetType", ObjDesc->Reference.TargetType);
921 AcpiOsPrintf ("%20s : %X\n", "OpCode", ObjDesc->Reference.OpCode);
922 AcpiOsPrintf ("%20s : %X\n", "Offset", ObjDesc->Reference.Offset);
923 AcpiOsPrintf ("%20s : %p\n", "ObjDesc", ObjDesc->Reference.Object);
924 AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->Reference.Node);
925 AcpiOsPrintf ("%20s : %p\n", "Where", ObjDesc->Reference.Where);
929 case INTERNAL_TYPE_ADDRESS_HANDLER:
931 AcpiOsPrintf ("%20s : %s\n", "Type", "Address Handler");
932 AcpiOsPrintf ("%20s : %X\n", "SpaceId", ObjDesc->AddrHandler.SpaceId);
933 AcpiOsPrintf ("%20s : %p\n", "Next", ObjDesc->AddrHandler.Next);
934 AcpiOsPrintf ("%20s : %p\n", "RegionList", ObjDesc->AddrHandler.RegionList);
935 AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->AddrHandler.Node);
936 AcpiOsPrintf ("%20s : %p\n", "Handler", ObjDesc->AddrHandler.Handler);
937 AcpiOsPrintf ("%20s : %p\n", "Context", ObjDesc->AddrHandler.Context);
941 case INTERNAL_TYPE_NOTIFY:
943 AcpiOsPrintf ("%20s : %s\n", "Type", "Notify Handler");
944 AcpiOsPrintf ("%20s : %p\n", "Node", ObjDesc->NotifyHandler.Node);
945 AcpiOsPrintf ("%20s : %p\n", "Handler", ObjDesc->NotifyHandler.Handler);
946 AcpiOsPrintf ("%20s : %p\n", "Context", ObjDesc->NotifyHandler.Context);
950 case INTERNAL_TYPE_DEF_FIELD:
952 AcpiOsPrintf ("%20s : %p\n", "Granularity", ObjDesc->Field.Granularity);
953 AcpiOsPrintf ("%20s : %p\n", "Length", ObjDesc->Field.Length);
954 AcpiOsPrintf ("%20s : %p\n", "Offset", ObjDesc->Field.Offset);
955 AcpiOsPrintf ("%20s : %p\n", "BitOffset", ObjDesc->Field.BitOffset);
956 AcpiOsPrintf ("%20s : %p\n", "Container", ObjDesc->Field.Container);
960 case INTERNAL_TYPE_ALIAS:
961 case INTERNAL_TYPE_DEF_FIELD_DEFN:
962 case INTERNAL_TYPE_BANK_FIELD_DEFN:
963 case INTERNAL_TYPE_INDEX_FIELD_DEFN:
964 case INTERNAL_TYPE_IF:
965 case INTERNAL_TYPE_ELSE:
966 case INTERNAL_TYPE_WHILE:
967 case INTERNAL_TYPE_SCOPE:
968 case INTERNAL_TYPE_DEF_ANY:
970 AcpiOsPrintf ("*** Structure display not implemented for type %X! ***\n",
971 ObjDesc->Common.Type);
977 AcpiOsPrintf ("*** Cannot display unknown type %X! ***\n", ObjDesc->Common.Type);