major overhaul of ACPI_TYPE and the use of internal types. Most were

no longer necessary.  Improved handling of the Scope operator for both the
compiler and the interpreter.


date	2002.10.10.22.48.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 16:14:04 +00:00
parent c86bc2b24b
commit 7aeb86c4df
3 changed files with 387 additions and 213 deletions

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: asltypes.h - compiler data types and struct definitions
* $Revision: 1.54 $
* $Revision: 1.55 $
*
*****************************************************************************/
@ -382,7 +382,8 @@ typedef enum
ASL_MSG_SCOPE_TYPE,
ASL_MSG_CORE_EXCEPTION,
ASL_MSG_UNREACHABLE_CODE,
ASL_MSG_EARLY_EOF
ASL_MSG_EARLY_EOF,
ASL_MSG_SCOPE_FWD_REF
} ASL_MESSAGE_IDS;
@ -469,7 +470,8 @@ char *AslMessages [] = {
/* ASL_MSG_SCOPE_TYPE, */ "Existing object has invalid type for Scope operator",
/* ASL_MSG_CORE_EXCEPTION, */ "From ACPI CA Subsystem",
/* ASL_MSG_UNREACHABLE_CODE, */ "Statement is unreachable",
/* ASL_MSG_EARLY_EOF */ "Premature end-of-file reached"
/* ASL_MSG_EARLY_EOF */ "Premature end-of-file reached",
/* ASL_MSG_SCOPE_FWD_REF */ "Forward references from Scope() not allowed"
};

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
* $Revision: 1.108 $
* $Revision: 1.89 $
*
******************************************************************************/
@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
* All rights reserved.
*
* 2. License
@ -187,16 +187,14 @@ AcpiDbWalkForReferences (
if (Node == (void *) ObjDesc)
{
AcpiOsPrintf ("Object is a Node [%4.4s]\n",
AcpiUtGetNodeName (Node));
AcpiOsPrintf ("Object is a Node [%4.4s]\n", Node->Name.Ascii);
}
/* Check for match against the object attached to the node */
if (AcpiNsGetAttachedObject (Node) == ObjDesc)
{
AcpiOsPrintf ("Reference at Node->Object %p [%4.4s]\n",
Node, AcpiUtGetNodeName (Node));
AcpiOsPrintf ("Reference at Node->Object %p [%4.4s]\n", Node, Node->Name.Ascii);
}
return (AE_OK);
@ -217,7 +215,7 @@ AcpiDbWalkForReferences (
void
AcpiDbFindReferences (
char *ObjectArg)
NATIVE_CHAR *ObjectArg)
{
ACPI_OPERAND_OBJECT *ObjDesc;
@ -251,10 +249,10 @@ AcpiDbDisplayLocks (void)
UINT32 i;
for (i = 0; i < MAX_MUTEX; i++)
for (i = 0; i < MAX_MTX; i++)
{
AcpiOsPrintf ("%26s : %s\n", AcpiUtGetMutexName (i),
AcpiGbl_MutexInfo[i].OwnerId == ACPI_MUTEX_NOT_ACQUIRED
AcpiGbl_AcpiMutexInfo[i].OwnerId == ACPI_MUTEX_NOT_ACQUIRED
? "Locked" : "Unlocked");
}
}
@ -275,31 +273,18 @@ AcpiDbDisplayLocks (void)
void
AcpiDbDisplayTableInfo (
char *TableArg)
NATIVE_CHAR *TableArg)
{
UINT32 i;
ACPI_TABLE_DESC *TableDesc;
for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++)
for (i = 0; i < NUM_ACPI_TABLES; i++)
{
TableDesc = AcpiGbl_TableLists[i].Next;
while (TableDesc)
if (AcpiGbl_AcpiTables[i].Pointer)
{
AcpiOsPrintf ( "%s at %p length %.5X",
AcpiGbl_TableData[i].Name, TableDesc->Pointer,
(UINT32) TableDesc->Length);
if (i != ACPI_TABLE_FACS)
{
AcpiOsPrintf (" OemID=%6s TableId=%8s OemRevision=%8.8X",
TableDesc->Pointer->OemId,
TableDesc->Pointer->OemTableId,
TableDesc->Pointer->OemRevision);
}
AcpiOsPrintf ("\n");
TableDesc = TableDesc->Next;
AcpiOsPrintf ("%s at %p length %X\n", AcpiGbl_AcpiTableData[i].Name,
AcpiGbl_AcpiTables[i].Pointer,
(UINT32) AcpiGbl_AcpiTables[i].Length);
}
}
}
@ -322,8 +307,8 @@ AcpiDbDisplayTableInfo (
void
AcpiDbUnloadAcpiTable (
char *TableArg,
char *InstanceArg)
NATIVE_CHAR *TableArg,
NATIVE_CHAR *InstanceArg)
{
UINT32 i;
ACPI_STATUS Status;
@ -331,10 +316,10 @@ AcpiDbUnloadAcpiTable (
/* Search all tables for the target type */
for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++)
for (i = 0; i < NUM_ACPI_TABLES; i++)
{
if (!ACPI_STRNCMP (TableArg, AcpiGbl_TableData[i].Signature,
AcpiGbl_TableData[i].SigLength))
if (!ACPI_STRNCMP (TableArg, AcpiGbl_AcpiTableData[i].Signature,
AcpiGbl_AcpiTableData[i].SigLength))
{
/* Found the table, unload it */
@ -374,7 +359,7 @@ AcpiDbUnloadAcpiTable (
void
AcpiDbSetMethodBreakpoint (
char *Location,
NATIVE_CHAR *Location,
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op)
{
@ -427,6 +412,7 @@ AcpiDbSetMethodCallBreakpoint (
return;
}
AcpiGbl_StepToNextCall = TRUE;
}
@ -447,7 +433,7 @@ AcpiDbSetMethodCallBreakpoint (
void
AcpiDbDisassembleAml (
char *Statements,
NATIVE_CHAR *Statements,
ACPI_PARSE_OBJECT *Op)
{
UINT32 NumStatements = 8;
@ -484,8 +470,8 @@ AcpiDbDisassembleAml (
void
AcpiDbDumpNamespace (
char *StartArg,
char *DepthArg)
NATIVE_CHAR *StartArg,
NATIVE_CHAR *DepthArg)
{
ACPI_HANDLE SubtreeEntry = AcpiGbl_RootNode;
UINT32 MaxDepth = ACPI_UINT32_MAX;
@ -512,9 +498,11 @@ AcpiDbDumpNamespace (
return;
}
}
/* Alpha argument */
else
{
/* Alpha argument */
/* The parameter is a name string that must be resolved to a Named obj*/
SubtreeEntry = AcpiDbLocalNsLookup (StartArg);
@ -558,8 +546,8 @@ AcpiDbDumpNamespace (
void
AcpiDbDumpNamespaceByOwner (
char *OwnerArg,
char *DepthArg)
NATIVE_CHAR *OwnerArg,
NATIVE_CHAR *DepthArg)
{
ACPI_HANDLE SubtreeEntry = AcpiGbl_RootNode;
UINT32 MaxDepth = ACPI_UINT32_MAX;
@ -602,7 +590,7 @@ AcpiDbDumpNamespaceByOwner (
void
AcpiDbSendNotify (
char *Name,
NATIVE_CHAR *Name,
UINT32 Value)
{
ACPI_NAMESPACE_NODE *Node;
@ -637,6 +625,7 @@ AcpiDbSendNotify (
AcpiOsPrintf ("Named object is not a device or a thermal object\n");
break;
}
}
@ -657,11 +646,11 @@ AcpiDbSendNotify (
void
AcpiDbSetMethodData (
char *TypeArg,
char *IndexArg,
char *ValueArg)
NATIVE_CHAR *TypeArg,
NATIVE_CHAR *IndexArg,
NATIVE_CHAR *ValueArg)
{
char Type;
NATIVE_CHAR Type;
UINT32 Index;
UINT32 Value;
ACPI_WALK_STATE *WalkState;
@ -692,6 +681,7 @@ AcpiDbSetMethodData (
return;
}
/* Create and initialize the new object */
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
@ -703,6 +693,7 @@ AcpiDbSetMethodData (
ObjDesc->Integer.Value = Value;
/* Store the new object into the target */
switch (Type)
@ -711,7 +702,7 @@ AcpiDbSetMethodData (
/* Set a method argument */
if (Index > ACPI_METHOD_MAX_ARG)
if (Index > MTH_MAX_ARG)
{
AcpiOsPrintf ("Arg%d - Invalid argument name\n", Index);
return;
@ -726,14 +717,14 @@ AcpiDbSetMethodData (
ObjDesc = WalkState->Arguments[Index].Object;
AcpiOsPrintf ("Arg%d: ", Index);
AcpiDmDisplayInternalObject (ObjDesc, WalkState);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
break;
case 'L':
/* Set a method local */
if (Index > ACPI_METHOD_MAX_LOCAL)
if (Index > MTH_MAX_LOCAL)
{
AcpiOsPrintf ("Local%d - Invalid local variable name\n", Index);
return;
@ -748,7 +739,7 @@ AcpiDbSetMethodData (
ObjDesc = WalkState->LocalVariables[Index].Object;
AcpiOsPrintf ("Local%d: ", Index);
AcpiDmDisplayInternalObject (ObjDesc, WalkState);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
break;
default:
@ -796,6 +787,7 @@ AcpiDbWalkForSpecificObjects (
AcpiOsPrintf ("%32s", (char *) Buffer.Pointer);
ACPI_MEM_FREE (Buffer.Pointer);
/* Display short information about the object */
if (ObjDesc)
@ -803,13 +795,14 @@ AcpiDbWalkForSpecificObjects (
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
{
case ACPI_TYPE_METHOD:
AcpiOsPrintf (" #Args %d Concurrency %X",
AcpiOsPrintf (" #Args %d Concurrency %X",
ObjDesc->Method.ParamCount, ObjDesc->Method.Concurrency);
break;
case ACPI_TYPE_INTEGER:
AcpiOsPrintf (" Value %8.8X%8.8X",
ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
AcpiOsPrintf (" Value %8.8X%8.8X",
ACPI_HIDWORD (ObjDesc->Integer.Value),
ACPI_LODWORD (ObjDesc->Integer.Value));
break;
case ACPI_TYPE_STRING:
@ -817,10 +810,11 @@ AcpiDbWalkForSpecificObjects (
break;
case ACPI_TYPE_REGION:
AcpiOsPrintf (" SpaceId %X Length %X Address %8.8X%8.8X",
AcpiOsPrintf (" SpaceId %X Length %X Address %8.8X%8.8X",
ObjDesc->Region.SpaceId,
ObjDesc->Region.Length,
ACPI_FORMAT_UINT64 (ObjDesc->Region.Address));
ACPI_HIDWORD (ObjDesc->Region.Address),
ACPI_LODWORD (ObjDesc->Region.Address));
break;
case ACPI_TYPE_PACKAGE:
@ -857,8 +851,8 @@ AcpiDbWalkForSpecificObjects (
ACPI_STATUS
AcpiDbDisplayObjects (
char *ObjTypeArg,
char *DisplayCountArg)
NATIVE_CHAR *ObjTypeArg,
NATIVE_CHAR *DisplayCountArg)
{
ACPI_OBJECT_TYPE Type;
@ -909,7 +903,7 @@ AcpiDbWalkAndMatchName (
void **ReturnValue)
{
ACPI_STATUS Status;
char *RequestedName = (char *) Context;
NATIVE_CHAR *RequestedName = (NATIVE_CHAR *) Context;
UINT32 i;
ACPI_BUFFER Buffer;
@ -929,6 +923,7 @@ AcpiDbWalkAndMatchName (
}
}
/* Get the full pathname to this object */
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
@ -963,7 +958,7 @@ AcpiDbWalkAndMatchName (
ACPI_STATUS
AcpiDbFindNameInNamespace (
char *NameArg)
NATIVE_CHAR *NameArg)
{
if (ACPI_STRLEN (NameArg) > 4)
@ -997,7 +992,7 @@ AcpiDbFindNameInNamespace (
void
AcpiDbSetScope (
char *Name)
NATIVE_CHAR *Name)
{
ACPI_STATUS Status;
ACPI_NAMESPACE_NODE *Node;
@ -1011,6 +1006,7 @@ AcpiDbSetScope (
AcpiDbPrepNamestring (Name);
if (Name[0] == '\\')
{
/* Validate new scope from the root */
@ -1042,6 +1038,7 @@ AcpiDbSetScope (
AcpiOsPrintf ("New scope: %s\n", AcpiGbl_DbScopeBuf);
return;
ErrorExit:
AcpiOsPrintf ("Could not attach scope: %s, %s\n", Name, AcpiFormatException (Status));
@ -1056,13 +1053,13 @@ ErrorExit:
*
* RETURN: None
*
* DESCRIPTION: Display the resource objects associated with a device.
* DESCRIPTION:
*
******************************************************************************/
void
AcpiDbDisplayResources (
char *ObjectArg)
NATIVE_CHAR *ObjectArg)
{
#if ACPI_MACHINE_WIDTH != 16
@ -1102,6 +1099,7 @@ AcpiDbDisplayResources (
{
AcpiOsPrintf ("GetIrqRoutingTable failed: %s\n", AcpiFormatException (Status));
}
else
{
AcpiRsDumpIrqList ((UINT8 *) AcpiGbl_DbBuffer);
@ -1132,6 +1130,7 @@ GetCrs:
AcpiOsPrintf ("AcpiGetCurrentResources failed: %s\n", AcpiFormatException (Status));
goto GetPrs;
}
else
{
AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
@ -1168,19 +1167,28 @@ GetPrs:
{
AcpiOsPrintf ("AcpiGetPossibleResources failed: %s\n", AcpiFormatException (Status));
}
else
{
AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
}
Cleanup:
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
return;
#endif
}
typedef struct
{
UINT32 Nodes;
UINT32 Objects;
} ACPI_INTEGRITY_INFO;
/*******************************************************************************
*
* FUNCTION: AcpiDbIntegrityWalk
@ -1234,6 +1242,7 @@ AcpiDbIntegrityWalk (
}
}
return (AE_OK);
}
@ -1261,43 +1270,7 @@ AcpiDbCheckIntegrity (void)
AcpiDbIntegrityWalk, (void *) &Info, NULL);
AcpiOsPrintf ("Verified %d namespace nodes with %d Objects\n", Info.Nodes, Info.Objects);
}
/*******************************************************************************
*
* FUNCTION: AcpiDbGenerateGpe
*
* PARAMETERS: None
*
* RETURN: None
*
* DESCRIPTION: Generate a GPE
*
******************************************************************************/
void
AcpiDbGenerateGpe (
char *GpeArg,
char *BlockArg)
{
UINT32 BlockNumber;
UINT32 GpeNumber;
ACPI_GPE_EVENT_INFO *GpeEventInfo;
GpeNumber = ACPI_STRTOUL (GpeArg, NULL, 0);
BlockNumber = ACPI_STRTOUL (BlockArg, NULL, 0);
GpeEventInfo = AcpiEvGetGpeEventInfo (ACPI_TO_POINTER (BlockNumber), GpeNumber);
if (!GpeEventInfo)
{
AcpiOsPrintf ("Invalid GPE\n");
return;
}
AcpiEvGpeDispatch (GpeEventInfo, GpeNumber);
}
#endif /* ACPI_DEBUGGER */

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
* $Revision: 1.98 $
* $Revision: 1.80 $
*
******************************************************************************/
@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
* All rights reserved.
*
* 2. License
@ -122,7 +122,6 @@
#include "acparser.h"
#include "acinterp.h"
#include "acdebug.h"
#include "acdisasm.h"
#ifdef ACPI_DEBUGGER
@ -221,14 +220,14 @@ AcpiDbDumpParserDescriptor (
void
AcpiDbDecodeAndDisplayObject (
char *Target,
char *OutputType)
NATIVE_CHAR *Target,
NATIVE_CHAR *OutputType)
{
void *ObjPtr;
ACPI_NAMESPACE_NODE *Node;
ACPI_OPERAND_OBJECT *ObjDesc;
UINT32 Display = DB_BYTE_DISPLAY;
char Buffer[80];
NATIVE_CHAR Buffer[80];
ACPI_BUFFER RetBuf;
ACPI_STATUS Status;
UINT32 Size;
@ -387,6 +386,272 @@ DumpNte:
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDecodeInternalObject
*
* PARAMETERS: ObjDesc - Object to be displayed
*
* RETURN: None
*
* DESCRIPTION: Short display of an internal object. Numbers and Strings.
*
******************************************************************************/
void
AcpiDbDecodeInternalObject (
ACPI_OPERAND_OBJECT *ObjDesc)
{
UINT32 i;
if (!ObjDesc)
{
AcpiOsPrintf (" Uninitialized");
return;
}
if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
{
AcpiOsPrintf ("%p", ObjDesc);
return;
}
AcpiOsPrintf (" %s", AcpiUtGetObjectTypeName (ObjDesc));
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
{
case ACPI_TYPE_INTEGER:
AcpiOsPrintf (" %8.8X%8.8X", ACPI_HIDWORD (ObjDesc->Integer.Value),
ACPI_LODWORD (ObjDesc->Integer.Value));
break;
case ACPI_TYPE_STRING:
AcpiOsPrintf ("(%d) \"%.24s",
ObjDesc->String.Length, ObjDesc->String.Pointer);
if (ObjDesc->String.Length > 24)
{
AcpiOsPrintf ("...");
}
else
{
AcpiOsPrintf ("\"");
}
break;
case ACPI_TYPE_BUFFER:
AcpiOsPrintf ("(%d)", ObjDesc->Buffer.Length);
for (i = 0; (i < 8) && (i < ObjDesc->Buffer.Length); i++)
{
AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
}
break;
default:
AcpiOsPrintf ("%p", ObjDesc);
break;
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDecodeNode
*
* PARAMETERS: Node - Object to be displayed
*
* RETURN: None
*
* DESCRIPTION: Short display of a namespace node
*
******************************************************************************/
void
AcpiDbDecodeNode (
ACPI_NAMESPACE_NODE *Node)
{
AcpiOsPrintf ("<Node> Name %4.4s Type-%s",
Node->Name.Ascii, AcpiUtGetTypeName (Node->Type));
if (Node->Flags & ANOBJ_METHOD_ARG)
{
AcpiOsPrintf (" [Method Arg]");
}
if (Node->Flags & ANOBJ_METHOD_LOCAL)
{
AcpiOsPrintf (" [Method Local]");
}
AcpiDbDecodeInternalObject (AcpiNsGetAttachedObject (Node));
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayInternalObject
*
* PARAMETERS: ObjDesc - Object to be displayed
* WalkState - Current walk state
*
* RETURN: None
*
* DESCRIPTION: Short display of an internal object
*
******************************************************************************/
void
AcpiDbDisplayInternalObject (
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_WALK_STATE *WalkState)
{
UINT8 Type;
AcpiOsPrintf ("%p ", ObjDesc);
if (!ObjDesc)
{
AcpiOsPrintf ("<NullObj>\n");
return;
}
/* Decode the object type */
switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc))
{
case ACPI_DESC_TYPE_PARSER:
AcpiOsPrintf ("<Parser> ");
break;
case ACPI_DESC_TYPE_NAMED:
AcpiDbDecodeNode ((ACPI_NAMESPACE_NODE *) ObjDesc);
break;
case ACPI_DESC_TYPE_OPERAND:
Type = ACPI_GET_OBJECT_TYPE (ObjDesc);
if (Type > ACPI_TYPE_LOCAL_MAX)
{
AcpiOsPrintf (" Type %X [Invalid Type]", (UINT32) Type);
return;
}
/* Decode the ACPI object type */
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
{
case ACPI_TYPE_LOCAL_REFERENCE:
switch (ObjDesc->Reference.Opcode)
{
case AML_LOCAL_OP:
AcpiOsPrintf ("[Local%d] ", ObjDesc->Reference.Offset);
if (WalkState)
{
ObjDesc = WalkState->LocalVariables[ObjDesc->Reference.Offset].Object;
AcpiOsPrintf ("%p", ObjDesc);
AcpiDbDecodeInternalObject (ObjDesc);
}
break;
case AML_ARG_OP:
AcpiOsPrintf ("[Arg%d] ", ObjDesc->Reference.Offset);
if (WalkState)
{
ObjDesc = WalkState->Arguments[ObjDesc->Reference.Offset].Object;
AcpiOsPrintf ("%p", ObjDesc);
AcpiDbDecodeInternalObject (ObjDesc);
}
break;
case AML_DEBUG_OP:
AcpiOsPrintf ("[Debug] ");
break;
case AML_INDEX_OP:
AcpiOsPrintf ("[Index] ");
if (!ObjDesc->Reference.Where)
{
AcpiOsPrintf ("Uninitialized WHERE ptr");
}
else
{
AcpiDbDecodeInternalObject (*(ObjDesc->Reference.Where));
}
break;
case AML_REF_OF_OP:
AcpiOsPrintf ("[RefOf] ");
/* Reference can be to a Node or an Operand object */
switch (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc->Reference.Object))
{
case ACPI_DESC_TYPE_NAMED:
AcpiDbDecodeNode (ObjDesc->Reference.Object);
break;
case ACPI_DESC_TYPE_OPERAND:
AcpiDbDecodeInternalObject (ObjDesc->Reference.Object);
break;
default:
break;
}
break;
default:
AcpiOsPrintf ("Unknown Reference opcode %X\n",
ObjDesc->Reference.Opcode);
break;
}
break;
default:
AcpiOsPrintf ("<Obj> ");
AcpiOsPrintf (" ");
AcpiDbDecodeInternalObject (ObjDesc);
break;
}
break;
default:
AcpiOsPrintf ("<Not a valid ACPI Object Descriptor> ");
break;
}
AcpiOsPrintf ("\n");
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayMethodInfo
@ -433,10 +698,8 @@ AcpiDbDisplayMethodInfo (
NumArgs = ObjDesc->Method.ParamCount;
Concurrency = ObjDesc->Method.Concurrency;
AcpiOsPrintf ("Currently executing control method is [%4.4s]\n",
AcpiUtGetNodeName (Node));
AcpiOsPrintf ("%X arguments, max concurrency = %X\n",
NumArgs, Concurrency);
AcpiOsPrintf ("Currently executing control method is [%4.4s]\n", Node->Name.Ascii);
AcpiOsPrintf ("%X arguments, max concurrency = %X\n", NumArgs, Concurrency);
RootOp = StartOp;
@ -515,7 +778,10 @@ AcpiDbDisplayMethodInfo (
void
AcpiDbDisplayLocals (void)
{
UINT32 i;
ACPI_WALK_STATE *WalkState;
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_NAMESPACE_NODE *Node;
WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
@ -525,7 +791,16 @@ AcpiDbDisplayLocals (void)
return;
}
AcpiDmDisplayLocals (WalkState);
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
AcpiOsPrintf ("Local Variables for method [%4.4s]:\n", Node->Name.Ascii);
for (i = 0; i < MTH_NUM_LOCALS; i++)
{
ObjDesc = WalkState->LocalVariables[i].Object;
AcpiOsPrintf ("Local%d: ", i);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
}
}
@ -544,7 +819,12 @@ AcpiDbDisplayLocals (void)
void
AcpiDbDisplayArguments (void)
{
UINT32 i;
ACPI_WALK_STATE *WalkState;
ACPI_OPERAND_OBJECT *ObjDesc;
UINT32 NumArgs;
UINT32 Concurrency;
ACPI_NAMESPACE_NODE *Node;
WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
@ -554,7 +834,21 @@ AcpiDbDisplayArguments (void)
return;
}
AcpiDmDisplayArguments (WalkState);
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
NumArgs = ObjDesc->Method.ParamCount;
Concurrency = ObjDesc->Method.Concurrency;
AcpiOsPrintf ("Method [%4.4s] has %X arguments, max concurrency = %X\n",
Node->Name.Ascii, NumArgs, Concurrency);
for (i = 0; i < NumArgs; i++)
{
ObjDesc = WalkState->Arguments[i].Object;
AcpiOsPrintf ("Arg%d: ", i);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
}
}
@ -588,7 +882,7 @@ AcpiDbDisplayResults (void)
}
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
Node = WalkState->MethodNode;
if (WalkState->Results)
{
@ -596,13 +890,13 @@ AcpiDbDisplayResults (void)
}
AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n",
AcpiUtGetNodeName (Node), NumResults);
Node->Name.Ascii, NumResults);
for (i = 0; i < NumResults; i++)
{
ObjDesc = WalkState->Results->Results.ObjDesc[i];
AcpiOsPrintf ("Result%d: ", i);
AcpiDmDisplayInternalObject (ObjDesc, WalkState);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
}
}
@ -640,65 +934,13 @@ AcpiDbDisplayCallingTree (void)
{
Node = WalkState->MethodNode;
AcpiOsPrintf (" [%4.4s]\n", AcpiUtGetNodeName (Node));
AcpiOsPrintf (" [%4.4s]\n", Node->Name.Ascii);
WalkState = WalkState->Next;
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayObjectType
*
* PARAMETERS: ObjectArg - User entered NS node handle
*
* RETURN: None
*
* DESCRIPTION: Display type of an arbitrary NS node
*
******************************************************************************/
void
AcpiDbDisplayObjectType (
char *ObjectArg)
{
ACPI_HANDLE Handle;
ACPI_BUFFER Buffer;
ACPI_DEVICE_INFO *Info;
ACPI_STATUS Status;
ACPI_NATIVE_UINT i;
Handle = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16));
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
Status = AcpiGetObjectInfo (Handle, &Buffer);
if (ACPI_SUCCESS (Status))
{
Info = Buffer.Pointer;
AcpiOsPrintf ("HID: %s, ADR: %8.8X%8.8X, Status %8.8X\n",
&Info->HardwareId,
ACPI_FORMAT_UINT64 (Info->Address),
Info->CurrentStatus);
if (Info->Valid & ACPI_VALID_CID)
{
for (i = 0; i < Info->CompatibilityId.Count; i++)
{
AcpiOsPrintf ("CID #%d: %s\n", i, &Info->CompatibilityId.Id[i]);
}
}
ACPI_MEM_FREE (Info);
}
else
{
AcpiOsPrintf ("%s\n", AcpiFormatException (Status));
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayResultObject
@ -730,7 +972,7 @@ AcpiDbDisplayResultObject (
}
AcpiOsPrintf ("ResultObj: ");
AcpiDmDisplayInternalObject (ObjDesc, WalkState);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
AcpiOsPrintf ("\n");
}
@ -760,51 +1002,8 @@ AcpiDbDisplayArgumentObject (
}
AcpiOsPrintf ("ArgObj: ");
AcpiDmDisplayInternalObject (ObjDesc, WalkState);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayGpes
*
* PARAMETERS: None
*
* RETURN: None
*
* DESCRIPTION: Display the current GPE structures
*
******************************************************************************/
void
AcpiDbDisplayGpes (void)
{
ACPI_GPE_BLOCK_INFO *GpeBlock;
ACPI_GPE_XRUPT_INFO *GpeXruptInfo;
UINT32 i = 0;
GpeXruptInfo = AcpiGbl_GpeXruptListHead;
while (GpeXruptInfo)
{
GpeBlock = GpeXruptInfo->GpeBlockListHead;
while (GpeBlock)
{
AcpiOsPrintf ("Block %d - %p\n", i, GpeBlock);
AcpiOsPrintf (" Registers: %d\n", GpeBlock->RegisterCount);
AcpiOsPrintf (" GPE range: %d to %d\n", GpeBlock->BlockBaseNumber,
GpeBlock->BlockBaseNumber + (GpeBlock->RegisterCount * 8) -1);
AcpiOsPrintf (" RegisterInfo: %p\n", GpeBlock->RegisterInfo);
AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
i++;
GpeBlock = GpeBlock->Next;
}
GpeXruptInfo = GpeXruptInfo->Next;
}
}
#endif /* ACPI_DEBUGGER */