123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499 |
- /******************************************************************************
- *
- * Name: acdebug.h - ACPI/AML debugger
- *
- *****************************************************************************/
- /*
- * Copyright (C) 2000 - 2015, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions, and the following disclaimer,
- * without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- * substantially similar to the "NO WARRANTY" disclaimer below
- * ("Disclaimer") and any redistribution must be conditioned upon
- * including a substantially similar Disclaimer requirement for further
- * binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- * of any contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
- #ifndef __ACDEBUG_H__
- #define __ACDEBUG_H__
- /* The debugger is used in conjunction with the disassembler most of time */
- #ifdef ACPI_DISASSEMBLER
- #include "acdisasm.h"
- #endif
- #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */
- typedef struct acpi_db_command_info
- {
- char *Name; /* Command Name */
- UINT8 MinArgs; /* Minimum arguments required */
- } ACPI_DB_COMMAND_INFO;
- typedef struct acpi_db_command_help
- {
- UINT8 LineCount; /* Number of help lines */
- char *Invocation; /* Command Invocation */
- char *Description; /* Command Description */
- } ACPI_DB_COMMAND_HELP;
- typedef struct acpi_db_argument_info
- {
- char *Name; /* Argument Name */
- } ACPI_DB_ARGUMENT_INFO;
- typedef struct acpi_db_execute_walk
- {
- UINT32 Count;
- UINT32 MaxCount;
- } ACPI_DB_EXECUTE_WALK;
- #define PARAM_LIST(pl) pl
- #define EX_NO_SINGLE_STEP 1
- #define EX_SINGLE_STEP 2
- /*
- * dbxface - external debugger interfaces
- */
- ACPI_DBR_DEPENDENT_RETURN_OK (
- ACPI_STATUS
- AcpiDbSingleStep (
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Op,
- UINT32 OpType))
- ACPI_DBR_DEPENDENT_RETURN_VOID (
- void
- AcpiDbSignalBreakPoint (
- ACPI_WALK_STATE *WalkState))
- /*
- * dbcmds - debug commands and output routines
- */
- ACPI_NAMESPACE_NODE *
- AcpiDbConvertToNode (
- char *InString);
- void
- AcpiDbDisplayTableInfo (
- char *TableArg);
- void
- AcpiDbDisplayTemplate (
- char *BufferArg);
- void
- AcpiDbUnloadAcpiTable (
- char *Name);
- void
- AcpiDbSendNotify (
- char *Name,
- UINT32 Value);
- void
- AcpiDbDisplayInterfaces (
- char *ActionArg,
- char *InterfaceNameArg);
- ACPI_STATUS
- AcpiDbSleep (
- char *ObjectArg);
- void
- AcpiDbTrace (
- char *EnableArg,
- char *MethodArg,
- char *OnceArg);
- void
- AcpiDbDisplayLocks (
- void);
- void
- AcpiDbDisplayResources (
- char *ObjectArg);
- ACPI_HW_DEPENDENT_RETURN_VOID (
- void
- AcpiDbDisplayGpes (
- void))
- void
- AcpiDbDisplayHandlers (
- void);
- ACPI_HW_DEPENDENT_RETURN_VOID (
- void
- AcpiDbGenerateGpe (
- char *GpeArg,
- char *BlockArg))
- ACPI_HW_DEPENDENT_RETURN_VOID (
- void
- AcpiDbGenerateSci (
- void))
- void
- AcpiDbExecuteTest (
- char *TypeArg);
- /*
- * dbconvert - miscellaneous conversion routines
- */
- ACPI_STATUS
- AcpiDbHexCharToValue (
- int HexChar,
- UINT8 *ReturnValue);
- ACPI_STATUS
- AcpiDbConvertToPackage (
- char *String,
- ACPI_OBJECT *Object);
- ACPI_STATUS
- AcpiDbConvertToObject (
- ACPI_OBJECT_TYPE Type,
- char *String,
- ACPI_OBJECT *Object);
- UINT8 *
- AcpiDbEncodePldBuffer (
- ACPI_PLD_INFO *PldInfo);
- void
- AcpiDbDumpPldBuffer (
- ACPI_OBJECT *ObjDesc);
- /*
- * dbmethod - control method commands
- */
- void
- AcpiDbSetMethodBreakpoint (
- char *Location,
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Op);
- void
- AcpiDbSetMethodCallBreakpoint (
- ACPI_PARSE_OBJECT *Op);
- void
- AcpiDbSetMethodData (
- char *TypeArg,
- char *IndexArg,
- char *ValueArg);
- ACPI_STATUS
- AcpiDbDisassembleMethod (
- char *Name);
- void
- AcpiDbDisassembleAml (
- char *Statements,
- ACPI_PARSE_OBJECT *Op);
- void
- AcpiDbBatchExecute (
- char *CountArg);
- /*
- * dbnames - namespace commands
- */
- void
- AcpiDbSetScope (
- char *Name);
- void
- AcpiDbDumpNamespace (
- char *StartArg,
- char *DepthArg);
- void
- AcpiDbDumpNamespacePaths (
- void);
- void
- AcpiDbDumpNamespaceByOwner (
- char *OwnerArg,
- char *DepthArg);
- ACPI_STATUS
- AcpiDbFindNameInNamespace (
- char *NameArg);
- void
- AcpiDbCheckPredefinedNames (
- void);
- ACPI_STATUS
- AcpiDbDisplayObjects (
- char *ObjTypeArg,
- char *DisplayCountArg);
- void
- AcpiDbCheckIntegrity (
- void);
- void
- AcpiDbFindReferences (
- char *ObjectArg);
- void
- AcpiDbGetBusInfo (
- void);
- /*
- * dbdisply - debug display commands
- */
- void
- AcpiDbDisplayMethodInfo (
- ACPI_PARSE_OBJECT *Op);
- void
- AcpiDbDecodeAndDisplayObject (
- char *Target,
- char *OutputType);
- ACPI_DBR_DEPENDENT_RETURN_VOID (
- void
- AcpiDbDisplayResultObject (
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_WALK_STATE *WalkState))
- ACPI_STATUS
- AcpiDbDisplayAllMethods (
- char *DisplayCountArg);
- void
- AcpiDbDisplayArguments (
- void);
- void
- AcpiDbDisplayLocals (
- void);
- void
- AcpiDbDisplayResults (
- void);
- void
- AcpiDbDisplayCallingTree (
- void);
- void
- AcpiDbDisplayObjectType (
- char *ObjectArg);
- ACPI_DBR_DEPENDENT_RETURN_VOID (
- void
- AcpiDbDisplayArgumentObject (
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_WALK_STATE *WalkState))
- /*
- * dbexec - debugger control method execution
- */
- void
- AcpiDbExecute (
- char *Name,
- char **Args,
- ACPI_OBJECT_TYPE *Types,
- UINT32 Flags);
- void
- AcpiDbCreateExecutionThreads (
- char *NumThreadsArg,
- char *NumLoopsArg,
- char *MethodNameArg);
- void
- AcpiDbDeleteObjects (
- UINT32 Count,
- ACPI_OBJECT *Objects);
- #ifdef ACPI_DBG_TRACK_ALLOCATIONS
- UINT32
- AcpiDbGetCacheInfo (
- ACPI_MEMORY_LIST *Cache);
- #endif
- /*
- * dbfileio - Debugger file I/O commands
- */
- ACPI_OBJECT_TYPE
- AcpiDbMatchArgument (
- char *UserArgument,
- ACPI_DB_ARGUMENT_INFO *Arguments);
- void
- AcpiDbCloseDebugFile (
- void);
- void
- AcpiDbOpenDebugFile (
- char *Name);
- ACPI_STATUS
- AcpiDbLoadAcpiTable (
- char *Filename);
- ACPI_STATUS
- AcpiDbLoadTables (
- ACPI_NEW_TABLE_DESC *ListHead);
- /*
- * dbhistry - debugger HISTORY command
- */
- void
- AcpiDbAddToHistory (
- char *CommandLine);
- void
- AcpiDbDisplayHistory (
- void);
- char *
- AcpiDbGetFromHistory (
- char *CommandNumArg);
- char *
- AcpiDbGetHistoryByIndex (
- UINT32 CommanddNum);
- /*
- * dbinput - user front-end to the AML debugger
- */
- ACPI_STATUS
- AcpiDbCommandDispatch (
- char *InputBuffer,
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Op);
- void ACPI_SYSTEM_XFACE
- AcpiDbExecuteThread (
- void *Context);
- ACPI_STATUS
- AcpiDbUserCommands (
- char Prompt,
- ACPI_PARSE_OBJECT *Op);
- char *
- AcpiDbGetNextToken (
- char *String,
- char **Next,
- ACPI_OBJECT_TYPE *ReturnType);
- /*
- * dbobject
- */
- void
- AcpiDbDecodeInternalObject (
- ACPI_OPERAND_OBJECT *ObjDesc);
- void
- AcpiDbDisplayInternalObject (
- ACPI_OPERAND_OBJECT *ObjDesc,
- ACPI_WALK_STATE *WalkState);
- void
- AcpiDbDecodeArguments (
- ACPI_WALK_STATE *WalkState);
- void
- AcpiDbDecodeLocals (
- ACPI_WALK_STATE *WalkState);
- void
- AcpiDbDumpMethodInfo (
- ACPI_STATUS Status,
- ACPI_WALK_STATE *WalkState);
- /*
- * dbstats - Generation and display of ACPI table statistics
- */
- void
- AcpiDbGenerateStatistics (
- ACPI_PARSE_OBJECT *Root,
- BOOLEAN IsMethod);
- ACPI_STATUS
- AcpiDbDisplayStatistics (
- char *TypeArg);
- /*
- * dbutils - AML debugger utilities
- */
- void
- AcpiDbSetOutputDestination (
- UINT32 Where);
- void
- AcpiDbDumpExternalObject (
- ACPI_OBJECT *ObjDesc,
- UINT32 Level);
- void
- AcpiDbPrepNamestring (
- char *Name);
- ACPI_NAMESPACE_NODE *
- AcpiDbLocalNsLookup (
- char *Name);
- void
- AcpiDbUint32ToHexString (
- UINT32 Value,
- char *Buffer);
- #endif /* __ACDEBUG_H__ */
|