Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/drivers/acpica/exdump.c need to be fixed.

0001 /******************************************************************************
0002  *
0003  * Module Name: exdump - Interpreter debug output routines
0004  *
0005  *****************************************************************************/
0006 
0007 /******************************************************************************
0008  *
0009  * 1. Copyright Notice
0010  *
0011  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
0012  * All rights reserved.
0013  *
0014  * 2. License
0015  *
0016  * 2.1. This is your license from Intel Corp. under its intellectual property
0017  * rights.  You may have additional license terms from the party that provided
0018  * you this software, covering your right to use that party's intellectual
0019  * property rights.
0020  *
0021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0022  * copy of the source code appearing in this file ("Covered Code") an
0023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0024  * base code distributed originally by Intel ("Original Intel Code") to copy,
0025  * make derivatives, distribute, use and display any portion of the Covered
0026  * Code in any form, with the right to sublicense such rights; and
0027  *
0028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0029  * license (with the right to sublicense), under only those claims of Intel
0030  * patents that are infringed by the Original Intel Code, to make, use, sell,
0031  * offer to sell, and import the Covered Code and derivative works thereof
0032  * solely to the minimum extent necessary to exercise the above copyright
0033  * license, and in no event shall the patent license extend to any additions
0034  * to or modifications of the Original Intel Code.  No other license or right
0035  * is granted directly or by implication, estoppel or otherwise;
0036  *
0037  * The above copyright and patent license is granted only if the following
0038  * conditions are met:
0039  *
0040  * 3. Conditions
0041  *
0042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0043  * Redistribution of source code of any substantial portion of the Covered
0044  * Code or modification with rights to further distribute source must include
0045  * the above Copyright Notice, the above License, this list of Conditions,
0046  * and the following Disclaimer and Export Compliance provision.  In addition,
0047  * Licensee must cause all Covered Code to which Licensee contributes to
0048  * contain a file documenting the changes Licensee made to create that Covered
0049  * Code and the date of any change.  Licensee must include in that file the
0050  * documentation of any changes made by any predecessor Licensee.  Licensee
0051  * must include a prominent statement that the modification is derived,
0052  * directly or indirectly, from Original Intel Code.
0053  *
0054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0055  * Redistribution of source code of any substantial portion of the Covered
0056  * Code or modification without rights to further distribute source must
0057  * include the following Disclaimer and Export Compliance provision in the
0058  * documentation and/or other materials provided with distribution.  In
0059  * addition, Licensee may not authorize further sublicense of source of any
0060  * portion of the Covered Code, and must include terms to the effect that the
0061  * license from Licensee to its licensee is limited to the intellectual
0062  * property embodied in the software Licensee provides to its licensee, and
0063  * not to intellectual property embodied in modifications its licensee may
0064  * make.
0065  *
0066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0067  * substantial portion of the Covered Code or modification must reproduce the
0068  * above Copyright Notice, and the following Disclaimer and Export Compliance
0069  * provision in the documentation and/or other materials provided with the
0070  * distribution.
0071  *
0072  * 3.4. Intel retains all right, title, and interest in and to the Original
0073  * Intel Code.
0074  *
0075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0076  * Intel shall be used in advertising or otherwise to promote the sale, use or
0077  * other dealings in products derived from or relating to the Covered Code
0078  * without prior written authorization from Intel.
0079  *
0080  * 4. Disclaimer and Export Compliance
0081  *
0082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0083  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
0085  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
0086  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
0087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0088  * PARTICULAR PURPOSE.
0089  *
0090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
0096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0097  * LIMITED REMEDY.
0098  *
0099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0100  * software or system incorporating such software without first obtaining any
0101  * required license or other approval from the U. S. Department of Commerce or
0102  * any other agency or department of the United States Government.  In the
0103  * event Licensee exports any such software from the United States or
0104  * re-exports any such software from a foreign destination, Licensee shall
0105  * ensure that the distribution and export/re-export of the software is in
0106  * compliance with all laws, regulations, orders, or other restrictions of the
0107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0108  * any of its subsidiaries will export/re-export any technical data, process,
0109  * software, or service, directly or indirectly, to any country for which the
0110  * United States government or any agency thereof requires an export license,
0111  * other governmental approval, or letter of assurance, without first obtaining
0112  * such license, approval or letter.
0113  *
0114  *****************************************************************************/
0115 
0116 #define __EXDUMP_C__
0117 
0118 #include "acpi.h"
0119 #include "accommon.h"
0120 #include "acinterp.h"
0121 #include "amlcode.h"
0122 #include "acnamesp.h"
0123 
0124 
0125 #define _COMPONENT          ACPI_EXECUTER
0126         ACPI_MODULE_NAME    ("exdump")
0127 
0128 /*
0129  * The following routines are used for debug output only
0130  */
0131 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
0132 
0133 /* Local prototypes */
0134 
0135 static void
0136 AcpiExOutString (
0137     char                    *Title,
0138     char                    *Value);
0139 
0140 static void
0141 AcpiExOutPointer (
0142     char                    *Title,
0143     void                    *Value);
0144 
0145 static void
0146 AcpiExDumpObject (
0147     ACPI_OPERAND_OBJECT     *ObjDesc,
0148     ACPI_EXDUMP_INFO        *Info);
0149 
0150 static void
0151 AcpiExDumpReferenceObj (
0152     ACPI_OPERAND_OBJECT     *ObjDesc);
0153 
0154 static void
0155 AcpiExDumpPackageObj (
0156     ACPI_OPERAND_OBJECT     *ObjDesc,
0157     UINT32                  Level,
0158     UINT32                  Index);
0159 
0160 
0161 /*******************************************************************************
0162  *
0163  * Object Descriptor info tables
0164  *
0165  * Note: The first table entry must be an INIT opcode and must contain
0166  * the table length (number of table entries)
0167  *
0168  ******************************************************************************/
0169 
0170 static ACPI_EXDUMP_INFO     AcpiExDumpInteger[2] =
0171 {
0172     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpInteger),        NULL},
0173     {ACPI_EXD_UINT64,   ACPI_EXD_OFFSET (Integer.Value),                "Value"}
0174 };
0175 
0176 static ACPI_EXDUMP_INFO     AcpiExDumpString[4] =
0177 {
0178     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpString),         NULL},
0179     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (String.Length),                "Length"},
0180     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (String.Pointer),               "Pointer"},
0181     {ACPI_EXD_STRING,   0,                                              NULL}
0182 };
0183 
0184 static ACPI_EXDUMP_INFO     AcpiExDumpBuffer[5] =
0185 {
0186     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpBuffer),         NULL},
0187     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Buffer.Length),                "Length"},
0188     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Buffer.Pointer),               "Pointer"},
0189     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Buffer.Node),                  "Parent Node"},
0190     {ACPI_EXD_BUFFER,   0,                                              NULL}
0191 };
0192 
0193 static ACPI_EXDUMP_INFO     AcpiExDumpPackage[5] =
0194 {
0195     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpPackage),        NULL},
0196     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Package.Flags),                "Flags"},
0197     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Package.Count),                "Elements"},
0198     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Package.Elements),             "Element List"},
0199     {ACPI_EXD_PACKAGE,  0,                                              NULL}
0200 };
0201 
0202 static ACPI_EXDUMP_INFO     AcpiExDumpDevice[4] =
0203 {
0204     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice),         NULL},
0205     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.Handler),               "Handler"},
0206     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.SystemNotify),          "System Notify"},
0207     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.DeviceNotify),          "Device Notify"}
0208 };
0209 
0210 static ACPI_EXDUMP_INFO     AcpiExDumpEvent[2] =
0211 {
0212     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpEvent),          NULL},
0213     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Event.OsSemaphore),            "OsSemaphore"}
0214 };
0215 
0216 static ACPI_EXDUMP_INFO     AcpiExDumpMethod[9] =
0217 {
0218     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpMethod),         NULL},
0219     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.MethodFlags),           "Method Flags"},
0220     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.ParamCount),            "Parameter Count"},
0221     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.SyncLevel),             "Sync Level"},
0222     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Method.Mutex),                 "Mutex"},
0223     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.OwnerId),               "Owner Id"},
0224     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.ThreadCount),           "Thread Count"},
0225     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Method.AmlLength),             "Aml Length"},
0226     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Method.AmlStart),              "Aml Start"}
0227 };
0228 
0229 static ACPI_EXDUMP_INFO     AcpiExDumpMutex[5] =
0230 {
0231     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpMutex),          NULL},
0232     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Mutex.SyncLevel),              "Sync Level"},
0233     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Mutex.OwnerThread),            "Owner Thread"},
0234     {ACPI_EXD_UINT16,   ACPI_EXD_OFFSET (Mutex.AcquisitionDepth),       "Acquire Depth"},
0235     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Mutex.OsMutex),                "OsMutex"}
0236 };
0237 
0238 static ACPI_EXDUMP_INFO     AcpiExDumpRegion[7] =
0239 {
0240     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpRegion),         NULL},
0241     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Region.SpaceId),               "Space Id"},
0242     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Region.Flags),                 "Flags"},
0243     {ACPI_EXD_ADDRESS,  ACPI_EXD_OFFSET (Region.Address),               "Address"},
0244     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Region.Length),                "Length"},
0245     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Region.Handler),               "Handler"},
0246     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Region.Next),                  "Next"}
0247 };
0248 
0249 static ACPI_EXDUMP_INFO     AcpiExDumpPower[5] =
0250 {
0251     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpPower),          NULL},
0252     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.SystemLevel),    "System Level"},
0253     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.ResourceOrder),  "Resource Order"},
0254     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.SystemNotify),   "System Notify"},
0255     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.DeviceNotify),   "Device Notify"}
0256 };
0257 
0258 static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
0259 {
0260     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpProcessor),      NULL},
0261     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Processor.ProcId),             "Processor ID"},
0262     {ACPI_EXD_UINT8 ,   ACPI_EXD_OFFSET (Processor.Length),             "Length"},
0263     {ACPI_EXD_ADDRESS,  ACPI_EXD_OFFSET (Processor.Address),            "Address"},
0264     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.SystemNotify),       "System Notify"},
0265     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.DeviceNotify),       "Device Notify"},
0266     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.Handler),            "Handler"}
0267 };
0268 
0269 static ACPI_EXDUMP_INFO     AcpiExDumpThermal[4] =
0270 {
0271     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal),        NULL},
0272     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.SystemNotify),     "System Notify"},
0273     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.DeviceNotify),     "Device Notify"},
0274     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.Handler),          "Handler"}
0275 };
0276 
0277 static ACPI_EXDUMP_INFO     AcpiExDumpBufferField[3] =
0278 {
0279     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpBufferField),    NULL},
0280     {ACPI_EXD_FIELD,    0,                                              NULL},
0281     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (BufferField.BufferObj),        "Buffer Object"}
0282 };
0283 
0284 static ACPI_EXDUMP_INFO     AcpiExDumpRegionField[3] =
0285 {
0286     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpRegionField),    NULL},
0287     {ACPI_EXD_FIELD,    0,                                              NULL},
0288     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Field.RegionObj),              "Region Object"}
0289 };
0290 
0291 static ACPI_EXDUMP_INFO     AcpiExDumpBankField[5] =
0292 {
0293     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpBankField),      NULL},
0294     {ACPI_EXD_FIELD,    0,                                              NULL},
0295     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (BankField.Value),              "Value"},
0296     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (BankField.RegionObj),          "Region Object"},
0297     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (BankField.BankObj),            "Bank Object"}
0298 };
0299 
0300 static ACPI_EXDUMP_INFO     AcpiExDumpIndexField[5] =
0301 {
0302     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpBankField),      NULL},
0303     {ACPI_EXD_FIELD,    0,                                              NULL},
0304     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (IndexField.Value),             "Value"},
0305     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (IndexField.IndexObj),          "Index Object"},
0306     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (IndexField.DataObj),           "Data Object"}
0307 };
0308 
0309 static ACPI_EXDUMP_INFO     AcpiExDumpReference[8] =
0310 {
0311     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpReference),       NULL},
0312     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Reference.Class),              "Class"},
0313     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Reference.TargetType),         "Target Type"},
0314     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Reference.Value),              "Value"},
0315     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Reference.Object),             "Object Desc"},
0316     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Reference.Node),               "Node"},
0317     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Reference.Where),              "Where"},
0318     {ACPI_EXD_REFERENCE,0,                                              NULL}
0319 };
0320 
0321 static ACPI_EXDUMP_INFO     AcpiExDumpAddressHandler[6] =
0322 {
0323     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpAddressHandler), NULL},
0324     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (AddressSpace.SpaceId),         "Space Id"},
0325     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Next),            "Next"},
0326     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.RegionList),      "Region List"},
0327     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Node),            "Node"},
0328     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Context),         "Context"}
0329 };
0330 
0331 static ACPI_EXDUMP_INFO     AcpiExDumpNotify[3] =
0332 {
0333     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify),         NULL},
0334     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Node),                  "Node"},
0335     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"}
0336 };
0337 
0338 
0339 /* Miscellaneous tables */
0340 
0341 static ACPI_EXDUMP_INFO     AcpiExDumpCommon[4] =
0342 {
0343     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpCommon),         NULL},
0344     {ACPI_EXD_TYPE ,    0,                                              NULL},
0345     {ACPI_EXD_UINT16,   ACPI_EXD_OFFSET (Common.ReferenceCount),        "Reference Count"},
0346     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Common.Flags),                 "Flags"}
0347 };
0348 
0349 static ACPI_EXDUMP_INFO     AcpiExDumpFieldCommon[7] =
0350 {
0351     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpFieldCommon),    NULL},
0352     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (CommonField.FieldFlags),       "Field Flags"},
0353     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (CommonField.AccessByteWidth),  "Access Byte Width"},
0354     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (CommonField.BitLength),        "Bit Length"},
0355     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (CommonField.StartFieldBitOffset),"Field Bit Offset"},
0356     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (CommonField.BaseByteOffset),   "Base Byte Offset"},
0357     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (CommonField.Node),             "Parent Node"}
0358 };
0359 
0360 static ACPI_EXDUMP_INFO     AcpiExDumpNode[5] =
0361 {
0362     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpNode),           NULL},
0363     {ACPI_EXD_UINT8,    ACPI_EXD_NSOFFSET (Flags),                      "Flags"},
0364     {ACPI_EXD_UINT8,    ACPI_EXD_NSOFFSET (OwnerId),                    "Owner Id"},
0365     {ACPI_EXD_POINTER,  ACPI_EXD_NSOFFSET (Child),                      "Child List"},
0366     {ACPI_EXD_POINTER,  ACPI_EXD_NSOFFSET (Peer),                       "Next Peer"}
0367 };
0368 
0369 
0370 /* Dispatch table, indexed by object type */
0371 
0372 static ACPI_EXDUMP_INFO     *AcpiExDumpInfo[] =
0373 {
0374     NULL,
0375     AcpiExDumpInteger,
0376     AcpiExDumpString,
0377     AcpiExDumpBuffer,
0378     AcpiExDumpPackage,
0379     NULL,
0380     AcpiExDumpDevice,
0381     AcpiExDumpEvent,
0382     AcpiExDumpMethod,
0383     AcpiExDumpMutex,
0384     AcpiExDumpRegion,
0385     AcpiExDumpPower,
0386     AcpiExDumpProcessor,
0387     AcpiExDumpThermal,
0388     AcpiExDumpBufferField,
0389     NULL,
0390     NULL,
0391     AcpiExDumpRegionField,
0392     AcpiExDumpBankField,
0393     AcpiExDumpIndexField,
0394     AcpiExDumpReference,
0395     NULL,
0396     NULL,
0397     AcpiExDumpNotify,
0398     AcpiExDumpAddressHandler,
0399     NULL,
0400     NULL,
0401     NULL
0402 };
0403 
0404 
0405 /*******************************************************************************
0406  *
0407  * FUNCTION:    AcpiExDumpObject
0408  *
0409  * PARAMETERS:  ObjDesc             - Descriptor to dump
0410  *              Info                - Info table corresponding to this object
0411  *                                    type
0412  *
0413  * RETURN:      None
0414  *
0415  * DESCRIPTION: Walk the info table for this object
0416  *
0417  ******************************************************************************/
0418 
0419 static void
0420 AcpiExDumpObject (
0421     ACPI_OPERAND_OBJECT     *ObjDesc,
0422     ACPI_EXDUMP_INFO        *Info)
0423 {
0424     UINT8                   *Target;
0425     char                    *Name;
0426     UINT8                   Count;
0427 
0428 
0429     if (!Info)
0430     {
0431         AcpiOsPrintf (
0432             "ExDumpObject: Display not implemented for object type %s\n",
0433             AcpiUtGetObjectTypeName (ObjDesc));
0434         return;
0435     }
0436 
0437     /* First table entry must contain the table length (# of table entries) */
0438 
0439     Count = Info->Offset;
0440 
0441     while (Count)
0442     {
0443         Target = ACPI_ADD_PTR (UINT8, ObjDesc, Info->Offset);
0444         Name = Info->Name;
0445 
0446         switch (Info->Opcode)
0447         {
0448         case ACPI_EXD_INIT:
0449             break;
0450 
0451         case ACPI_EXD_TYPE:
0452 
0453             AcpiExOutString  ("Type", AcpiUtGetObjectTypeName (ObjDesc));
0454             break;
0455 
0456         case ACPI_EXD_UINT8:
0457 
0458             AcpiOsPrintf ("%20s : %2.2X\n", Name, *Target);
0459             break;
0460 
0461         case ACPI_EXD_UINT16:
0462 
0463             AcpiOsPrintf ("%20s : %4.4X\n", Name, ACPI_GET16 (Target));
0464             break;
0465 
0466         case ACPI_EXD_UINT32:
0467 
0468             AcpiOsPrintf ("%20s : %8.8X\n", Name, ACPI_GET32 (Target));
0469             break;
0470 
0471         case ACPI_EXD_UINT64:
0472 
0473             AcpiOsPrintf ("%20s : %8.8X%8.8X\n", "Value",
0474                 ACPI_FORMAT_UINT64 (ACPI_GET64 (Target)));
0475             break;
0476 
0477         case ACPI_EXD_POINTER:
0478         case ACPI_EXD_ADDRESS:
0479 
0480             AcpiExOutPointer (Name, *ACPI_CAST_PTR (void *, Target));
0481             break;
0482 
0483         case ACPI_EXD_STRING:
0484 
0485             AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
0486             AcpiOsPrintf ("\n");
0487             break;
0488 
0489         case ACPI_EXD_BUFFER:
0490 
0491             ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length);
0492             break;
0493 
0494         case ACPI_EXD_PACKAGE:
0495 
0496             /* Dump the package contents */
0497 
0498             AcpiOsPrintf ("\nPackage Contents:\n");
0499             AcpiExDumpPackageObj (ObjDesc, 0, 0);
0500             break;
0501 
0502         case ACPI_EXD_FIELD:
0503 
0504             AcpiExDumpObject (ObjDesc, AcpiExDumpFieldCommon);
0505             break;
0506 
0507         case ACPI_EXD_REFERENCE:
0508 
0509             AcpiExOutString ("Class Name",
0510                 ACPI_CAST_PTR (char, AcpiUtGetReferenceName (ObjDesc)));
0511             AcpiExDumpReferenceObj (ObjDesc);
0512             break;
0513 
0514         default:
0515 
0516             AcpiOsPrintf ("**** Invalid table opcode [%X] ****\n",
0517                 Info->Opcode);
0518             return;
0519         }
0520 
0521         Info++;
0522         Count--;
0523     }
0524 }
0525 
0526 
0527 /*******************************************************************************
0528  *
0529  * FUNCTION:    AcpiExDumpOperand
0530  *
0531  * PARAMETERS:  *ObjDesc        - Pointer to entry to be dumped
0532  *              Depth           - Current nesting depth
0533  *
0534  * RETURN:      None
0535  *
0536  * DESCRIPTION: Dump an operand object
0537  *
0538  ******************************************************************************/
0539 
0540 void
0541 AcpiExDumpOperand (
0542     ACPI_OPERAND_OBJECT     *ObjDesc,
0543     UINT32                  Depth)
0544 {
0545     UINT32                  Length;
0546     UINT32                  Index;
0547 
0548 
0549     ACPI_FUNCTION_NAME (ExDumpOperand)
0550 
0551 
0552     if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
0553     {
0554         return;
0555     }
0556 
0557     if (!ObjDesc)
0558     {
0559         /* This could be a null element of a package */
0560 
0561         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
0562         return;
0563     }
0564 
0565     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
0566     {
0567         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p Namespace Node: ", ObjDesc));
0568         ACPI_DUMP_ENTRY (ObjDesc, ACPI_LV_EXEC);
0569         return;
0570     }
0571 
0572     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
0573     {
0574         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
0575             "%p is not a node or operand object: [%s]\n",
0576             ObjDesc, AcpiUtGetDescriptorName (ObjDesc)));
0577         ACPI_DUMP_BUFFER (ObjDesc, sizeof (ACPI_OPERAND_OBJECT));
0578         return;
0579     }
0580 
0581     /* ObjDesc is a valid object */
0582 
0583     if (Depth > 0)
0584     {
0585         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
0586             Depth, " ", Depth, ObjDesc));
0587     }
0588     else
0589     {
0590         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", ObjDesc));
0591     }
0592 
0593     /* Decode object type */
0594 
0595     switch (ObjDesc->Common.Type)
0596     {
0597     case ACPI_TYPE_LOCAL_REFERENCE:
0598 
0599         AcpiOsPrintf ("Reference: [%s] ", AcpiUtGetReferenceName (ObjDesc));
0600 
0601         switch (ObjDesc->Reference.Class)
0602         {
0603         case ACPI_REFCLASS_DEBUG:
0604 
0605             AcpiOsPrintf ("\n");
0606             break;
0607 
0608 
0609         case ACPI_REFCLASS_INDEX:
0610 
0611             AcpiOsPrintf ("%p\n", ObjDesc->Reference.Object);
0612             break;
0613 
0614 
0615         case ACPI_REFCLASS_TABLE:
0616 
0617             AcpiOsPrintf ("Table Index %X\n", ObjDesc->Reference.Value);
0618             break;
0619 
0620 
0621         case ACPI_REFCLASS_REFOF:
0622 
0623             AcpiOsPrintf ("%p [%s]\n", ObjDesc->Reference.Object,
0624                 AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
0625                     ObjDesc->Reference.Object)->Common.Type));
0626             break;
0627 
0628 
0629         case ACPI_REFCLASS_NAME:
0630 
0631             AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
0632             break;
0633 
0634 
0635         case ACPI_REFCLASS_ARG:
0636         case ACPI_REFCLASS_LOCAL:
0637 
0638             AcpiOsPrintf ("%X\n", ObjDesc->Reference.Value);
0639             break;
0640 
0641 
0642         default:    /* Unknown reference class */
0643 
0644             AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
0645             break;
0646         }
0647         break;
0648 
0649 
0650     case ACPI_TYPE_BUFFER:
0651 
0652         AcpiOsPrintf ("Buffer length %.2X @ %p\n",
0653             ObjDesc->Buffer.Length, ObjDesc->Buffer.Pointer);
0654 
0655         /* Debug only -- dump the buffer contents */
0656 
0657         if (ObjDesc->Buffer.Pointer)
0658         {
0659             Length = ObjDesc->Buffer.Length;
0660             if (Length > 128)
0661             {
0662                 Length = 128;
0663             }
0664 
0665             AcpiOsPrintf ("Buffer Contents: (displaying length 0x%.2X)\n",
0666                 Length);
0667             ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, Length);
0668         }
0669         break;
0670 
0671 
0672     case ACPI_TYPE_INTEGER:
0673 
0674         AcpiOsPrintf ("Integer %8.8X%8.8X\n",
0675             ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
0676         break;
0677 
0678 
0679     case ACPI_TYPE_PACKAGE:
0680 
0681         AcpiOsPrintf ("Package [Len %X] ElementArray %p\n",
0682             ObjDesc->Package.Count, ObjDesc->Package.Elements);
0683 
0684         /*
0685          * If elements exist, package element pointer is valid,
0686          * and debug_level exceeds 1, dump package's elements.
0687          */
0688         if (ObjDesc->Package.Count &&
0689             ObjDesc->Package.Elements &&
0690             AcpiDbgLevel > 1)
0691         {
0692             for (Index = 0; Index < ObjDesc->Package.Count; Index++)
0693             {
0694                 AcpiExDumpOperand (ObjDesc->Package.Elements[Index], Depth+1);
0695             }
0696         }
0697         break;
0698 
0699 
0700     case ACPI_TYPE_REGION:
0701 
0702         AcpiOsPrintf ("Region %s (%X)",
0703             AcpiUtGetRegionName (ObjDesc->Region.SpaceId),
0704             ObjDesc->Region.SpaceId);
0705 
0706         /*
0707          * If the address and length have not been evaluated,
0708          * don't print them.
0709          */
0710         if (!(ObjDesc->Region.Flags & AOPOBJ_DATA_VALID))
0711         {
0712             AcpiOsPrintf ("\n");
0713         }
0714         else
0715         {
0716             AcpiOsPrintf (" base %8.8X%8.8X Length %X\n",
0717                 ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
0718                 ObjDesc->Region.Length);
0719         }
0720         break;
0721 
0722 
0723     case ACPI_TYPE_STRING:
0724 
0725         AcpiOsPrintf ("String length %X @ %p ",
0726             ObjDesc->String.Length,
0727             ObjDesc->String.Pointer);
0728 
0729         AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
0730         AcpiOsPrintf ("\n");
0731         break;
0732 
0733 
0734     case ACPI_TYPE_LOCAL_BANK_FIELD:
0735 
0736         AcpiOsPrintf ("BankField\n");
0737         break;
0738 
0739 
0740     case ACPI_TYPE_LOCAL_REGION_FIELD:
0741 
0742         AcpiOsPrintf ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at "
0743             "byte=%X bit=%X of below:\n",
0744             ObjDesc->Field.BitLength,
0745             ObjDesc->Field.AccessByteWidth,
0746             ObjDesc->Field.FieldFlags & AML_FIELD_LOCK_RULE_MASK,
0747             ObjDesc->Field.FieldFlags & AML_FIELD_UPDATE_RULE_MASK,
0748             ObjDesc->Field.BaseByteOffset,
0749             ObjDesc->Field.StartFieldBitOffset);
0750 
0751         AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
0752         break;
0753 
0754 
0755     case ACPI_TYPE_LOCAL_INDEX_FIELD:
0756 
0757         AcpiOsPrintf ("IndexField\n");
0758         break;
0759 
0760 
0761     case ACPI_TYPE_BUFFER_FIELD:
0762 
0763         AcpiOsPrintf ("BufferField: %X bits at byte %X bit %X of\n",
0764             ObjDesc->BufferField.BitLength,
0765             ObjDesc->BufferField.BaseByteOffset,
0766             ObjDesc->BufferField.StartFieldBitOffset);
0767 
0768         if (!ObjDesc->BufferField.BufferObj)
0769         {
0770             ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL*\n"));
0771         }
0772         else if ((ObjDesc->BufferField.BufferObj)->Common.Type !=
0773                     ACPI_TYPE_BUFFER)
0774         {
0775             AcpiOsPrintf ("*not a Buffer*\n");
0776         }
0777         else
0778         {
0779             AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1);
0780         }
0781         break;
0782 
0783 
0784     case ACPI_TYPE_EVENT:
0785 
0786         AcpiOsPrintf ("Event\n");
0787         break;
0788 
0789 
0790     case ACPI_TYPE_METHOD:
0791 
0792         AcpiOsPrintf ("Method(%X) @ %p:%X\n",
0793             ObjDesc->Method.ParamCount,
0794             ObjDesc->Method.AmlStart,
0795             ObjDesc->Method.AmlLength);
0796         break;
0797 
0798 
0799     case ACPI_TYPE_MUTEX:
0800 
0801         AcpiOsPrintf ("Mutex\n");
0802         break;
0803 
0804 
0805     case ACPI_TYPE_DEVICE:
0806 
0807         AcpiOsPrintf ("Device\n");
0808         break;
0809 
0810 
0811     case ACPI_TYPE_POWER:
0812 
0813         AcpiOsPrintf ("Power\n");
0814         break;
0815 
0816 
0817     case ACPI_TYPE_PROCESSOR:
0818 
0819         AcpiOsPrintf ("Processor\n");
0820         break;
0821 
0822 
0823     case ACPI_TYPE_THERMAL:
0824 
0825         AcpiOsPrintf ("Thermal\n");
0826         break;
0827 
0828 
0829     default:
0830         /* Unknown Type */
0831 
0832         AcpiOsPrintf ("Unknown Type %X\n", ObjDesc->Common.Type);
0833         break;
0834     }
0835 
0836     return;
0837 }
0838 
0839 
0840 /*******************************************************************************
0841  *
0842  * FUNCTION:    AcpiExDumpOperands
0843  *
0844  * PARAMETERS:  Operands            - A list of Operand objects
0845  *              OpcodeName          - AML opcode name
0846  *              NumOperands         - Operand count for this opcode
0847  *
0848  * DESCRIPTION: Dump the operands associated with the opcode
0849  *
0850  ******************************************************************************/
0851 
0852 void
0853 AcpiExDumpOperands (
0854     ACPI_OPERAND_OBJECT     **Operands,
0855     const char              *OpcodeName,
0856     UINT32                  NumOperands)
0857 {
0858     ACPI_FUNCTION_NAME (ExDumpOperands);
0859 
0860 
0861     if (!OpcodeName)
0862     {
0863         OpcodeName = "UNKNOWN";
0864     }
0865 
0866     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
0867         "**** Start operand dump for opcode [%s], %d operands\n",
0868         OpcodeName, NumOperands));
0869 
0870     if (NumOperands == 0)
0871     {
0872         NumOperands = 1;
0873     }
0874 
0875     /* Dump the individual operands */
0876 
0877     while (NumOperands)
0878     {
0879         AcpiExDumpOperand (*Operands, 0);
0880         Operands++;
0881         NumOperands--;
0882     }
0883 
0884     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
0885         "**** End operand dump for [%s]\n", OpcodeName));
0886     return;
0887 }
0888 
0889 
0890 /*******************************************************************************
0891  *
0892  * FUNCTION:    AcpiExOut* functions
0893  *
0894  * PARAMETERS:  Title               - Descriptive text
0895  *              Value               - Value to be displayed
0896  *
0897  * DESCRIPTION: Object dump output formatting functions.  These functions
0898  *              reduce the number of format strings required and keeps them
0899  *              all in one place for easy modification.
0900  *
0901  ******************************************************************************/
0902 
0903 static void
0904 AcpiExOutString (
0905     char                    *Title,
0906     char                    *Value)
0907 {
0908     AcpiOsPrintf ("%20s : %s\n", Title, Value);
0909 }
0910 
0911 static void
0912 AcpiExOutPointer (
0913     char                    *Title,
0914     void                    *Value)
0915 {
0916     AcpiOsPrintf ("%20s : %p\n", Title, Value);
0917 }
0918 
0919 
0920 /*******************************************************************************
0921  *
0922  * FUNCTION:    AcpiExDumpNamespaceNode
0923  *
0924  * PARAMETERS:  Node                - Descriptor to dump
0925  *              Flags               - Force display if TRUE
0926  *
0927  * DESCRIPTION: Dumps the members of the given.Node
0928  *
0929  ******************************************************************************/
0930 
0931 void
0932 AcpiExDumpNamespaceNode (
0933     ACPI_NAMESPACE_NODE     *Node,
0934     UINT32                  Flags)
0935 {
0936 
0937     ACPI_FUNCTION_ENTRY ();
0938 
0939 
0940     if (!Flags)
0941     {
0942         if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
0943         {
0944             return;
0945         }
0946     }
0947 
0948     AcpiOsPrintf ("%20s : %4.4s\n", "Name", AcpiUtGetNodeName (Node));
0949     AcpiExOutString  ("Type", AcpiUtGetTypeName (Node->Type));
0950     AcpiExOutPointer ("Attached Object", AcpiNsGetAttachedObject (Node));
0951     AcpiExOutPointer ("Parent", AcpiNsGetParentNode (Node));
0952 
0953     AcpiExDumpObject (ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Node),
0954         AcpiExDumpNode);
0955 }
0956 
0957 
0958 /*******************************************************************************
0959  *
0960  * FUNCTION:    AcpiExDumpReferenceObj
0961  *
0962  * PARAMETERS:  Object              - Descriptor to dump
0963  *
0964  * DESCRIPTION: Dumps a reference object
0965  *
0966  ******************************************************************************/
0967 
0968 static void
0969 AcpiExDumpReferenceObj (
0970     ACPI_OPERAND_OBJECT     *ObjDesc)
0971 {
0972     ACPI_BUFFER             RetBuf;
0973     ACPI_STATUS             Status;
0974 
0975 
0976     RetBuf.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
0977 
0978     if (ObjDesc->Reference.Class == ACPI_REFCLASS_NAME)
0979     {
0980         AcpiOsPrintf (" %p ", ObjDesc->Reference.Node);
0981 
0982         Status = AcpiNsHandleToPathname (ObjDesc->Reference.Node, &RetBuf);
0983         if (ACPI_FAILURE (Status))
0984         {
0985             AcpiOsPrintf (" Could not convert name to pathname\n");
0986         }
0987         else
0988         {
0989            AcpiOsPrintf ("%s\n", (char *) RetBuf.Pointer);
0990            ACPI_FREE (RetBuf.Pointer);
0991         }
0992     }
0993     else if (ObjDesc->Reference.Object)
0994     {
0995         if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND)
0996         {
0997             AcpiOsPrintf (" Target: %p", ObjDesc->Reference.Object);
0998             if (ObjDesc->Reference.Class == ACPI_REFCLASS_TABLE)
0999             {
1000                 AcpiOsPrintf (" Table Index: %X\n", ObjDesc->Reference.Value);
1001             }
1002             else
1003             {
1004                 AcpiOsPrintf (" Target: %p [%s]\n", ObjDesc->Reference.Object,
1005                     AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
1006                         ObjDesc->Reference.Object)->Common.Type));
1007             }
1008         }
1009         else
1010         {
1011             AcpiOsPrintf (" Target: %p\n", ObjDesc->Reference.Object);
1012         }
1013     }
1014 }
1015 
1016 
1017 /*******************************************************************************
1018  *
1019  * FUNCTION:    AcpiExDumpPackageObj
1020  *
1021  * PARAMETERS:  ObjDesc             - Descriptor to dump
1022  *              Level               - Indentation Level
1023  *              Index               - Package index for this object
1024  *
1025  * DESCRIPTION: Dumps the elements of the package
1026  *
1027  ******************************************************************************/
1028 
1029 static void
1030 AcpiExDumpPackageObj (
1031     ACPI_OPERAND_OBJECT     *ObjDesc,
1032     UINT32                  Level,
1033     UINT32                  Index)
1034 {
1035     UINT32                  i;
1036 
1037 
1038     /* Indentation and index output */
1039 
1040     if (Level > 0)
1041     {
1042         for (i = 0; i < Level; i++)
1043         {
1044             AcpiOsPrintf ("  ");
1045         }
1046 
1047         AcpiOsPrintf ("[%.2d] ", Index);
1048     }
1049 
1050     AcpiOsPrintf ("%p ", ObjDesc);
1051 
1052     /* Null package elements are allowed */
1053 
1054     if (!ObjDesc)
1055     {
1056         AcpiOsPrintf ("[Null Object]\n");
1057         return;
1058     }
1059 
1060     /* Packages may only contain a few object types */
1061 
1062     switch (ObjDesc->Common.Type)
1063     {
1064     case ACPI_TYPE_INTEGER:
1065 
1066         AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
1067             ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
1068         break;
1069 
1070 
1071     case ACPI_TYPE_STRING:
1072 
1073         AcpiOsPrintf ("[String]  Value: ");
1074         for (i = 0; i < ObjDesc->String.Length; i++)
1075         {
1076             AcpiOsPrintf ("%c", ObjDesc->String.Pointer[i]);
1077         }
1078         AcpiOsPrintf ("\n");
1079         break;
1080 
1081 
1082     case ACPI_TYPE_BUFFER:
1083 
1084         AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
1085         if (ObjDesc->Buffer.Length)
1086         {
1087             AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
1088                 ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
1089         }
1090         else
1091         {
1092             AcpiOsPrintf ("\n");
1093         }
1094         break;
1095 
1096 
1097     case ACPI_TYPE_PACKAGE:
1098 
1099         AcpiOsPrintf ("[Package] Contains %d Elements:\n",
1100             ObjDesc->Package.Count);
1101 
1102         for (i = 0; i < ObjDesc->Package.Count; i++)
1103         {
1104             AcpiExDumpPackageObj (ObjDesc->Package.Elements[i], Level+1, i);
1105         }
1106         break;
1107 
1108 
1109     case ACPI_TYPE_LOCAL_REFERENCE:
1110 
1111         AcpiOsPrintf ("[Object Reference] Type [%s] %2.2X",
1112             AcpiUtGetReferenceName (ObjDesc),
1113             ObjDesc->Reference.Class);
1114         AcpiExDumpReferenceObj (ObjDesc);
1115         break;
1116 
1117 
1118     default:
1119 
1120         AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type);
1121         break;
1122     }
1123 }
1124 
1125 
1126 /*******************************************************************************
1127  *
1128  * FUNCTION:    AcpiExDumpObjectDescriptor
1129  *
1130  * PARAMETERS:  ObjDesc             - Descriptor to dump
1131  *              Flags               - Force display if TRUE
1132  *
1133  * DESCRIPTION: Dumps the members of the object descriptor given.
1134  *
1135  ******************************************************************************/
1136 
1137 void
1138 AcpiExDumpObjectDescriptor (
1139     ACPI_OPERAND_OBJECT     *ObjDesc,
1140     UINT32                  Flags)
1141 {
1142     ACPI_FUNCTION_TRACE (ExDumpObjectDescriptor);
1143 
1144 
1145     if (!ObjDesc)
1146     {
1147         return_VOID;
1148     }
1149 
1150     if (!Flags)
1151     {
1152         if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
1153         {
1154             return_VOID;
1155         }
1156     }
1157 
1158     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
1159     {
1160         AcpiExDumpNamespaceNode ((ACPI_NAMESPACE_NODE *) ObjDesc, Flags);
1161 
1162         AcpiOsPrintf ("\nAttached Object (%p):\n",
1163             ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object);
1164 
1165         AcpiExDumpObjectDescriptor (
1166             ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object, Flags);
1167         return_VOID;
1168     }
1169 
1170     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
1171     {
1172         AcpiOsPrintf (
1173             "ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n",
1174             ObjDesc, AcpiUtGetDescriptorName (ObjDesc));
1175         return_VOID;
1176     }
1177 
1178     if (ObjDesc->Common.Type > ACPI_TYPE_NS_NODE_MAX)
1179     {
1180         return_VOID;
1181     }
1182 
1183     /* Common Fields */
1184 
1185     AcpiExDumpObject (ObjDesc, AcpiExDumpCommon);
1186 
1187     /* Object-specific fields */
1188 
1189     AcpiExDumpObject (ObjDesc, AcpiExDumpInfo[ObjDesc->Common.Type]);
1190     return_VOID;
1191 }
1192 
1193 #endif
1194