ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

exdump.c
Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * Module Name: exdump - Interpreter debug output routines
00004  *
00005  *****************************************************************************/
00006 
00007 /******************************************************************************
00008  *
00009  * 1. Copyright Notice
00010  *
00011  * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
00012  * All rights reserved.
00013  *
00014  * 2. License
00015  *
00016  * 2.1. This is your license from Intel Corp. under its intellectual property
00017  * rights.  You may have additional license terms from the party that provided
00018  * you this software, covering your right to use that party's intellectual
00019  * property rights.
00020  *
00021  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
00022  * copy of the source code appearing in this file ("Covered Code") an
00023  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
00024  * base code distributed originally by Intel ("Original Intel Code") to copy,
00025  * make derivatives, distribute, use and display any portion of the Covered
00026  * Code in any form, with the right to sublicense such rights; and
00027  *
00028  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
00029  * license (with the right to sublicense), under only those claims of Intel
00030  * patents that are infringed by the Original Intel Code, to make, use, sell,
00031  * offer to sell, and import the Covered Code and derivative works thereof
00032  * solely to the minimum extent necessary to exercise the above copyright
00033  * license, and in no event shall the patent license extend to any additions
00034  * to or modifications of the Original Intel Code.  No other license or right
00035  * is granted directly or by implication, estoppel or otherwise;
00036  *
00037  * The above copyright and patent license is granted only if the following
00038  * conditions are met:
00039  *
00040  * 3. Conditions
00041  *
00042  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
00043  * Redistribution of source code of any substantial portion of the Covered
00044  * Code or modification with rights to further distribute source must include
00045  * the above Copyright Notice, the above License, this list of Conditions,
00046  * and the following Disclaimer and Export Compliance provision.  In addition,
00047  * Licensee must cause all Covered Code to which Licensee contributes to
00048  * contain a file documenting the changes Licensee made to create that Covered
00049  * Code and the date of any change.  Licensee must include in that file the
00050  * documentation of any changes made by any predecessor Licensee.  Licensee
00051  * must include a prominent statement that the modification is derived,
00052  * directly or indirectly, from Original Intel Code.
00053  *
00054  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
00055  * Redistribution of source code of any substantial portion of the Covered
00056  * Code or modification without rights to further distribute source must
00057  * include the following Disclaimer and Export Compliance provision in the
00058  * documentation and/or other materials provided with distribution.  In
00059  * addition, Licensee may not authorize further sublicense of source of any
00060  * portion of the Covered Code, and must include terms to the effect that the
00061  * license from Licensee to its licensee is limited to the intellectual
00062  * property embodied in the software Licensee provides to its licensee, and
00063  * not to intellectual property embodied in modifications its licensee may
00064  * make.
00065  *
00066  * 3.3. Redistribution of Executable. Redistribution in executable form of any
00067  * substantial portion of the Covered Code or modification must reproduce the
00068  * above Copyright Notice, and the following Disclaimer and Export Compliance
00069  * provision in the documentation and/or other materials provided with the
00070  * distribution.
00071  *
00072  * 3.4. Intel retains all right, title, and interest in and to the Original
00073  * Intel Code.
00074  *
00075  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
00076  * Intel shall be used in advertising or otherwise to promote the sale, use or
00077  * other dealings in products derived from or relating to the Covered Code
00078  * without prior written authorization from Intel.
00079  *
00080  * 4. Disclaimer and Export Compliance
00081  *
00082  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
00083  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
00084  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
00085  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
00086  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
00087  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
00088  * PARTICULAR PURPOSE.
00089  *
00090  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
00091  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
00092  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
00093  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
00094  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
00095  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
00096  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
00097  * LIMITED REMEDY.
00098  *
00099  * 4.3. Licensee shall not export, either directly or indirectly, any of this
00100  * software or system incorporating such software without first obtaining any
00101  * required license or other approval from the U. S. Department of Commerce or
00102  * any other agency or department of the United States Government.  In the
00103  * event Licensee exports any such software from the United States or
00104  * re-exports any such software from a foreign destination, Licensee shall
00105  * ensure that the distribution and export/re-export of the software is in
00106  * compliance with all laws, regulations, orders, or other restrictions of the
00107  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
00108  * any of its subsidiaries will export/re-export any technical data, process,
00109  * software, or service, directly or indirectly, to any country for which the
00110  * United States government or any agency thereof requires an export license,
00111  * other governmental approval, or letter of assurance, without first obtaining
00112  * such license, approval or letter.
00113  *
00114  *****************************************************************************/
00115 
00116 #define __EXDUMP_C__
00117 
00118 #include "acpi.h"
00119 #include "accommon.h"
00120 #include "acinterp.h"
00121 #include "amlcode.h"
00122 #include "acnamesp.h"
00123 
00124 
00125 #define _COMPONENT          ACPI_EXECUTER
00126         ACPI_MODULE_NAME    ("exdump")
00127 
00128 /*
00129  * The following routines are used for debug output only
00130  */
00131 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
00132 
00133 /* Local prototypes */
00134 
00135 static void
00136 AcpiExOutString (
00137     char                    *Title,
00138     char                    *Value);
00139 
00140 static void
00141 AcpiExOutPointer (
00142     char                    *Title,
00143     void                    *Value);
00144 
00145 static void
00146 AcpiExDumpObject (
00147     ACPI_OPERAND_OBJECT     *ObjDesc,
00148     ACPI_EXDUMP_INFO        *Info);
00149 
00150 static void
00151 AcpiExDumpReferenceObj (
00152     ACPI_OPERAND_OBJECT     *ObjDesc);
00153 
00154 static void
00155 AcpiExDumpPackageObj (
00156     ACPI_OPERAND_OBJECT     *ObjDesc,
00157     UINT32                  Level,
00158     UINT32                  Index);
00159 
00160 
00161 /*******************************************************************************
00162  *
00163  * Object Descriptor info tables
00164  *
00165  * Note: The first table entry must be an INIT opcode and must contain
00166  * the table length (number of table entries)
00167  *
00168  ******************************************************************************/
00169 
00170 static ACPI_EXDUMP_INFO     AcpiExDumpInteger[2] =
00171 {
00172     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpInteger),        NULL},
00173     {ACPI_EXD_UINT64,   ACPI_EXD_OFFSET (Integer.Value),                "Value"}
00174 };
00175 
00176 static ACPI_EXDUMP_INFO     AcpiExDumpString[4] =
00177 {
00178     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpString),         NULL},
00179     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (String.Length),                "Length"},
00180     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (String.Pointer),               "Pointer"},
00181     {ACPI_EXD_STRING,   0,                                              NULL}
00182 };
00183 
00184 static ACPI_EXDUMP_INFO     AcpiExDumpBuffer[5] =
00185 {
00186     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpBuffer),         NULL},
00187     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Buffer.Length),                "Length"},
00188     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Buffer.Pointer),               "Pointer"},
00189     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Buffer.Node),                  "Parent Node"},
00190     {ACPI_EXD_BUFFER,   0,                                              NULL}
00191 };
00192 
00193 static ACPI_EXDUMP_INFO     AcpiExDumpPackage[5] =
00194 {
00195     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpPackage),        NULL},
00196     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Package.Flags),                "Flags"},
00197     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Package.Count),                "Elements"},
00198     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Package.Elements),             "Element List"},
00199     {ACPI_EXD_PACKAGE,  0,                                              NULL}
00200 };
00201 
00202 static ACPI_EXDUMP_INFO     AcpiExDumpDevice[4] =
00203 {
00204     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice),         NULL},
00205     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.Handler),               "Handler"},
00206     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.SystemNotify),          "System Notify"},
00207     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Device.DeviceNotify),          "Device Notify"}
00208 };
00209 
00210 static ACPI_EXDUMP_INFO     AcpiExDumpEvent[2] =
00211 {
00212     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpEvent),          NULL},
00213     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Event.OsSemaphore),            "OsSemaphore"}
00214 };
00215 
00216 static ACPI_EXDUMP_INFO     AcpiExDumpMethod[9] =
00217 {
00218     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpMethod),         NULL},
00219     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.InfoFlags),             "Info Flags"},
00220     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.ParamCount),            "Parameter Count"},
00221     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.SyncLevel),             "Sync Level"},
00222     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Method.Mutex),                 "Mutex"},
00223     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.OwnerId),               "Owner Id"},
00224     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Method.ThreadCount),           "Thread Count"},
00225     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Method.AmlLength),             "Aml Length"},
00226     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Method.AmlStart),              "Aml Start"}
00227 };
00228 
00229 static ACPI_EXDUMP_INFO     AcpiExDumpMutex[5] =
00230 {
00231     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpMutex),          NULL},
00232     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Mutex.SyncLevel),              "Sync Level"},
00233     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Mutex.OwnerThread),            "Owner Thread"},
00234     {ACPI_EXD_UINT16,   ACPI_EXD_OFFSET (Mutex.AcquisitionDepth),       "Acquire Depth"},
00235     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Mutex.OsMutex),                "OsMutex"}
00236 };
00237 
00238 static ACPI_EXDUMP_INFO     AcpiExDumpRegion[7] =
00239 {
00240     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpRegion),         NULL},
00241     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Region.SpaceId),               "Space Id"},
00242     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Region.Flags),                 "Flags"},
00243     {ACPI_EXD_ADDRESS,  ACPI_EXD_OFFSET (Region.Address),               "Address"},
00244     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Region.Length),                "Length"},
00245     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Region.Handler),               "Handler"},
00246     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Region.Next),                  "Next"}
00247 };
00248 
00249 static ACPI_EXDUMP_INFO     AcpiExDumpPower[5] =
00250 {
00251     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpPower),          NULL},
00252     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.SystemLevel),    "System Level"},
00253     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (PowerResource.ResourceOrder),  "Resource Order"},
00254     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.SystemNotify),   "System Notify"},
00255     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (PowerResource.DeviceNotify),   "Device Notify"}
00256 };
00257 
00258 static ACPI_EXDUMP_INFO     AcpiExDumpProcessor[7] =
00259 {
00260     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpProcessor),      NULL},
00261     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Processor.ProcId),             "Processor ID"},
00262     {ACPI_EXD_UINT8 ,   ACPI_EXD_OFFSET (Processor.Length),             "Length"},
00263     {ACPI_EXD_ADDRESS,  ACPI_EXD_OFFSET (Processor.Address),            "Address"},
00264     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.SystemNotify),       "System Notify"},
00265     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.DeviceNotify),       "Device Notify"},
00266     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Processor.Handler),            "Handler"}
00267 };
00268 
00269 static ACPI_EXDUMP_INFO     AcpiExDumpThermal[4] =
00270 {
00271     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpThermal),        NULL},
00272     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.SystemNotify),     "System Notify"},
00273     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.DeviceNotify),     "Device Notify"},
00274     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (ThermalZone.Handler),          "Handler"}
00275 };
00276 
00277 static ACPI_EXDUMP_INFO     AcpiExDumpBufferField[3] =
00278 {
00279     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpBufferField),    NULL},
00280     {ACPI_EXD_FIELD,    0,                                              NULL},
00281     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (BufferField.BufferObj),        "Buffer Object"}
00282 };
00283 
00284 static ACPI_EXDUMP_INFO     AcpiExDumpRegionField[3] =
00285 {
00286     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpRegionField),    NULL},
00287     {ACPI_EXD_FIELD,    0,                                              NULL},
00288     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Field.RegionObj),              "Region Object"}
00289 };
00290 
00291 static ACPI_EXDUMP_INFO     AcpiExDumpBankField[5] =
00292 {
00293     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpBankField),      NULL},
00294     {ACPI_EXD_FIELD,    0,                                              NULL},
00295     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (BankField.Value),              "Value"},
00296     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (BankField.RegionObj),          "Region Object"},
00297     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (BankField.BankObj),            "Bank Object"}
00298 };
00299 
00300 static ACPI_EXDUMP_INFO     AcpiExDumpIndexField[5] =
00301 {
00302     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpBankField),      NULL},
00303     {ACPI_EXD_FIELD,    0,                                              NULL},
00304     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (IndexField.Value),             "Value"},
00305     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (IndexField.IndexObj),          "Index Object"},
00306     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (IndexField.DataObj),           "Data Object"}
00307 };
00308 
00309 static ACPI_EXDUMP_INFO     AcpiExDumpReference[8] =
00310 {
00311     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpReference),       NULL},
00312     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Reference.Class),              "Class"},
00313     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Reference.TargetType),         "Target Type"},
00314     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (Reference.Value),              "Value"},
00315     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Reference.Object),             "Object Desc"},
00316     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Reference.Node),               "Node"},
00317     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Reference.Where),              "Where"},
00318     {ACPI_EXD_REFERENCE,0,                                              NULL}
00319 };
00320 
00321 static ACPI_EXDUMP_INFO     AcpiExDumpAddressHandler[6] =
00322 {
00323     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpAddressHandler), NULL},
00324     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (AddressSpace.SpaceId),         "Space Id"},
00325     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Next),            "Next"},
00326     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.RegionList),      "Region List"},
00327     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Node),            "Node"},
00328     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (AddressSpace.Context),         "Context"}
00329 };
00330 
00331 static ACPI_EXDUMP_INFO     AcpiExDumpNotify[3] =
00332 {
00333     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify),         NULL},
00334     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Node),                  "Node"},
00335     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (Notify.Context),               "Context"}
00336 };
00337 
00338 
00339 /* Miscellaneous tables */
00340 
00341 static ACPI_EXDUMP_INFO     AcpiExDumpCommon[4] =
00342 {
00343     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpCommon),         NULL},
00344     {ACPI_EXD_TYPE ,    0,                                              NULL},
00345     {ACPI_EXD_UINT16,   ACPI_EXD_OFFSET (Common.ReferenceCount),        "Reference Count"},
00346     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (Common.Flags),                 "Flags"}
00347 };
00348 
00349 static ACPI_EXDUMP_INFO     AcpiExDumpFieldCommon[7] =
00350 {
00351     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpFieldCommon),    NULL},
00352     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (CommonField.FieldFlags),       "Field Flags"},
00353     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (CommonField.AccessByteWidth),  "Access Byte Width"},
00354     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (CommonField.BitLength),        "Bit Length"},
00355     {ACPI_EXD_UINT8,    ACPI_EXD_OFFSET (CommonField.StartFieldBitOffset),"Field Bit Offset"},
00356     {ACPI_EXD_UINT32,   ACPI_EXD_OFFSET (CommonField.BaseByteOffset),   "Base Byte Offset"},
00357     {ACPI_EXD_POINTER,  ACPI_EXD_OFFSET (CommonField.Node),             "Parent Node"}
00358 };
00359 
00360 static ACPI_EXDUMP_INFO     AcpiExDumpNode[5] =
00361 {
00362     {ACPI_EXD_INIT,     ACPI_EXD_TABLE_SIZE (AcpiExDumpNode),           NULL},
00363     {ACPI_EXD_UINT8,    ACPI_EXD_NSOFFSET (Flags),                      "Flags"},
00364     {ACPI_EXD_UINT8,    ACPI_EXD_NSOFFSET (OwnerId),                    "Owner Id"},
00365     {ACPI_EXD_POINTER,  ACPI_EXD_NSOFFSET (Child),                      "Child List"},
00366     {ACPI_EXD_POINTER,  ACPI_EXD_NSOFFSET (Peer),                       "Next Peer"}
00367 };
00368 
00369 
00370 /* Dispatch table, indexed by object type */
00371 
00372 static ACPI_EXDUMP_INFO     *AcpiExDumpInfo[] =
00373 {
00374     NULL,
00375     AcpiExDumpInteger,
00376     AcpiExDumpString,
00377     AcpiExDumpBuffer,
00378     AcpiExDumpPackage,
00379     NULL,
00380     AcpiExDumpDevice,
00381     AcpiExDumpEvent,
00382     AcpiExDumpMethod,
00383     AcpiExDumpMutex,
00384     AcpiExDumpRegion,
00385     AcpiExDumpPower,
00386     AcpiExDumpProcessor,
00387     AcpiExDumpThermal,
00388     AcpiExDumpBufferField,
00389     NULL,
00390     NULL,
00391     AcpiExDumpRegionField,
00392     AcpiExDumpBankField,
00393     AcpiExDumpIndexField,
00394     AcpiExDumpReference,
00395     NULL,
00396     NULL,
00397     AcpiExDumpNotify,
00398     AcpiExDumpAddressHandler,
00399     NULL,
00400     NULL,
00401     NULL
00402 };
00403 
00404 
00405 /*******************************************************************************
00406  *
00407  * FUNCTION:    AcpiExDumpObject
00408  *
00409  * PARAMETERS:  ObjDesc             - Descriptor to dump
00410  *              Info                - Info table corresponding to this object
00411  *                                    type
00412  *
00413  * RETURN:      None
00414  *
00415  * DESCRIPTION: Walk the info table for this object
00416  *
00417  ******************************************************************************/
00418 
00419 static void
00420 AcpiExDumpObject (
00421     ACPI_OPERAND_OBJECT     *ObjDesc,
00422     ACPI_EXDUMP_INFO        *Info)
00423 {
00424     UINT8                   *Target;
00425     char                    *Name;
00426     UINT8                   Count;
00427 
00428 
00429     if (!Info)
00430     {
00431         AcpiOsPrintf (
00432             "ExDumpObject: Display not implemented for object type %s\n",
00433             AcpiUtGetObjectTypeName (ObjDesc));
00434         return;
00435     }
00436 
00437     /* First table entry must contain the table length (# of table entries) */
00438 
00439     Count = Info->Offset;
00440 
00441     while (Count)
00442     {
00443         Target = ACPI_ADD_PTR (UINT8, ObjDesc, Info->Offset);
00444         Name = Info->Name;
00445 
00446         switch (Info->Opcode)
00447         {
00448         case ACPI_EXD_INIT:
00449             break;
00450 
00451         case ACPI_EXD_TYPE:
00452 
00453             AcpiExOutString  ("Type", AcpiUtGetObjectTypeName (ObjDesc));
00454             break;
00455 
00456         case ACPI_EXD_UINT8:
00457 
00458             AcpiOsPrintf ("%20s : %2.2X\n", Name, *Target);
00459             break;
00460 
00461         case ACPI_EXD_UINT16:
00462 
00463             AcpiOsPrintf ("%20s : %4.4X\n", Name, ACPI_GET16 (Target));
00464             break;
00465 
00466         case ACPI_EXD_UINT32:
00467 
00468             AcpiOsPrintf ("%20s : %8.8X\n", Name, ACPI_GET32 (Target));
00469             break;
00470 
00471         case ACPI_EXD_UINT64:
00472 
00473             AcpiOsPrintf ("%20s : %8.8X%8.8X\n", "Value",
00474                 ACPI_FORMAT_UINT64 (ACPI_GET64 (Target)));
00475             break;
00476 
00477         case ACPI_EXD_POINTER:
00478         case ACPI_EXD_ADDRESS:
00479 
00480             AcpiExOutPointer (Name, *ACPI_CAST_PTR (void *, Target));
00481             break;
00482 
00483         case ACPI_EXD_STRING:
00484 
00485             AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
00486             AcpiOsPrintf ("\n");
00487             break;
00488 
00489         case ACPI_EXD_BUFFER:
00490 
00491             ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length);
00492             break;
00493 
00494         case ACPI_EXD_PACKAGE:
00495 
00496             /* Dump the package contents */
00497 
00498             AcpiOsPrintf ("\nPackage Contents:\n");
00499             AcpiExDumpPackageObj (ObjDesc, 0, 0);
00500             break;
00501 
00502         case ACPI_EXD_FIELD:
00503 
00504             AcpiExDumpObject (ObjDesc, AcpiExDumpFieldCommon);
00505             break;
00506 
00507         case ACPI_EXD_REFERENCE:
00508 
00509             AcpiExOutString ("Class Name",
00510                 ACPI_CAST_PTR (char, AcpiUtGetReferenceName (ObjDesc)));
00511             AcpiExDumpReferenceObj (ObjDesc);
00512             break;
00513 
00514         default:
00515 
00516             AcpiOsPrintf ("**** Invalid table opcode [%X] ****\n",
00517                 Info->Opcode);
00518             return;
00519         }
00520 
00521         Info++;
00522         Count--;
00523     }
00524 }
00525 
00526 
00527 /*******************************************************************************
00528  *
00529  * FUNCTION:    AcpiExDumpOperand
00530  *
00531  * PARAMETERS:  *ObjDesc        - Pointer to entry to be dumped
00532  *              Depth           - Current nesting depth
00533  *
00534  * RETURN:      None
00535  *
00536  * DESCRIPTION: Dump an operand object
00537  *
00538  ******************************************************************************/
00539 
00540 void
00541 AcpiExDumpOperand (
00542     ACPI_OPERAND_OBJECT     *ObjDesc,
00543     UINT32                  Depth)
00544 {
00545     UINT32                  Length;
00546     UINT32                  Index;
00547 
00548 
00549     ACPI_FUNCTION_NAME (ExDumpOperand)
00550 
00551 
00552     if (!((ACPI_LV_EXEC & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
00553     {
00554         return;
00555     }
00556 
00557     if (!ObjDesc)
00558     {
00559         /* This could be a null element of a package */
00560 
00561         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
00562         return;
00563     }
00564 
00565     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
00566     {
00567         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p Namespace Node: ", ObjDesc));
00568         ACPI_DUMP_ENTRY (ObjDesc, ACPI_LV_EXEC);
00569         return;
00570     }
00571 
00572     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
00573     {
00574         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
00575             "%p is not a node or operand object: [%s]\n",
00576             ObjDesc, AcpiUtGetDescriptorName (ObjDesc)));
00577         ACPI_DUMP_BUFFER (ObjDesc, sizeof (ACPI_OPERAND_OBJECT));
00578         return;
00579     }
00580 
00581     /* ObjDesc is a valid object */
00582 
00583     if (Depth > 0)
00584     {
00585         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%*s[%u] %p ",
00586             Depth, " ", Depth, ObjDesc));
00587     }
00588     else
00589     {
00590         ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%p ", ObjDesc));
00591     }
00592 
00593     /* Decode object type */
00594 
00595     switch (ObjDesc->Common.Type)
00596     {
00597     case ACPI_TYPE_LOCAL_REFERENCE:
00598 
00599         AcpiOsPrintf ("Reference: [%s] ", AcpiUtGetReferenceName (ObjDesc));
00600 
00601         switch (ObjDesc->Reference.Class)
00602         {
00603         case ACPI_REFCLASS_DEBUG:
00604 
00605             AcpiOsPrintf ("\n");
00606             break;
00607 
00608 
00609         case ACPI_REFCLASS_INDEX:
00610 
00611             AcpiOsPrintf ("%p\n", ObjDesc->Reference.Object);
00612             break;
00613 
00614 
00615         case ACPI_REFCLASS_TABLE:
00616 
00617             AcpiOsPrintf ("Table Index %X\n", ObjDesc->Reference.Value);
00618             break;
00619 
00620 
00621         case ACPI_REFCLASS_REFOF:
00622 
00623             AcpiOsPrintf ("%p [%s]\n", ObjDesc->Reference.Object,
00624                 AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
00625                     ObjDesc->Reference.Object)->Common.Type));
00626             break;
00627 
00628 
00629         case ACPI_REFCLASS_NAME:
00630 
00631             AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
00632             break;
00633 
00634 
00635         case ACPI_REFCLASS_ARG:
00636         case ACPI_REFCLASS_LOCAL:
00637 
00638             AcpiOsPrintf ("%X\n", ObjDesc->Reference.Value);
00639             break;
00640 
00641 
00642         default:    /* Unknown reference class */
00643 
00644             AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
00645             break;
00646         }
00647         break;
00648 
00649 
00650     case ACPI_TYPE_BUFFER:
00651 
00652         AcpiOsPrintf ("Buffer length %.2X @ %p\n",
00653             ObjDesc->Buffer.Length, ObjDesc->Buffer.Pointer);
00654 
00655         /* Debug only -- dump the buffer contents */
00656 
00657         if (ObjDesc->Buffer.Pointer)
00658         {
00659             Length = ObjDesc->Buffer.Length;
00660             if (Length > 128)
00661             {
00662                 Length = 128;
00663             }
00664 
00665             AcpiOsPrintf ("Buffer Contents: (displaying length 0x%.2X)\n",
00666                 Length);
00667             ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, Length);
00668         }
00669         break;
00670 
00671 
00672     case ACPI_TYPE_INTEGER:
00673 
00674         AcpiOsPrintf ("Integer %8.8X%8.8X\n",
00675             ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
00676         break;
00677 
00678 
00679     case ACPI_TYPE_PACKAGE:
00680 
00681         AcpiOsPrintf ("Package [Len %X] ElementArray %p\n",
00682             ObjDesc->Package.Count, ObjDesc->Package.Elements);
00683 
00684         /*
00685          * If elements exist, package element pointer is valid,
00686          * and debug_level exceeds 1, dump package's elements.
00687          */
00688         if (ObjDesc->Package.Count &&
00689             ObjDesc->Package.Elements &&
00690             AcpiDbgLevel > 1)
00691         {
00692             for (Index = 0; Index < ObjDesc->Package.Count; Index++)
00693             {
00694                 AcpiExDumpOperand (ObjDesc->Package.Elements[Index], Depth+1);
00695             }
00696         }
00697         break;
00698 
00699 
00700     case ACPI_TYPE_REGION:
00701 
00702         AcpiOsPrintf ("Region %s (%X)",
00703             AcpiUtGetRegionName (ObjDesc->Region.SpaceId),
00704             ObjDesc->Region.SpaceId);
00705 
00706         /*
00707          * If the address and length have not been evaluated,
00708          * don't print them.
00709          */
00710         if (!(ObjDesc->Region.Flags & AOPOBJ_DATA_VALID))
00711         {
00712             AcpiOsPrintf ("\n");
00713         }
00714         else
00715         {
00716             AcpiOsPrintf (" base %8.8X%8.8X Length %X\n",
00717                 ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
00718                 ObjDesc->Region.Length);
00719         }
00720         break;
00721 
00722 
00723     case ACPI_TYPE_STRING:
00724 
00725         AcpiOsPrintf ("String length %X @ %p ",
00726             ObjDesc->String.Length,
00727             ObjDesc->String.Pointer);
00728 
00729         AcpiUtPrintString (ObjDesc->String.Pointer, ACPI_UINT8_MAX);
00730         AcpiOsPrintf ("\n");
00731         break;
00732 
00733 
00734     case ACPI_TYPE_LOCAL_BANK_FIELD:
00735 
00736         AcpiOsPrintf ("BankField\n");
00737         break;
00738 
00739 
00740     case ACPI_TYPE_LOCAL_REGION_FIELD:
00741 
00742         AcpiOsPrintf ("RegionField: Bits=%X AccWidth=%X Lock=%X Update=%X at "
00743             "byte=%X bit=%X of below:\n",
00744             ObjDesc->Field.BitLength,
00745             ObjDesc->Field.AccessByteWidth,
00746             ObjDesc->Field.FieldFlags & AML_FIELD_LOCK_RULE_MASK,
00747             ObjDesc->Field.FieldFlags & AML_FIELD_UPDATE_RULE_MASK,
00748             ObjDesc->Field.BaseByteOffset,
00749             ObjDesc->Field.StartFieldBitOffset);
00750 
00751         AcpiExDumpOperand (ObjDesc->Field.RegionObj, Depth+1);
00752         break;
00753 
00754 
00755     case ACPI_TYPE_LOCAL_INDEX_FIELD:
00756 
00757         AcpiOsPrintf ("IndexField\n");
00758         break;
00759 
00760 
00761     case ACPI_TYPE_BUFFER_FIELD:
00762 
00763         AcpiOsPrintf ("BufferField: %X bits at byte %X bit %X of\n",
00764             ObjDesc->BufferField.BitLength,
00765             ObjDesc->BufferField.BaseByteOffset,
00766             ObjDesc->BufferField.StartFieldBitOffset);
00767 
00768         if (!ObjDesc->BufferField.BufferObj)
00769         {
00770             ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "*NULL*\n"));
00771         }
00772         else if ((ObjDesc->BufferField.BufferObj)->Common.Type !=
00773                     ACPI_TYPE_BUFFER)
00774         {
00775             AcpiOsPrintf ("*not a Buffer*\n");
00776         }
00777         else
00778         {
00779             AcpiExDumpOperand (ObjDesc->BufferField.BufferObj, Depth+1);
00780         }
00781         break;
00782 
00783 
00784     case ACPI_TYPE_EVENT:
00785 
00786         AcpiOsPrintf ("Event\n");
00787         break;
00788 
00789 
00790     case ACPI_TYPE_METHOD:
00791 
00792         AcpiOsPrintf ("Method(%X) @ %p:%X\n",
00793             ObjDesc->Method.ParamCount,
00794             ObjDesc->Method.AmlStart,
00795             ObjDesc->Method.AmlLength);
00796         break;
00797 
00798 
00799     case ACPI_TYPE_MUTEX:
00800 
00801         AcpiOsPrintf ("Mutex\n");
00802         break;
00803 
00804 
00805     case ACPI_TYPE_DEVICE:
00806 
00807         AcpiOsPrintf ("Device\n");
00808         break;
00809 
00810 
00811     case ACPI_TYPE_POWER:
00812 
00813         AcpiOsPrintf ("Power\n");
00814         break;
00815 
00816 
00817     case ACPI_TYPE_PROCESSOR:
00818 
00819         AcpiOsPrintf ("Processor\n");
00820         break;
00821 
00822 
00823     case ACPI_TYPE_THERMAL:
00824 
00825         AcpiOsPrintf ("Thermal\n");
00826         break;
00827 
00828 
00829     default:
00830         /* Unknown Type */
00831 
00832         AcpiOsPrintf ("Unknown Type %X\n", ObjDesc->Common.Type);
00833         break;
00834     }
00835 
00836     return;
00837 }
00838 
00839 
00840 /*******************************************************************************
00841  *
00842  * FUNCTION:    AcpiExDumpOperands
00843  *
00844  * PARAMETERS:  Operands            - A list of Operand objects
00845  *              OpcodeName          - AML opcode name
00846  *              NumOperands         - Operand count for this opcode
00847  *
00848  * DESCRIPTION: Dump the operands associated with the opcode
00849  *
00850  ******************************************************************************/
00851 
00852 void
00853 AcpiExDumpOperands (
00854     ACPI_OPERAND_OBJECT     **Operands,
00855     const char              *OpcodeName,
00856     UINT32                  NumOperands)
00857 {
00858     ACPI_FUNCTION_NAME (ExDumpOperands);
00859 
00860 
00861     if (!OpcodeName)
00862     {
00863         OpcodeName = "UNKNOWN";
00864     }
00865 
00866     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
00867         "**** Start operand dump for opcode [%s], %u operands\n",
00868         OpcodeName, NumOperands));
00869 
00870     if (NumOperands == 0)
00871     {
00872         NumOperands = 1;
00873     }
00874 
00875     /* Dump the individual operands */
00876 
00877     while (NumOperands)
00878     {
00879         AcpiExDumpOperand (*Operands, 0);
00880         Operands++;
00881         NumOperands--;
00882     }
00883 
00884     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
00885         "**** End operand dump for [%s]\n", OpcodeName));
00886     return;
00887 }
00888 
00889 
00890 /*******************************************************************************
00891  *
00892  * FUNCTION:    AcpiExOut* functions
00893  *
00894  * PARAMETERS:  Title               - Descriptive text
00895  *              Value               - Value to be displayed
00896  *
00897  * DESCRIPTION: Object dump output formatting functions.  These functions
00898  *              reduce the number of format strings required and keeps them
00899  *              all in one place for easy modification.
00900  *
00901  ******************************************************************************/
00902 
00903 static void
00904 AcpiExOutString (
00905     char                    *Title,
00906     char                    *Value)
00907 {
00908     AcpiOsPrintf ("%20s : %s\n", Title, Value);
00909 }
00910 
00911 static void
00912 AcpiExOutPointer (
00913     char                    *Title,
00914     void                    *Value)
00915 {
00916     AcpiOsPrintf ("%20s : %p\n", Title, Value);
00917 }
00918 
00919 
00920 /*******************************************************************************
00921  *
00922  * FUNCTION:    AcpiExDumpNamespaceNode
00923  *
00924  * PARAMETERS:  Node                - Descriptor to dump
00925  *              Flags               - Force display if TRUE
00926  *
00927  * DESCRIPTION: Dumps the members of the given.Node
00928  *
00929  ******************************************************************************/
00930 
00931 void
00932 AcpiExDumpNamespaceNode (
00933     ACPI_NAMESPACE_NODE     *Node,
00934     UINT32                  Flags)
00935 {
00936 
00937     ACPI_FUNCTION_ENTRY ();
00938 
00939 
00940     if (!Flags)
00941     {
00942         if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
00943         {
00944             return;
00945         }
00946     }
00947 
00948     AcpiOsPrintf ("%20s : %4.4s\n", "Name", AcpiUtGetNodeName (Node));
00949     AcpiExOutString  ("Type", AcpiUtGetTypeName (Node->Type));
00950     AcpiExOutPointer ("Attached Object", AcpiNsGetAttachedObject (Node));
00951     AcpiExOutPointer ("Parent", Node->Parent);
00952 
00953     AcpiExDumpObject (ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Node),
00954         AcpiExDumpNode);
00955 }
00956 
00957 
00958 /*******************************************************************************
00959  *
00960  * FUNCTION:    AcpiExDumpReferenceObj
00961  *
00962  * PARAMETERS:  Object              - Descriptor to dump
00963  *
00964  * DESCRIPTION: Dumps a reference object
00965  *
00966  ******************************************************************************/
00967 
00968 static void
00969 AcpiExDumpReferenceObj (
00970     ACPI_OPERAND_OBJECT     *ObjDesc)
00971 {
00972     ACPI_BUFFER             RetBuf;
00973     ACPI_STATUS             Status;
00974 
00975 
00976     RetBuf.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
00977 
00978     if (ObjDesc->Reference.Class == ACPI_REFCLASS_NAME)
00979     {
00980         AcpiOsPrintf (" %p ", ObjDesc->Reference.Node);
00981 
00982         Status = AcpiNsHandleToPathname (ObjDesc->Reference.Node, &RetBuf);
00983         if (ACPI_FAILURE (Status))
00984         {
00985             AcpiOsPrintf (" Could not convert name to pathname\n");
00986         }
00987         else
00988         {
00989            AcpiOsPrintf ("%s\n", (char *) RetBuf.Pointer);
00990            ACPI_FREE (RetBuf.Pointer);
00991         }
00992     }
00993     else if (ObjDesc->Reference.Object)
00994     {
00995         if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND)
00996         {
00997             AcpiOsPrintf (" Target: %p", ObjDesc->Reference.Object);
00998             if (ObjDesc->Reference.Class == ACPI_REFCLASS_TABLE)
00999             {
01000                 AcpiOsPrintf (" Table Index: %X\n", ObjDesc->Reference.Value);
01001             }
01002             else
01003             {
01004                 AcpiOsPrintf (" Target: %p [%s]\n", ObjDesc->Reference.Object,
01005                     AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
01006                         ObjDesc->Reference.Object)->Common.Type));
01007             }
01008         }
01009         else
01010         {
01011             AcpiOsPrintf (" Target: %p\n", ObjDesc->Reference.Object);
01012         }
01013     }
01014 }
01015 
01016 
01017 /*******************************************************************************
01018  *
01019  * FUNCTION:    AcpiExDumpPackageObj
01020  *
01021  * PARAMETERS:  ObjDesc             - Descriptor to dump
01022  *              Level               - Indentation Level
01023  *              Index               - Package index for this object
01024  *
01025  * DESCRIPTION: Dumps the elements of the package
01026  *
01027  ******************************************************************************/
01028 
01029 static void
01030 AcpiExDumpPackageObj (
01031     ACPI_OPERAND_OBJECT     *ObjDesc,
01032     UINT32                  Level,
01033     UINT32                  Index)
01034 {
01035     UINT32                  i;
01036 
01037 
01038     /* Indentation and index output */
01039 
01040     if (Level > 0)
01041     {
01042         for (i = 0; i < Level; i++)
01043         {
01044             AcpiOsPrintf ("  ");
01045         }
01046 
01047         AcpiOsPrintf ("[%.2d] ", Index);
01048     }
01049 
01050     AcpiOsPrintf ("%p ", ObjDesc);
01051 
01052     /* Null package elements are allowed */
01053 
01054     if (!ObjDesc)
01055     {
01056         AcpiOsPrintf ("[Null Object]\n");
01057         return;
01058     }
01059 
01060     /* Packages may only contain a few object types */
01061 
01062     switch (ObjDesc->Common.Type)
01063     {
01064     case ACPI_TYPE_INTEGER:
01065 
01066         AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
01067             ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
01068         break;
01069 
01070 
01071     case ACPI_TYPE_STRING:
01072 
01073         AcpiOsPrintf ("[String]  Value: ");
01074         for (i = 0; i < ObjDesc->String.Length; i++)
01075         {
01076             AcpiOsPrintf ("%c", ObjDesc->String.Pointer[i]);
01077         }
01078         AcpiOsPrintf ("\n");
01079         break;
01080 
01081 
01082     case ACPI_TYPE_BUFFER:
01083 
01084         AcpiOsPrintf ("[Buffer] Length %.2X = ", ObjDesc->Buffer.Length);
01085         if (ObjDesc->Buffer.Length)
01086         {
01087             AcpiUtDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
01088                 ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
01089         }
01090         else
01091         {
01092             AcpiOsPrintf ("\n");
01093         }
01094         break;
01095 
01096 
01097     case ACPI_TYPE_PACKAGE:
01098 
01099         AcpiOsPrintf ("[Package] Contains %u Elements:\n",
01100             ObjDesc->Package.Count);
01101 
01102         for (i = 0; i < ObjDesc->Package.Count; i++)
01103         {
01104             AcpiExDumpPackageObj (ObjDesc->Package.Elements[i], Level+1, i);
01105         }
01106         break;
01107 
01108 
01109     case ACPI_TYPE_LOCAL_REFERENCE:
01110 
01111         AcpiOsPrintf ("[Object Reference] Type [%s] %2.2X",
01112             AcpiUtGetReferenceName (ObjDesc),
01113             ObjDesc->Reference.Class);
01114         AcpiExDumpReferenceObj (ObjDesc);
01115         break;
01116 
01117 
01118     default:
01119 
01120         AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type);
01121         break;
01122     }
01123 }
01124 
01125 
01126 /*******************************************************************************
01127  *
01128  * FUNCTION:    AcpiExDumpObjectDescriptor
01129  *
01130  * PARAMETERS:  ObjDesc             - Descriptor to dump
01131  *              Flags               - Force display if TRUE
01132  *
01133  * DESCRIPTION: Dumps the members of the object descriptor given.
01134  *
01135  ******************************************************************************/
01136 
01137 void
01138 AcpiExDumpObjectDescriptor (
01139     ACPI_OPERAND_OBJECT     *ObjDesc,
01140     UINT32                  Flags)
01141 {
01142     ACPI_FUNCTION_TRACE (ExDumpObjectDescriptor);
01143 
01144 
01145     if (!ObjDesc)
01146     {
01147         return_VOID;
01148     }
01149 
01150     if (!Flags)
01151     {
01152         if (!((ACPI_LV_OBJECTS & AcpiDbgLevel) && (_COMPONENT & AcpiDbgLayer)))
01153         {
01154             return_VOID;
01155         }
01156     }
01157 
01158     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
01159     {
01160         AcpiExDumpNamespaceNode ((ACPI_NAMESPACE_NODE *) ObjDesc, Flags);
01161 
01162         AcpiOsPrintf ("\nAttached Object (%p):\n",
01163             ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object);
01164 
01165         AcpiExDumpObjectDescriptor (
01166             ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object, Flags);
01167         return_VOID;
01168     }
01169 
01170     if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
01171     {
01172         AcpiOsPrintf (
01173             "ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n",
01174             ObjDesc, AcpiUtGetDescriptorName (ObjDesc));
01175         return_VOID;
01176     }
01177 
01178     if (ObjDesc->Common.Type > ACPI_TYPE_NS_NODE_MAX)
01179     {
01180         return_VOID;
01181     }
01182 
01183     /* Common Fields */
01184 
01185     AcpiExDumpObject (ObjDesc, AcpiExDumpCommon);
01186 
01187     /* Object-specific fields */
01188 
01189     AcpiExDumpObject (ObjDesc, AcpiExDumpInfo[ObjDesc->Common.Type]);
01190     return_VOID;
01191 }
01192 
01193 #endif
01194 

Generated on Mon May 28 2012 04:27:02 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.