Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/drivers/acpi/acdebug.h need to be fixed.

0001 /******************************************************************************
0002  *
0003  * Name: acdebug.h - ACPI/AML debugger
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 #ifndef __ACDEBUG_H__
0117 #define __ACDEBUG_H__
0118 
0119 
0120 #define ACPI_DEBUG_BUFFER_SIZE  4196
0121 
0122 typedef struct CommandInfo
0123 {
0124     char                    *Name;          /* Command Name */
0125     UINT8                   MinArgs;        /* Minimum arguments required */
0126 
0127 } COMMAND_INFO;
0128 
0129 
0130 typedef struct ArgumentInfo
0131 {
0132     char                    *Name;          /* Argument Name */
0133 
0134 } ARGUMENT_INFO;
0135 
0136 
0137 #define PARAM_LIST(pl)                  pl
0138 #define DBTEST_OUTPUT_LEVEL(lvl)        if (AcpiGbl_DbOpt_verbose)
0139 #define VERBOSE_PRINT(fp)               DBTEST_OUTPUT_LEVEL(lvl) {\
0140                                             AcpiOsPrintf PARAM_LIST(fp);}
0141 
0142 #define EX_NO_SINGLE_STEP               1
0143 #define EX_SINGLE_STEP                  2
0144 
0145 
0146 /*
0147  * dbxface - external debugger interfaces
0148  */
0149 ACPI_STATUS
0150 AcpiDbInitialize (
0151     void);
0152 
0153 void
0154 AcpiDbTerminate (
0155     void);
0156 
0157 ACPI_STATUS
0158 AcpiDbSingleStep (
0159     ACPI_WALK_STATE         *WalkState,
0160     ACPI_PARSE_OBJECT       *Op,
0161     UINT32                  OpType);
0162 
0163 
0164 /*
0165  * dbcmds - debug commands and output routines
0166  */
0167 ACPI_STATUS
0168 AcpiDbDisassembleMethod (
0169     char                    *Name);
0170 
0171 void
0172 AcpiDbDisplayTableInfo (
0173     char                    *TableArg);
0174 
0175 void
0176 AcpiDbUnloadAcpiTable (
0177     char                    *TableArg,
0178     char                    *InstanceArg);
0179 
0180 void
0181 AcpiDbSetMethodBreakpoint (
0182     char                    *Location,
0183     ACPI_WALK_STATE         *WalkState,
0184     ACPI_PARSE_OBJECT       *Op);
0185 
0186 void
0187 AcpiDbSetMethodCallBreakpoint (
0188     ACPI_PARSE_OBJECT       *Op);
0189 
0190 void
0191 AcpiDbGetBusInfo (
0192     void);
0193 
0194 void
0195 AcpiDbDisassembleAml (
0196     char                    *Statements,
0197     ACPI_PARSE_OBJECT       *Op);
0198 
0199 void
0200 AcpiDbDumpNamespace (
0201     char                    *StartArg,
0202     char                    *DepthArg);
0203 
0204 void
0205 AcpiDbDumpNamespaceByOwner (
0206     char                    *OwnerArg,
0207     char                    *DepthArg);
0208 
0209 void
0210 AcpiDbSendNotify (
0211     char                    *Name,
0212     UINT32                  Value);
0213 
0214 void
0215 AcpiDbSetMethodData (
0216     char                    *TypeArg,
0217     char                    *IndexArg,
0218     char                    *ValueArg);
0219 
0220 ACPI_STATUS
0221 AcpiDbDisplayObjects (
0222     char                    *ObjTypeArg,
0223     char                    *DisplayCountArg);
0224 
0225 ACPI_STATUS
0226 AcpiDbFindNameInNamespace (
0227     char                    *NameArg);
0228 
0229 void
0230 AcpiDbSetScope (
0231     char                    *Name);
0232 
0233 ACPI_STATUS
0234 AcpiDbSleep (
0235     char                    *ObjectArg);
0236 
0237 void
0238 AcpiDbFindReferences (
0239     char                    *ObjectArg);
0240 
0241 void
0242 AcpiDbDisplayLocks (
0243     void);
0244 
0245 void
0246 AcpiDbDisplayResources (
0247     char                    *ObjectArg);
0248 
0249 void
0250 AcpiDbDisplayGpes (
0251     void);
0252 
0253 void
0254 AcpiDbCheckIntegrity (
0255     void);
0256 
0257 void
0258 AcpiDbGenerateGpe (
0259     char                    *GpeArg,
0260     char                    *BlockArg);
0261 
0262 void
0263 AcpiDbCheckPredefinedNames (
0264     void);
0265 
0266 void
0267 AcpiDbBatchExecute (
0268     void);
0269 
0270 /*
0271  * dbdisply - debug display commands
0272  */
0273 void
0274 AcpiDbDisplayMethodInfo (
0275     ACPI_PARSE_OBJECT       *Op);
0276 
0277 void
0278 AcpiDbDecodeAndDisplayObject (
0279     char                    *Target,
0280     char                    *OutputType);
0281 
0282 void
0283 AcpiDbDisplayResultObject (
0284     ACPI_OPERAND_OBJECT     *ObjDesc,
0285     ACPI_WALK_STATE         *WalkState);
0286 
0287 ACPI_STATUS
0288 AcpiDbDisplayAllMethods (
0289     char                    *DisplayCountArg);
0290 
0291 void
0292 AcpiDbDisplayArguments (
0293     void);
0294 
0295 void
0296 AcpiDbDisplayLocals (
0297     void);
0298 
0299 void
0300 AcpiDbDisplayResults (
0301     void);
0302 
0303 void
0304 AcpiDbDisplayCallingTree (
0305     void);
0306 
0307 void
0308 AcpiDbDisplayObjectType (
0309     char                    *ObjectArg);
0310 
0311 void
0312 AcpiDbDisplayArgumentObject (
0313     ACPI_OPERAND_OBJECT     *ObjDesc,
0314     ACPI_WALK_STATE         *WalkState);
0315 
0316 
0317 /*
0318  * dbexec - debugger control method execution
0319  */
0320 void
0321 AcpiDbExecute (
0322     char                    *Name,
0323     char                    **Args,
0324     UINT32                  Flags);
0325 
0326 void
0327 AcpiDbCreateExecutionThreads (
0328     char                    *NumThreadsArg,
0329     char                    *NumLoopsArg,
0330     char                    *MethodNameArg);
0331 
0332 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
0333 UINT32
0334 AcpiDbGetCacheInfo (
0335     ACPI_MEMORY_LIST        *Cache);
0336 #endif
0337 
0338 
0339 /*
0340  * dbfileio - Debugger file I/O commands
0341  */
0342 ACPI_OBJECT_TYPE
0343 AcpiDbMatchArgument (
0344     char                    *UserArgument,
0345     ARGUMENT_INFO           *Arguments);
0346 
0347 void
0348 AcpiDbCloseDebugFile (
0349     void);
0350 
0351 void
0352 AcpiDbOpenDebugFile (
0353     char                    *Name);
0354 
0355 ACPI_STATUS
0356 AcpiDbLoadAcpiTable (
0357     char                    *Filename);
0358 
0359 ACPI_STATUS
0360 AcpiDbGetTableFromFile (
0361     char                    *Filename,
0362     ACPI_TABLE_HEADER       **Table);
0363 
0364 ACPI_STATUS
0365 AcpiDbReadTableFromFile (
0366     char                    *Filename,
0367     ACPI_TABLE_HEADER       **Table);
0368 
0369 
0370 /*
0371  * dbhistry - debugger HISTORY command
0372  */
0373 void
0374 AcpiDbAddToHistory (
0375     char                    *CommandLine);
0376 
0377 void
0378 AcpiDbDisplayHistory (
0379     void);
0380 
0381 char *
0382 AcpiDbGetFromHistory (
0383     char                    *CommandNumArg);
0384 
0385 
0386 /*
0387  * dbinput - user front-end to the AML debugger
0388  */
0389 ACPI_STATUS
0390 AcpiDbCommandDispatch (
0391     char                    *InputBuffer,
0392     ACPI_WALK_STATE         *WalkState,
0393     ACPI_PARSE_OBJECT       *Op);
0394 
0395 void ACPI_SYSTEM_XFACE
0396 AcpiDbExecuteThread (
0397     void                    *Context);
0398 
0399 ACPI_STATUS
0400 AcpiDbUserCommands (
0401     char                    Prompt,
0402     ACPI_PARSE_OBJECT       *Op);
0403 
0404 
0405 /*
0406  * dbstats - Generation and display of ACPI table statistics
0407  */
0408 void
0409 AcpiDbGenerateStatistics (
0410     ACPI_PARSE_OBJECT       *Root,
0411     BOOLEAN                 IsMethod);
0412 
0413 ACPI_STATUS
0414 AcpiDbDisplayStatistics (
0415     char                    *TypeArg);
0416 
0417 
0418 /*
0419  * dbutils - AML debugger utilities
0420  */
0421 void
0422 AcpiDbSetOutputDestination (
0423     UINT32                  Where);
0424 
0425 void
0426 AcpiDbDumpExternalObject (
0427     ACPI_OBJECT             *ObjDesc,
0428     UINT32                  Level);
0429 
0430 void
0431 AcpiDbPrepNamestring (
0432     char                    *Name);
0433 
0434 ACPI_NAMESPACE_NODE *
0435 AcpiDbLocalNsLookup (
0436     char                    *Name);
0437 
0438 void
0439 AcpiDbUInt32ToHexString (
0440     UINT32                  Value,
0441     char                    *Buffer);
0442 
0443 #endif  /* __ACDEBUG_H__ */