[PATCH] ACPICA: Update to version 20150717 (LP: #1486253)
Colin King
colin.king at canonical.com
Thu Aug 20 06:20:11 UTC 2015
From: Colin Ian King <colin.king at canonical.com>
Changes in this release of ACPICA are detailed at the following
link on the ACPICA developer mailing list:
https://lists.acpica.org/pipermail/devel/2015-August/000792.html
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/acpica/source/common/adisasm.c | 11 +-
src/acpica/source/common/dmtable.c | 2 +-
src/acpica/source/compiler/aslmain.c | 3 +
src/acpica/source/compiler/asloperands.c | 6 +-
src/acpica/source/compiler/aslstartup.c | 2 +-
src/acpica/source/compiler/fwts_iasl_interface.c | 1 +
src/acpica/source/components/debugger/dbcmds.c | 83 +++++--
src/acpica/source/components/debugger/dbconvert.c | 3 -
src/acpica/source/components/debugger/dbdisply.c | 92 +++++---
src/acpica/source/components/debugger/dbexec.c | 62 +++--
src/acpica/source/components/debugger/dbfileio.c | 12 +-
src/acpica/source/components/debugger/dbhistry.c | 4 +-
src/acpica/source/components/debugger/dbinput.c | 260 ++++++++++++---------
src/acpica/source/components/debugger/dbmethod.c | 27 +--
src/acpica/source/components/debugger/dbnames.c | 155 +++++++++---
src/acpica/source/components/debugger/dbobject.c | 36 +--
src/acpica/source/components/debugger/dbstats.c | 21 +-
src/acpica/source/components/debugger/dbtest.c | 31 +--
src/acpica/source/components/debugger/dbutils.c | 33 +--
src/acpica/source/components/debugger/dbxface.c | 39 ++--
.../source/components/disassembler/dmbuffer.c | 21 +-
.../source/components/disassembler/dmcstyle.c | 4 -
.../source/components/disassembler/dmnames.c | 9 +-
.../source/components/disassembler/dmopcode.c | 4 -
.../source/components/disassembler/dmresrc.c | 3 -
.../source/components/disassembler/dmresrcl.c | 4 -
.../source/components/disassembler/dmresrcl2.c | 4 -
.../source/components/disassembler/dmresrcs.c | 4 -
.../source/components/disassembler/dmutils.c | 3 -
src/acpica/source/components/disassembler/dmwalk.c | 65 ++++--
.../source/components/dispatcher/dscontrol.c | 2 +-
src/acpica/source/components/dispatcher/dsdebug.c | 2 +-
src/acpica/source/components/dispatcher/dsinit.c | 15 +-
src/acpica/source/components/dispatcher/dsopcode.c | 42 ++--
src/acpica/source/components/events/evregion.c | 21 +-
src/acpica/source/components/executer/exconfig.c | 9 -
src/acpica/source/components/executer/exdump.c | 2 +-
src/acpica/source/components/executer/exresnte.c | 2 +-
src/acpica/source/components/executer/exresolv.c | 14 +-
src/acpica/source/components/hardware/hwxfsleep.c | 16 +-
src/acpica/source/components/namespace/nseval.c | 4 +-
src/acpica/source/components/namespace/nsload.c | 16 +-
src/acpica/source/components/namespace/nsutils.c | 20 +-
src/acpica/source/components/parser/psloop.c | 13 +-
src/acpica/source/components/resources/rsdump.c | 3 -
src/acpica/source/components/tables/tbfadt.c | 6 +-
src/acpica/source/components/tables/tbfind.c | 17 +-
src/acpica/source/components/tables/tbinstal.c | 39 ++--
src/acpica/source/components/tables/tbutils.c | 70 ++++--
src/acpica/source/components/tables/tbxfload.c | 89 ++++---
src/acpica/source/components/utilities/utfileio.c | 3 +-
src/acpica/source/components/utilities/utinit.c | 1 +
src/acpica/source/components/utilities/utmisc.c | 4 +-
src/acpica/source/components/utilities/utxface.c | 12 +-
src/acpica/source/components/utilities/utxfinit.c | 11 -
src/acpica/source/include/acbuffer.h | 1 +
src/acpica/source/include/acconfig.h | 4 -
src/acpica/source/include/acdebug.h | 17 +-
src/acpica/source/include/acdisasm.h | 7 +-
src/acpica/source/include/acexcep.h | 6 +-
src/acpica/source/include/acglobal.h | 20 +-
src/acpica/source/include/aclocal.h | 23 +-
src/acpica/source/include/acpixf.h | 10 +-
src/acpica/source/include/actables.h | 18 +-
src/acpica/source/include/actypes.h | 2 +
src/acpica/source/include/acutils.h | 2 +-
src/acpica/source/include/platform/acenv.h | 21 +-
67 files changed, 952 insertions(+), 616 deletions(-)
diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c
index b0d48d2..44a052e 100644
--- a/src/acpica/source/common/adisasm.c
+++ b/src/acpica/source/common/adisasm.c
@@ -205,7 +205,7 @@ AcpiDsMethodDataInitArgs (
static ACPI_TABLE_DESC LocalTables[1];
-ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot;
+static ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot;
/*******************************************************************************
@@ -259,7 +259,6 @@ AdInitialize (
AcpiGbl_RootTableList.CurrentTableCount = 0;
AcpiGbl_RootTableList.Tables = LocalTables;
- AcpiGbl_PreviousOp = NULL;
return (Status);
}
@@ -389,7 +388,7 @@ AdAmlDisassemble (
return (Status);
}
- if (!AcpiGbl_DbOpt_Disasm)
+ if (!AcpiGbl_DmOpt_Disasm)
{
return (AE_OK);
}
@@ -578,7 +577,7 @@ AdAmlDisassemble (
/* Optional displays */
- if (AcpiGbl_DbOpt_Disasm)
+ if (AcpiGbl_DmOpt_Disasm)
{
/* This is the real disassembly */
@@ -814,7 +813,7 @@ AdDisplayTables (
return (AE_NOT_EXIST);
}
- if (!AcpiGbl_DbOpt_Verbose)
+ if (!AcpiGbl_DmOpt_Listing)
{
AdCreateTableHeader (Filename, Table);
}
@@ -822,7 +821,7 @@ AdDisplayTables (
AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX);
MpEmitMappingInfo ();
- if (AcpiGbl_DbOpt_Verbose)
+ if (AcpiGbl_DmOpt_Listing)
{
AcpiOsPrintf ("\n\nTable Header:\n");
AcpiUtDebugDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER),
diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c
index 66dabde..c301da1 100644
--- a/src/acpica/source/common/dmtable.c
+++ b/src/acpica/source/common/dmtable.c
@@ -774,7 +774,7 @@ AcpiDmLineHeader2 (
* SubtableLength - Length of this sub-descriptor
* Info - Info table for this ACPI table
*
- * RETURN: None
+ * RETURN: Status
*
* DESCRIPTION: Display ACPI table contents by walking the Info table.
*
diff --git a/src/acpica/source/compiler/aslmain.c b/src/acpica/source/compiler/aslmain.c
index 3d94f24..ca1ffc6 100644
--- a/src/acpica/source/compiler/aslmain.c
+++ b/src/acpica/source/compiler/aslmain.c
@@ -264,6 +264,7 @@ Usage (
ACPI_OPTION ("-e <f1 f2 ...>", "Include ACPI table(s) for external symbol resolution");
ACPI_OPTION ("-fe <file>", "Specify external symbol declaration file");
ACPI_OPTION ("-in", "Ignore NoOp opcodes");
+ ACPI_OPTION ("-l", "Disassemble to mixed ASL and AML code");
ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file");
printf ("\nDebug Options:\n");
@@ -370,6 +371,8 @@ AslInitialize (
UINT32 i;
+ AcpiGbl_DmOpt_Verbose = FALSE;
+
for (i = 0; i < ASL_NUM_FILES; i++)
{
Gbl_Files[i].Handle = NULL;
diff --git a/src/acpica/source/compiler/asloperands.c b/src/acpica/source/compiler/asloperands.c
index 71d94c7..8a7382a 100644
--- a/src/acpica/source/compiler/asloperands.c
+++ b/src/acpica/source/compiler/asloperands.c
@@ -1004,13 +1004,13 @@ OpnDoDefinitionBlock (
if (Child->Asl.Value.String)
{
Gbl_TableSignature = Child->Asl.Value.String;
- if (strlen (Gbl_TableSignature) != 4)
+ if (strlen (Gbl_TableSignature) != ACPI_NAME_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child,
- "Length not exactly 4");
+ "Length is not exactly 4");
}
- for (i = 0; i < 4; i++)
+ for (i = 0; i < ACPI_NAME_SIZE; i++)
{
if (!isalnum ((int) Gbl_TableSignature[i]))
{
diff --git a/src/acpica/source/compiler/aslstartup.c b/src/acpica/source/compiler/aslstartup.c
index 9fa4f80..684a3fc 100644
--- a/src/acpica/source/compiler/aslstartup.c
+++ b/src/acpica/source/compiler/aslstartup.c
@@ -325,7 +325,7 @@ AslDoDisassembly (
/* This is where the disassembly happens */
- AcpiGbl_DbOpt_Disasm = TRUE;
+ AcpiGbl_DmOpt_Disasm = TRUE;
Status = AdAmlDisassemble (AslToFile,
Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_OutputFilenamePrefix,
&Gbl_Files[ASL_FILE_INPUT].Filename);
diff --git a/src/acpica/source/compiler/fwts_iasl_interface.c b/src/acpica/source/compiler/fwts_iasl_interface.c
index 68338c9..ee2970d 100644
--- a/src/acpica/source/compiler/fwts_iasl_interface.c
+++ b/src/acpica/source/compiler/fwts_iasl_interface.c
@@ -89,6 +89,7 @@ int fwts_iasl_disassemble_aml(
Gbl_OutputFilenamePrefix = (char*)outputfile;
Gbl_UseDefaultAmlFilename = FALSE;
AcpiGbl_CstyleDisassembly = FALSE;
+ AcpiGbl_DmOpt_Verbose = FALSE;
UtConvertBackslashes (Gbl_OutputFilenamePrefix);
/*
diff --git a/src/acpica/source/components/debugger/dbcmds.c b/src/acpica/source/components/debugger/dbcmds.c
index f3bed06..17e1265 100644
--- a/src/acpica/source/components/debugger/dbcmds.c
+++ b/src/acpica/source/components/debugger/dbcmds.c
@@ -121,7 +121,6 @@
#include "acresrc.h"
#include "actables.h"
-#ifdef ACPI_DEBUGGER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbcmds")
@@ -160,6 +159,7 @@ AcpiDbDoOneSleepState (
static char *AcpiDbTraceMethodName = NULL;
+
/*******************************************************************************
*
* FUNCTION: AcpiDbConvertToNode
@@ -212,7 +212,8 @@ AcpiDbConvertToNode (
Node = AcpiDbLocalNsLookup (InString);
if (!Node)
{
- AcpiOsPrintf ("Could not find [%s] in namespace, defaulting to root node\n",
+ AcpiOsPrintf (
+ "Could not find [%s] in namespace, defaulting to root node\n",
InString);
Node = AcpiGbl_RootNode;
}
@@ -275,7 +276,7 @@ AcpiDbSleep (
*
* PARAMETERS: SleepState - Desired sleep state (0-5)
*
- * RETURN: Status
+ * RETURN: None
*
* DESCRIPTION: Simulate a sleep/wake sequence
*
@@ -412,7 +413,8 @@ AcpiDbDisplayTableInfo (
/* Header */
- AcpiOsPrintf ("Idx ID Status Type TableHeader (Sig, Address, Length)\n");
+ AcpiOsPrintf ("Idx ID Status Type "
+ "TableHeader (Sig, Address, Length, Misc)\n");
/* Walk the entire root table list */
@@ -571,7 +573,8 @@ AcpiDbSendNotify (
else
{
AcpiOsPrintf (
- "Named object [%4.4s] Type %s, must be Device/Thermal/Processor type\n",
+ "Named object [%4.4s] Type %s, "
+ "must be Device/Thermal/Processor type\n",
AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type));
}
}
@@ -604,8 +607,7 @@ AcpiDbDisplayInterfaces (
if (!ActionArg)
{
- (void) AcpiOsAcquireMutex (AcpiGbl_OsiMutex,
- ACPI_WAIT_FOREVER);
+ (void) AcpiOsAcquireMutex (AcpiGbl_OsiMutex, ACPI_WAIT_FOREVER);
NextInterface = AcpiGbl_SupportedInterfaces;
while (NextInterface)
@@ -614,6 +616,7 @@ AcpiDbDisplayInterfaces (
{
AcpiOsPrintf ("%s\n", NextInterface->Name);
}
+
NextInterface = NextInterface->Next;
}
@@ -719,7 +722,8 @@ AcpiDbDisplayTemplate (
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could not convert Buffer to a resource list: %s, %s\n",
+ AcpiOsPrintf (
+ "Could not convert Buffer to a resource list: %s, %s\n",
BufferArg, AcpiFormatException (Status));
goto DumpBuffer;
}
@@ -780,7 +784,8 @@ AcpiDmCompareAmlResources (
if (Aml1BufferLength != Aml2BufferLength)
{
AcpiOsPrintf (
- "**** Buffer length mismatch in converted AML: Original %X, New %X ****\n",
+ "**** Buffer length mismatch in converted "
+ "AML: Original %X, New %X ****\n",
Aml1BufferLength, Aml2BufferLength);
}
@@ -804,7 +809,8 @@ AcpiDmCompareAmlResources (
if (Aml1Length != Aml2Length)
{
AcpiOsPrintf (
- "**** Length mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X Len1 %X, Len2 %X ****\n",
+ "**** Length mismatch in descriptor [%.2X] type %2.2X, "
+ "Offset %8.8X Len1 %X, Len2 %X ****\n",
Count, ResourceType, Offset, Aml1Length, Aml2Length);
}
@@ -813,7 +819,8 @@ AcpiDmCompareAmlResources (
else if (memcmp (Aml1, Aml2, Aml1Length))
{
AcpiOsPrintf (
- "**** Data mismatch in descriptor [%.2X] type %2.2X, Offset %8.8X ****\n",
+ "**** Data mismatch in descriptor [%.2X] type %2.2X, "
+ "Offset %8.8X ****\n",
Count, ResourceType, Offset);
for (i = 0; i < Aml1Length; i++)
@@ -821,7 +828,8 @@ AcpiDmCompareAmlResources (
if (Aml1[i] != Aml2[i])
{
AcpiOsPrintf (
- "Mismatch at byte offset %.2X: is %2.2X, should be %2.2X\n",
+ "Mismatch at byte offset %.2X: is %2.2X, "
+ "should be %2.2X\n",
i, Aml2[i], Aml1[i]);
}
}
@@ -986,10 +994,15 @@ AcpiDbDeviceResources (
/* Get handles to the resource methods for this device */
- (void) AcpiGetHandle (Node, METHOD_NAME__PRT, ACPI_CAST_PTR (ACPI_HANDLE, &PrtNode));
- (void) AcpiGetHandle (Node, METHOD_NAME__CRS, ACPI_CAST_PTR (ACPI_HANDLE, &CrsNode));
- (void) AcpiGetHandle (Node, METHOD_NAME__PRS, ACPI_CAST_PTR (ACPI_HANDLE, &PrsNode));
- (void) AcpiGetHandle (Node, METHOD_NAME__AEI, ACPI_CAST_PTR (ACPI_HANDLE, &AeiNode));
+ (void) AcpiGetHandle (Node, METHOD_NAME__PRT,
+ ACPI_CAST_PTR (ACPI_HANDLE, &PrtNode));
+ (void) AcpiGetHandle (Node, METHOD_NAME__CRS,
+ ACPI_CAST_PTR (ACPI_HANDLE, &CrsNode));
+ (void) AcpiGetHandle (Node, METHOD_NAME__PRS,
+ ACPI_CAST_PTR (ACPI_HANDLE, &PrsNode));
+ (void) AcpiGetHandle (Node, METHOD_NAME__AEI,
+ ACPI_CAST_PTR (ACPI_HANDLE, &AeiNode));
+
if (!PrtNode && !CrsNode && !PrsNode && !AeiNode)
{
goto Cleanup; /* Nothing to do */
@@ -1143,7 +1156,8 @@ GetPrs:
goto GetAei;
}
- AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
+ AcpiRsDumpResourceList (ACPI_CAST_PTR (
+ ACPI_RESOURCE, AcpiGbl_DbBuffer));
}
@@ -1176,7 +1190,8 @@ GetAei:
goto Cleanup;
}
- AcpiRsDumpResourceList (ACPI_CAST_PTR (ACPI_RESOURCE, AcpiGbl_DbBuffer));
+ AcpiRsDumpResourceList (ACPI_CAST_PTR (
+ ACPI_RESOURCE, AcpiGbl_DbBuffer));
}
@@ -1215,7 +1230,7 @@ AcpiDbDisplayResources (
if (!ObjectArg || (!strcmp (ObjectArg, "*")))
{
(void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, AcpiDbDeviceResources, NULL, NULL, NULL);
+ ACPI_UINT32_MAX, AcpiDbDeviceResources, NULL, NULL, NULL);
}
else
{
@@ -1226,7 +1241,8 @@ AcpiDbDisplayResources (
{
if (Node->Type != ACPI_TYPE_DEVICE)
{
- AcpiOsPrintf ("%4.4s: Name is not a device object (%s)\n",
+ AcpiOsPrintf (
+ "%4.4s: Name is not a device object (%s)\n",
Node->Name.Ascii, AcpiUtGetTypeName (Node->Type));
}
else
@@ -1291,6 +1307,19 @@ AcpiDbGenerateGpe (
(void) AcpiEvGpeDispatch (NULL, GpeEventInfo, GpeNumber);
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbGenerateSci
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Simulate an SCI -- just call the SCI dispatch.
+ *
+ ******************************************************************************/
+
void
AcpiDbGenerateSci (
void)
@@ -1331,10 +1360,12 @@ AcpiDbTrace (
{
AcpiUtStrupr (EnableArg);
}
+
if (OnceArg)
{
AcpiUtStrupr (OnceArg);
}
+
if (MethodArg)
{
if (AcpiDbTraceMethodName)
@@ -1342,14 +1373,18 @@ AcpiDbTrace (
ACPI_FREE (AcpiDbTraceMethodName);
AcpiDbTraceMethodName = NULL;
}
+
AcpiDbTraceMethodName = ACPI_ALLOCATE (strlen (MethodArg) + 1);
if (!AcpiDbTraceMethodName)
{
- AcpiOsPrintf ("Failed to allocate method name (%s)\n", MethodArg);
+ AcpiOsPrintf ("Failed to allocate method name (%s)\n",
+ MethodArg);
return;
}
+
strcpy (AcpiDbTraceMethodName, MethodArg);
}
+
if (!strcmp (EnableArg, "ENABLE") ||
!strcmp (EnableArg, "METHOD") ||
!strcmp (EnableArg, "OPCODE"))
@@ -1370,10 +1405,12 @@ AcpiDbTrace (
}
Flags = ACPI_TRACE_ENABLED;
+
if (!strcmp (EnableArg, "OPCODE"))
{
Flags |= ACPI_TRACE_OPCODE;
}
+
if (OnceArg && !strcmp (OnceArg, "ONCE"))
{
Flags |= ACPI_TRACE_ONESHOT;
@@ -1381,7 +1418,5 @@ AcpiDbTrace (
}
(void) AcpiDebugTrace (AcpiDbTraceMethodName,
- DebugLevel, DebugLayer, Flags);
+ DebugLevel, DebugLayer, Flags);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbconvert.c b/src/acpica/source/components/debugger/dbconvert.c
index 7e5ea39..d1201f3 100644
--- a/src/acpica/source/components/debugger/dbconvert.c
+++ b/src/acpica/source/components/debugger/dbconvert.c
@@ -117,7 +117,6 @@
#include "accommon.h"
#include "acdebug.h"
-#ifdef ACPI_DEBUGGER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbconvert")
@@ -600,5 +599,3 @@ AcpiDbDumpPldBuffer (
ACPI_FREE (PldInfo);
ACPI_FREE (NewBuffer);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbdisply.c b/src/acpica/source/components/debugger/dbdisply.c
index 1dd679b..3a3ca15 100644
--- a/src/acpica/source/components/debugger/dbdisply.c
+++ b/src/acpica/source/components/debugger/dbdisply.c
@@ -123,8 +123,6 @@
#include "acdebug.h"
-#ifdef ACPI_DEBUGGER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbdisply")
@@ -314,7 +312,8 @@ AcpiDbDecodeAndDisplayObject (
ObjPtr = AcpiDbGetPointer (Target);
if (!AcpiOsReadable (ObjPtr, 16))
{
- AcpiOsPrintf ("Address %p is invalid in this address space\n",
+ AcpiOsPrintf (
+ "Address %p is invalid in this address space\n",
ObjPtr);
return;
}
@@ -330,7 +329,8 @@ AcpiDbDecodeAndDisplayObject (
if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_NAMESPACE_NODE)))
{
AcpiOsPrintf (
- "Cannot read entire Named object at address %p\n", ObjPtr);
+ "Cannot read entire Named object at address %p\n",
+ ObjPtr);
return;
}
@@ -343,13 +343,14 @@ AcpiDbDecodeAndDisplayObject (
if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_OPERAND_OBJECT)))
{
- AcpiOsPrintf ("Cannot read entire ACPI object at address %p\n",
+ AcpiOsPrintf (
+ "Cannot read entire ACPI object at address %p\n",
ObjPtr);
return;
}
- AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT), Display,
- ACPI_UINT32_MAX);
+ AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_OPERAND_OBJECT),
+ Display, ACPI_UINT32_MAX);
AcpiExDumpObjectDescriptor (ObjPtr, 1);
break;
@@ -360,12 +361,13 @@ AcpiDbDecodeAndDisplayObject (
if (!AcpiOsReadable (ObjPtr, sizeof (ACPI_PARSE_OBJECT)))
{
AcpiOsPrintf (
- "Cannot read entire Parser object at address %p\n", ObjPtr);
+ "Cannot read entire Parser object at address %p\n",
+ ObjPtr);
return;
}
- AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT), Display,
- ACPI_UINT32_MAX);
+ AcpiUtDebugDumpBuffer (ObjPtr, sizeof (ACPI_PARSE_OBJECT),
+ Display, ACPI_UINT32_MAX);
AcpiDbDumpParserDescriptor ((ACPI_PARSE_OBJECT *) ObjPtr);
break;
@@ -404,7 +406,7 @@ AcpiDbDecodeAndDisplayObject (
DumpNode:
/* Now dump the NS node */
- Status = AcpiGetName (Node, ACPI_FULL_PATHNAME, &RetBuf);
+ Status = AcpiGetName (Node, ACPI_FULL_PATHNAME_NO_TRAILING, &RetBuf);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not convert name to pathname\n");
@@ -437,8 +439,8 @@ DumpNode:
return;
}
- AcpiUtDebugDumpBuffer ((void *) ObjDesc, sizeof (ACPI_OPERAND_OBJECT),
- Display, ACPI_UINT32_MAX);
+ AcpiUtDebugDumpBuffer ((void *) ObjDesc,
+ sizeof (ACPI_OPERAND_OBJECT), Display, ACPI_UINT32_MAX);
AcpiExDumpObjectDescriptor (ObjDesc, 1);
}
}
@@ -659,7 +661,7 @@ AcpiDbDisplayResults (
}
AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n",
- AcpiUtGetNodeName (Node), ResultCount);
+ AcpiUtGetNodeName (Node), ResultCount);
/* From the top element of result stack */
@@ -671,11 +673,13 @@ AcpiDbDisplayResults (
ObjDesc = Frame->Results.ObjDesc[Index];
AcpiOsPrintf ("Result%u: ", i);
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
+
if (Index == 0)
{
Frame = Frame->Results.Next;
Index = ACPI_RESULTS_FRAME_OBJ_NUM;
}
+
Index--;
}
}
@@ -714,7 +718,6 @@ AcpiDbDisplayCallingTree (
while (WalkState)
{
Node = WalkState->MethodNode;
-
AcpiOsPrintf (" [%4.4s]\n", AcpiUtGetNodeName (Node));
WalkState = WalkState->Next;
@@ -782,14 +785,17 @@ AcpiDbDisplayObjectType (
{
AcpiOsPrintf ("HID: %s\n", Info->HardwareId.String);
}
+
if (Info->Valid & ACPI_VALID_UID)
{
AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
}
+
if (Info->Valid & ACPI_VALID_SUB)
{
AcpiOsPrintf ("SUB: %s\n", Info->SubsystemId.String);
}
+
if (Info->Valid & ACPI_VALID_CID)
{
for (i = 0; i < Info->CompatibleIdList.Count; i++)
@@ -914,7 +920,8 @@ AcpiDbDisplayGpes (
GpeBlock = GpeXruptInfo->GpeBlockListHead;
while (GpeBlock)
{
- Status = AcpiGetName (GpeBlock->Node, ACPI_FULL_PATHNAME, &RetBuf);
+ Status = AcpiGetName (GpeBlock->Node,
+ ACPI_FULL_PATHNAME_NO_TRAILING, &RetBuf);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not convert name to pathname\n");
@@ -929,13 +936,16 @@ AcpiDbDisplayGpes (
GpeType = "GPE Block Device";
}
- AcpiOsPrintf ("\nBlock %u - Info %p DeviceNode %p [%s] - %s\n",
+ AcpiOsPrintf (
+ "\nBlock %u - Info %p DeviceNode %p [%s] - %s\n",
Block, GpeBlock, GpeBlock->Node, Buffer, GpeType);
- AcpiOsPrintf (" Registers: %u (%u GPEs)\n",
+ AcpiOsPrintf (
+ " Registers: %u (%u GPEs)\n",
GpeBlock->RegisterCount, GpeBlock->GpeCount);
- AcpiOsPrintf (" GPE range: 0x%X to 0x%X on interrupt %u\n",
+ AcpiOsPrintf (
+ " GPE range: 0x%X to 0x%X on interrupt %u\n",
GpeBlock->BlockBaseNumber,
GpeBlock->BlockBaseNumber + (GpeBlock->GpeCount - 1),
GpeXruptInfo->InterruptNumber);
@@ -943,8 +953,10 @@ AcpiDbDisplayGpes (
AcpiOsPrintf (
" RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
GpeBlock->RegisterInfo,
- ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
- ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
+ ACPI_FORMAT_UINT64 (
+ GpeBlock->RegisterInfo->StatusAddress.Address),
+ ACPI_FORMAT_UINT64 (
+ GpeBlock->RegisterInfo->EnableAddress.Address));
AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
@@ -955,14 +967,18 @@ AcpiDbDisplayGpes (
GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
AcpiOsPrintf (
- " Reg %u: (GPE %.2X-%.2X) RunEnable %2.2X WakeEnable %2.2X"
+ " Reg %u: (GPE %.2X-%.2X) "
+ "RunEnable %2.2X WakeEnable %2.2X"
" Status %8.8X%8.8X Enable %8.8X%8.8X\n",
i, GpeRegisterInfo->BaseGpeNumber,
- GpeRegisterInfo->BaseGpeNumber + (ACPI_GPE_REGISTER_WIDTH - 1),
+ GpeRegisterInfo->BaseGpeNumber +
+ (ACPI_GPE_REGISTER_WIDTH - 1),
GpeRegisterInfo->EnableForRun,
GpeRegisterInfo->EnableForWake,
- ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
- ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
+ ACPI_FORMAT_UINT64 (
+ GpeRegisterInfo->StatusAddress.Address),
+ ACPI_FORMAT_UINT64 (
+ GpeRegisterInfo->EnableAddress.Address));
/* Now look at the individual GPEs in this byte register */
@@ -1030,7 +1046,9 @@ AcpiDbDisplayGpes (
Count++;
Notify = Notify->Next;
}
- AcpiOsPrintf ("Implicit Notify on %u devices", Count);
+
+ AcpiOsPrintf ("Implicit Notify on %u devices",
+ Count);
break;
case ACPI_GPE_DISPATCH_RAW_HANDLER:
@@ -1048,9 +1066,11 @@ AcpiDbDisplayGpes (
AcpiOsPrintf (")\n");
}
}
+
Block++;
GpeBlock = GpeBlock->Next;
}
+
GpeXruptInfo = GpeXruptInfo->Next;
}
}
@@ -1096,12 +1116,15 @@ AcpiDbDisplayHandlers (
while (HandlerObj)
{
- if (AcpiGbl_SpaceIdList[i] == HandlerObj->AddressSpace.SpaceId)
+ if (AcpiGbl_SpaceIdList[i] ==
+ HandlerObj->AddressSpace.SpaceId)
{
AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
(HandlerObj->AddressSpace.HandlerFlags &
- ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
+ ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ?
+ "Default" : "User",
HandlerObj->AddressSpace.Handler);
+
goto FoundHandler;
}
@@ -1126,7 +1149,8 @@ AcpiDbDisplayHandlers (
"User-defined ID", HandlerObj->AddressSpace.SpaceId);
AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING,
(HandlerObj->AddressSpace.HandlerFlags &
- ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ? "Default" : "User",
+ ACPI_ADDR_HANDLER_DEFAULT_INSTALLED) ?
+ "Default" : "User",
HandlerObj->AddressSpace.Handler);
}
@@ -1162,7 +1186,9 @@ AcpiDbDisplayHandlers (
for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiGbl_HandlerList); i++)
{
- AcpiOsPrintf (ACPI_HANDLER_NAME_STRING, AcpiGbl_HandlerList[i].Name);
+ AcpiOsPrintf (ACPI_HANDLER_NAME_STRING,
+ AcpiGbl_HandlerList[i].Name);
+
if (AcpiGbl_HandlerList[i].Handler)
{
AcpiOsPrintf (ACPI_HANDLER_PRESENT_STRING, "User",
@@ -1180,8 +1206,8 @@ AcpiDbDisplayHandlers (
AcpiOsPrintf ("\nOperation Region Handlers for specific devices:\n");
(void) AcpiWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, AcpiDbDisplayNonRootHandlers,
- NULL, NULL, NULL);
+ ACPI_UINT32_MAX, AcpiDbDisplayNonRootHandlers,
+ NULL, NULL, NULL);
}
@@ -1245,5 +1271,3 @@ AcpiDbDisplayNonRootHandlers (
ACPI_FREE (Pathname);
return (AE_OK);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbexec.c b/src/acpica/source/components/debugger/dbexec.c
index 54d535a..2f3c1b3 100644
--- a/src/acpica/source/components/debugger/dbexec.c
+++ b/src/acpica/source/components/debugger/dbexec.c
@@ -118,7 +118,6 @@
#include "acdebug.h"
#include "acnamesp.h"
-#ifdef ACPI_DEBUGGER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbexec")
@@ -285,7 +284,8 @@ AcpiDbExecuteMethod (
if (Status == AE_BUFFER_OVERFLOW)
{
ACPI_ERROR ((AE_INFO,
- "Possible overflow of internal debugger buffer (size 0x%X needed 0x%X)",
+ "Possible overflow of internal debugger "
+ "buffer (size 0x%X needed 0x%X)",
ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
}
}
@@ -452,10 +452,11 @@ AcpiDbExecutionWalk (
Status = AcpiEvaluateObject (Node, NULL, NULL, &ReturnObj);
- AcpiOsPrintf ("Evaluation of [%4.4s] returned %s\n", AcpiUtGetNodeName (Node),
- AcpiFormatException (Status));
- AcpiGbl_MethodExecuting = FALSE;
+ AcpiOsPrintf ("Evaluation of [%4.4s] returned %s\n",
+ AcpiUtGetNodeName (Node),
+ AcpiFormatException (Status));
+ AcpiGbl_MethodExecuting = FALSE;
return (AE_OK);
}
@@ -466,6 +467,7 @@ AcpiDbExecutionWalk (
*
* PARAMETERS: Name - Name of method to execute
* Args - Parameters to the method
+ * Types -
* Flags - single step/no single step
*
* RETURN: None
@@ -486,7 +488,6 @@ AcpiDbExecute (
ACPI_BUFFER ReturnObj;
char *NameString;
-
#ifdef ACPI_DEBUG_OUTPUT
UINT32 PreviousAllocations;
UINT32 Allocations;
@@ -500,7 +501,7 @@ AcpiDbExecute (
if (*Name == '*')
{
(void) AcpiWalkNamespace (ACPI_TYPE_METHOD, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL, NULL);
+ ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL, NULL);
return;
}
else
@@ -536,7 +537,8 @@ AcpiDbExecute (
&AcpiGbl_DbMethodInfo.Method);
if (ACPI_SUCCESS (Status))
{
- Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo, &ReturnObj);
+ Status = AcpiDbExecuteMethod (&AcpiGbl_DbMethodInfo,
+ &ReturnObj);
}
ACPI_FREE (NameString);
}
@@ -557,15 +559,17 @@ AcpiDbExecute (
if (Allocations > 0)
{
- AcpiOsPrintf ("0x%X Outstanding allocations after evaluation of %s\n",
- Allocations, AcpiGbl_DbMethodInfo.Pathname);
+ AcpiOsPrintf (
+ "0x%X Outstanding allocations after evaluation of %s\n",
+ Allocations, AcpiGbl_DbMethodInfo.Pathname);
}
#endif
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Evaluation of %s failed with status %s\n",
- AcpiGbl_DbMethodInfo.Pathname, AcpiFormatException (Status));
+ AcpiGbl_DbMethodInfo.Pathname,
+ AcpiFormatException (Status));
}
else
{
@@ -574,15 +578,18 @@ AcpiDbExecute (
if (ReturnObj.Length)
{
AcpiOsPrintf (
- "Evaluation of %s returned object %p, external buffer length %X\n",
+ "Evaluation of %s returned object %p, "
+ "external buffer length %X\n",
AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
(UINT32) ReturnObj.Length);
+
AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
/* Dump a _PLD buffer if present */
if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
- AcpiGbl_DbMethodInfo.Method)->Name.Ascii), METHOD_NAME__PLD))
+ AcpiGbl_DbMethodInfo.Method)->Name.Ascii),
+ METHOD_NAME__PLD))
{
AcpiDbDumpPldBuffer (ReturnObj.Pointer);
}
@@ -635,8 +642,10 @@ AcpiDbMethodThread (
if (Info->InitArgs)
{
- AcpiDbUint32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
- AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
+ AcpiDbUint32ToHexString (Info->NumCreated,
+ Info->IndexOfThreadStr);
+ AcpiDbUint32ToHexString ((UINT32) AcpiOsGetThreadId (),
+ Info->IdOfThreadStr);
}
if (Info->Threads && (Info->NumCreated < Info->NumThreads))
@@ -671,7 +680,8 @@ AcpiDbMethodThread (
#if 0
if ((i % 100) == 0)
{
- AcpiOsPrintf ("%u loops, Thread 0x%x\n", i, AcpiOsGetThreadId ());
+ AcpiOsPrintf ("%u loops, Thread 0x%x\n",
+ i, AcpiOsGetThreadId ());
}
if (ReturnObj.Length)
@@ -686,7 +696,8 @@ AcpiDbMethodThread (
/* Signal our completion */
Allow = 0;
- (void) AcpiOsWaitSemaphore (Info->ThreadCompleteGate, 1, ACPI_WAIT_FOREVER);
+ (void) AcpiOsWaitSemaphore (Info->ThreadCompleteGate,
+ 1, ACPI_WAIT_FOREVER);
Info->NumCompleted++;
if (Info->NumCompleted == Info->NumThreads)
@@ -702,7 +713,8 @@ AcpiDbMethodThread (
Status = AcpiOsSignalSemaphore (Info->MainThreadGate, 1);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could not signal debugger thread sync semaphore, %s\n",
+ AcpiOsPrintf (
+ "Could not signal debugger thread sync semaphore, %s\n",
AcpiFormatException (Status));
}
}
@@ -758,7 +770,8 @@ AcpiDbCreateExecutionThreads (
Status = AcpiOsCreateSemaphore (1, 0, &MainThreadGate);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could not create semaphore for synchronization with the main thread, %s\n",
+ AcpiOsPrintf ("Could not create semaphore for "
+ "synchronization with the main thread, %s\n",
AcpiFormatException (Status));
return;
}
@@ -770,8 +783,10 @@ AcpiDbCreateExecutionThreads (
Status = AcpiOsCreateSemaphore (1, 1, &ThreadCompleteGate);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could not create semaphore for synchronization between the created threads, %s\n",
+ AcpiOsPrintf ("Could not create semaphore for "
+ "synchronization between the created threads, %s\n",
AcpiFormatException (Status));
+
(void) AcpiOsDeleteSemaphore (MainThreadGate);
return;
}
@@ -779,8 +794,10 @@ AcpiDbCreateExecutionThreads (
Status = AcpiOsCreateSemaphore (1, 1, &InfoGate);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could not create semaphore for synchronization of AcpiGbl_DbMethodInfo, %s\n",
+ AcpiOsPrintf ("Could not create semaphore for "
+ "synchronization of AcpiGbl_DbMethodInfo, %s\n",
AcpiFormatException (Status));
+
(void) AcpiOsDeleteSemaphore (ThreadCompleteGate);
(void) AcpiOsDeleteSemaphore (MainThreadGate);
return;
@@ -792,6 +809,7 @@ AcpiDbCreateExecutionThreads (
AcpiGbl_DbMethodInfo.NumThreads = NumThreads;
Size = sizeof (ACPI_THREAD_ID) * AcpiGbl_DbMethodInfo.NumThreads;
+
AcpiGbl_DbMethodInfo.Threads = AcpiOsAllocate (Size);
if (AcpiGbl_DbMethodInfo.Threads == NULL)
{
@@ -879,5 +897,3 @@ CleanupAndExit:
AcpiOsFree (AcpiGbl_DbMethodInfo.Threads);
AcpiGbl_DbMethodInfo.Threads = NULL;
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbfileio.c b/src/acpica/source/components/debugger/dbfileio.c
index bc45b1a..4cdbc01 100644
--- a/src/acpica/source/components/debugger/dbfileio.c
+++ b/src/acpica/source/components/debugger/dbfileio.c
@@ -119,13 +119,12 @@
#include "acdebug.h"
#include "actables.h"
-#if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER)
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbfileio")
-#ifdef ACPI_DEBUGGER
+#ifdef ACPI_DEBUGGER
/*******************************************************************************
*
* FUNCTION: AcpiDbCloseDebugFile
@@ -150,7 +149,8 @@ AcpiDbCloseDebugFile (
fclose (AcpiGbl_DebugFile);
AcpiGbl_DebugFile = NULL;
AcpiGbl_DbOutputToFile = FALSE;
- AcpiOsPrintf ("Debug output file %s closed\n", AcpiGbl_DbDebugFilename);
+ AcpiOsPrintf ("Debug output file %s closed\n",
+ AcpiGbl_DbDebugFilename);
}
#endif
}
@@ -217,12 +217,12 @@ AeLocalLoadTable (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status = AE_OK;
-/* ACPI_TABLE_DESC TableInfo; */
ACPI_FUNCTION_TRACE (AeLocalLoadTable);
-#if 0
+#if 0
+/* ACPI_TABLE_DESC TableInfo; */
if (!Table)
{
@@ -354,5 +354,3 @@ AcpiDbGetTableFromFile (
#endif /* ACPI_APPLICATION */
return (AE_OK);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbhistry.c b/src/acpica/source/components/debugger/dbhistry.c
index 3e52d9b..eb36d7a 100644
--- a/src/acpica/source/components/debugger/dbhistry.c
+++ b/src/acpica/source/components/debugger/dbhistry.c
@@ -117,7 +117,6 @@
#include "accommon.h"
#include "acdebug.h"
-#ifdef ACPI_DEBUGGER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbhistry")
@@ -174,6 +173,7 @@ AcpiDbAddToHistory (
{
BufferLen = (UINT16) strlen (
AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].Command);
+
if (CmdLen > BufferLen)
{
AcpiOsFree (AcpiGbl_HistoryBuffer[AcpiGbl_NextHistoryIndex].
@@ -341,5 +341,3 @@ AcpiDbGetHistoryByIndex (
AcpiOsPrintf ("Invalid history number: %u\n", HistoryIndex);
return (NULL);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbinput.c b/src/acpica/source/components/debugger/dbinput.c
index 02fd0cd..d40a504 100644
--- a/src/acpica/source/components/debugger/dbinput.c
+++ b/src/acpica/source/components/debugger/dbinput.c
@@ -118,11 +118,10 @@
#include "acdebug.h"
-#ifdef ACPI_DEBUGGER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbinput")
+
/* Local prototypes */
static UINT32
@@ -167,20 +166,15 @@ enum AcpiExDebuggerCommands
CMD_BREAKPOINT,
CMD_BUSINFO,
CMD_CALL,
- CMD_CLOSE,
CMD_DEBUG,
CMD_DISASSEMBLE,
CMD_DISASM,
CMD_DUMP,
- CMD_ENABLEACPI,
CMD_EVALUATE,
- CMD_EVENT,
CMD_EXECUTE,
CMD_EXIT,
CMD_FIND,
CMD_GO,
- CMD_GPE,
- CMD_GPES,
CMD_HANDLERS,
CMD_HELP,
CMD_HELP2,
@@ -192,37 +186,47 @@ enum AcpiExDebuggerCommands
CMD_INTO,
CMD_LEVEL,
CMD_LIST,
- CMD_LOAD,
CMD_LOCALS,
CMD_LOCKS,
CMD_METHODS,
CMD_NAMESPACE,
CMD_NOTIFY,
CMD_OBJECTS,
- CMD_OPEN,
CMD_OSI,
CMD_OWNER,
CMD_PATHS,
- CMD_PREDEFINED,
CMD_PREFIX,
CMD_QUIT,
CMD_REFERENCES,
CMD_RESOURCES,
CMD_RESULTS,
- CMD_SCI,
CMD_SET,
- CMD_SLEEP,
CMD_STATS,
CMD_STOP,
CMD_TABLES,
CMD_TEMPLATE,
- CMD_TERMINATE,
- CMD_TEST,
- CMD_THREADS,
CMD_TRACE,
CMD_TREE,
CMD_TYPE,
- CMD_UNLOAD
+#ifdef ACPI_APPLICATION
+ CMD_ENABLEACPI,
+ CMD_EVENT,
+ CMD_GPE,
+ CMD_GPES,
+ CMD_SCI,
+ CMD_SLEEP,
+
+ CMD_CLOSE,
+ CMD_LOAD,
+ CMD_OPEN,
+ CMD_UNLOAD,
+
+ CMD_TERMINATE,
+ CMD_THREADS,
+
+ CMD_PREDEFINED,
+ CMD_TEST,
+#endif
};
#define CMD_FIRST_VALID 2
@@ -240,20 +244,15 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
{"BREAKPOINT", 1},
{"BUSINFO", 0},
{"CALL", 0},
- {"CLOSE", 0},
{"DEBUG", 1},
{"DISASSEMBLE", 1},
{"DISASM", 1},
{"DUMP", 1},
- {"ENABLEACPI", 0},
{"EVALUATE", 1},
- {"EVENT", 1},
{"EXECUTE", 1},
{"EXIT", 0},
{"FIND", 1},
{"GO", 0},
- {"GPE", 1},
- {"GPES", 0},
{"HANDLERS", 0},
{"HELP", 0},
{"?", 0},
@@ -265,37 +264,47 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
{"INTO", 0},
{"LEVEL", 0},
{"LIST", 0},
- {"LOAD", 1},
{"LOCALS", 0},
{"LOCKS", 0},
{"METHODS", 0},
{"NAMESPACE", 0},
{"NOTIFY", 2},
- {"OBJECTS", 1},
- {"OPEN", 1},
+ {"OBJECTS", 0},
{"OSI", 0},
{"OWNER", 1},
{"PATHS", 0},
- {"PREDEFINED", 0},
{"PREFIX", 0},
{"QUIT", 0},
{"REFERENCES", 1},
{"RESOURCES", 0},
{"RESULTS", 0},
- {"SCI", 0},
{"SET", 3},
- {"SLEEP", 0},
{"STATS", 1},
{"STOP", 0},
{"TABLES", 0},
{"TEMPLATE", 1},
- {"TERMINATE", 0},
- {"TEST", 1},
- {"THREADS", 3},
{"TRACE", 1},
{"TREE", 0},
{"TYPE", 1},
+#ifdef ACPI_APPLICATION
+ {"ENABLEACPI", 0},
+ {"EVENT", 1},
+ {"GPE", 1},
+ {"GPES", 0},
+ {"SCI", 0},
+ {"SLEEP", 0},
+
+ {"CLOSE", 0},
+ {"LOAD", 1},
+ {"OPEN", 1},
{"UNLOAD", 1},
+
+ {"TERMINATE", 0},
+ {"THREADS", 3},
+
+ {"PREDEFINED", 0},
+ {"TEST", 1},
+#endif
{NULL, 0}
};
@@ -309,7 +318,6 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Allocations", "Display list of current memory allocations\n"},
{2, " Dump <Address>|<Namepath>", "\n"},
{0, " [Byte|Word|Dword|Qword]", "Display ACPI objects or memory\n"},
- {1, " EnableAcpi", "Enable ACPI (hardware) mode\n"},
{1, " Handlers", "Info about global handlers\n"},
{1, " Help [Command]", "This help screen or individual command\n"},
{1, " History", "Display command history buffer\n"},
@@ -326,7 +334,6 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Stack", "Display CPU stack usage\n"},
{1, " Tables", "Info about current ACPI table(s)\n"},
{1, " Tables", "Display info about loaded ACPI tables\n"},
- {1, " Unload <Namepath>", "Unload an ACPI table via namespace object\n"},
{1, " ! <CommandNumber>", "Execute command from history buffer\n"},
{1, " !!", "Execute last command again\n"},
@@ -338,7 +345,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Methods", "Display list of loaded control methods\n"},
{1, " Namespace [Object] [Depth]", "Display loaded namespace tree/subtree\n"},
{1, " Notify <Object> <Value>", "Send a notification on Object\n"},
- {1, " Objects <ObjectType>", "Display all objects of the given type\n"},
+ {1, " Objects [ObjectType]", "Display summary of all objects or just given type\n"},
{1, " Owner <OwnerId> [Depth]", "Display loaded namespace by object owner\n"},
{1, " Paths", "Display full pathnames of namespace objects\n"},
{1, " Predefined", "Check all predefined names\n"},
@@ -347,7 +354,6 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Resources [DeviceName]", "Display Device resources (no arg = all devices)\n"},
{1, " Set N <NamedObject> <Value>", "Set value for named integer\n"},
{1, " Template <Object>", "Format/dump a Buffer/ResourceTemplate\n"},
- {1, " Terminate", "Delete namespace and all internal objects\n"},
{1, " Type <Object>", "Display object type\n"},
{0, "\nControl Method Execution Commands:","\n"},
@@ -369,7 +375,6 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Results", "Display method result stack\n"},
{1, " Set <A|L> <#> <Value>", "Set method data (Arguments/Locals)\n"},
{1, " Stop", "Terminate control method\n"},
- {1, " Thread <Threads><Loops><Namepath>", "Spawn threads to execute method(s)\n"},
{5, " Trace <State> [<Namepath>] [Once]", "Trace control method execution\n"},
{1, " Enable", "Enable all messages\n"},
{1, " Disable", "Disable tracing\n"},
@@ -378,10 +383,12 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Tree", "Display control method calling tree\n"},
{1, " <Enter>", "Single step next AML opcode (over calls)\n"},
- {0, "\nHardware Related Commands:", "\n"},
+#ifdef ACPI_APPLICATION
+ {0, "\nHardware Simulation Commands:", "\n"},
+ {1, " EnableAcpi", "Enable ACPI (hardware) mode\n"},
{1, " Event <F|G> <Value>", "Generate AcpiEvent (Fixed/GPE)\n"},
{1, " Gpe <GpeNum> [GpeBlockDevice]", "Simulate a GPE\n"},
- {1, " Gpes", "Display info on all GPEs\n"},
+ {1, " Gpes", "Display info on all GPE devices\n"},
{1, " Sci", "Generate an SCI\n"},
{1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"},
@@ -389,11 +396,17 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Close", "Close debug output file\n"},
{1, " Load <Input Filename>", "Load ACPI table from a file\n"},
{1, " Open <Output Filename>", "Open a file for debug output\n"},
+ {1, " Unload <Namepath>", "Unload an ACPI table via namespace object\n"},
+
+ {0, "\nUser Space Commands:", "\n"},
+ {1, " Terminate", "Delete namespace and all internal objects\n"},
+ {1, " Thread <Threads><Loops><NamePath>", "Spawn threads to execute method(s)\n"},
{0, "\nDebug Test Commands:", "\n"},
{3, " Test <TestName>", "Invoke a debug test\n"},
{1, " Objects", "Read/write/compare all namespace data objects\n"},
{1, " Predefined", "Execute all ACPI predefined names (_STA, etc.)\n"},
+#endif
{0, NULL, NULL}
};
@@ -717,7 +730,8 @@ AcpiDbGetLine (
if (AcpiUtSafeStrcpy (AcpiGbl_DbParsedBuf, sizeof (AcpiGbl_DbParsedBuf),
InputBuffer))
{
- AcpiOsPrintf ("Buffer overflow while parsing input line (max %u characters)\n",
+ AcpiOsPrintf (
+ "Buffer overflow while parsing input line (max %u characters)\n",
sizeof (AcpiGbl_DbParsedBuf));
return (0);
}
@@ -779,7 +793,7 @@ AcpiDbMatchCommand (
for (i = CMD_FIRST_VALID; AcpiGbl_DbCommands[i].Name; i++)
{
if (strstr (AcpiGbl_DbCommands[i].Name, UserCommand) ==
- AcpiGbl_DbCommands[i].Name)
+ AcpiGbl_DbCommands[i].Name)
{
return (i);
}
@@ -849,7 +863,8 @@ AcpiDbCommandDispatch (
ParamCount, AcpiGbl_DbCommands[CommandIndex].Name,
AcpiGbl_DbCommands[CommandIndex].MinArgs);
- AcpiDbDisplayCommandInfo (AcpiGbl_DbCommands[CommandIndex].Name, FALSE);
+ AcpiDbDisplayCommandInfo (
+ AcpiGbl_DbCommands[CommandIndex].Name, FALSE);
return (AE_CTRL_TRUE);
}
@@ -894,11 +909,6 @@ AcpiDbCommandDispatch (
Status = AE_OK;
break;
- case CMD_CLOSE:
-
- AcpiDbCloseDebugFile ();
- break;
-
case CMD_DEBUG:
AcpiDbExecute (AcpiGbl_DbArgs[1],
@@ -916,23 +926,6 @@ AcpiDbCommandDispatch (
AcpiDbDecodeAndDisplayObject (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
break;
- case CMD_ENABLEACPI:
-#if (!ACPI_REDUCED_HARDWARE)
-
- Status = AcpiEnable();
- if (ACPI_FAILURE(Status))
- {
- AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);
- return (Status);
- }
-#endif /* !ACPI_REDUCED_HARDWARE */
- break;
-
- case CMD_EVENT:
-
- AcpiOsPrintf ("Event command not implemented\n");
- break;
-
case CMD_EVALUATE:
case CMD_EXECUTE:
@@ -950,16 +943,6 @@ AcpiDbCommandDispatch (
AcpiGbl_CmSingleStep = FALSE;
return (AE_OK);
- case CMD_GPE:
-
- AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
- break;
-
- case CMD_GPES:
-
- AcpiDbDisplayGpes ();
- break;
-
case CMD_HANDLERS:
AcpiDbDisplayHandlers ();
@@ -1021,9 +1004,11 @@ AcpiDbCommandDispatch (
if (ParamCount == 0)
{
- AcpiOsPrintf ("Current debug level for file output is: %8.8lX\n",
+ AcpiOsPrintf (
+ "Current debug level for file output is: %8.8lX\n",
AcpiGbl_DbDebugLevel);
- AcpiOsPrintf ("Current debug level for console output is: %8.8lX\n",
+ AcpiOsPrintf (
+ "Current debug level for console output is: %8.8lX\n",
AcpiGbl_DbConsoleDebugLevel);
}
else if (ParamCount == 2)
@@ -1050,11 +1035,6 @@ AcpiDbCommandDispatch (
AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);
break;
- case CMD_LOAD:
-
- Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL, FALSE);
- break;
-
case CMD_LOCKS:
AcpiDbDisplayLocks ();
@@ -1087,11 +1067,6 @@ AcpiDbCommandDispatch (
Status = AcpiDbDisplayObjects (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
break;
- case CMD_OPEN:
-
- AcpiDbOpenDebugFile (AcpiGbl_DbArgs[1]);
- break;
-
case CMD_OSI:
AcpiDbDisplayInterfaces (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
@@ -1107,11 +1082,6 @@ AcpiDbCommandDispatch (
AcpiDbDumpNamespacePaths ();
break;
- case CMD_PREDEFINED:
-
- AcpiDbCheckPredefinedNames ();
- break;
-
case CMD_PREFIX:
AcpiDbSetScope (AcpiGbl_DbArgs[1]);
@@ -1132,22 +1102,12 @@ AcpiDbCommandDispatch (
AcpiDbDisplayResults ();
break;
- case CMD_SCI:
-
- AcpiDbGenerateSci ();
- break;
-
case CMD_SET:
AcpiDbSetMethodData (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
AcpiGbl_DbArgs[3]);
break;
- case CMD_SLEEP:
-
- Status = AcpiDbSleep (AcpiGbl_DbArgs[1]);
- break;
-
case CMD_STATS:
Status = AcpiDbDisplayStatistics (AcpiGbl_DbArgs[1]);
@@ -1167,6 +1127,81 @@ AcpiDbCommandDispatch (
AcpiDbDisplayTemplate (AcpiGbl_DbArgs[1]);
break;
+ case CMD_TRACE:
+
+ AcpiDbTrace (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2], AcpiGbl_DbArgs[3]);
+ break;
+
+ case CMD_TREE:
+
+ AcpiDbDisplayCallingTree ();
+ break;
+
+ case CMD_TYPE:
+
+ AcpiDbDisplayObjectType (AcpiGbl_DbArgs[1]);
+ break;
+
+#ifdef ACPI_APPLICATION
+
+ /* Hardware simulation commands. */
+
+ case CMD_ENABLEACPI:
+#if (!ACPI_REDUCED_HARDWARE)
+
+ Status = AcpiEnable();
+ if (ACPI_FAILURE(Status))
+ {
+ AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);
+ return (Status);
+ }
+#endif /* !ACPI_REDUCED_HARDWARE */
+ break;
+
+ case CMD_EVENT:
+
+ AcpiOsPrintf ("Event command not implemented\n");
+ break;
+
+ case CMD_GPE:
+
+ AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);
+ break;
+
+ case CMD_GPES:
+
+ AcpiDbDisplayGpes ();
+ break;
+
+ case CMD_SCI:
+
+ AcpiDbGenerateSci ();
+ break;
+
+ case CMD_SLEEP:
+
+ Status = AcpiDbSleep (AcpiGbl_DbArgs[1]);
+ break;
+
+ /* File I/O commands. */
+
+ case CMD_CLOSE:
+
+ AcpiDbCloseDebugFile ();
+ break;
+
+ case CMD_LOAD:
+
+ Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL, FALSE);
+ break;
+
+ case CMD_OPEN:
+
+ AcpiDbOpenDebugFile (AcpiGbl_DbArgs[1]);
+ break;
+
+ /* User space commands. */
+
case CMD_TERMINATE:
AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
@@ -1180,36 +1215,29 @@ AcpiDbCommandDispatch (
/* AcpiInitialize (NULL); */
break;
- case CMD_TEST:
-
- AcpiDbExecuteTest (AcpiGbl_DbArgs[1]);
- break;
-
case CMD_THREADS:
AcpiDbCreateExecutionThreads (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2],
AcpiGbl_DbArgs[3]);
break;
- case CMD_TRACE:
-
- AcpiDbTrace (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2], AcpiGbl_DbArgs[3]);
- break;
+ /* Debug test commands. */
- case CMD_TREE:
+ case CMD_PREDEFINED:
- AcpiDbDisplayCallingTree ();
+ AcpiDbCheckPredefinedNames ();
break;
- case CMD_TYPE:
+ case CMD_TEST:
- AcpiDbDisplayObjectType (AcpiGbl_DbArgs[1]);
+ AcpiDbExecuteTest (AcpiGbl_DbArgs[1]);
break;
case CMD_UNLOAD:
AcpiDbUnloadAcpiTable (AcpiGbl_DbArgs[1]);
break;
+#endif
case CMD_EXIT:
case CMD_QUIT:
@@ -1225,7 +1253,9 @@ AcpiDbCommandDispatch (
AcpiDbgLevel = ACPI_DEBUG_DEFAULT;
}
+#ifdef ACPI_APPLICATION
AcpiDbCloseDebugFile ();
+#endif
AcpiGbl_DbTerminateThreads = TRUE;
return (AE_CTRL_TERMINATE);
@@ -1394,6 +1424,10 @@ AcpiDbUserCommands (
}
}
+ /* Shut down the debugger */
+
+ AcpiTerminateDebugger ();
+
/*
* Only this thread (the original thread) should actually terminate the
* subsystem, because all the semaphores are deleted during termination
@@ -1401,5 +1435,3 @@ AcpiDbUserCommands (
Status = AcpiTerminate ();
return (Status);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbmethod.c b/src/acpica/source/components/debugger/dbmethod.c
index 3ea2639..92f53a2 100644
--- a/src/acpica/source/components/debugger/dbmethod.c
+++ b/src/acpica/source/components/debugger/dbmethod.c
@@ -118,15 +118,10 @@
#include "acdispat.h"
#include "acnamesp.h"
#include "acdebug.h"
-#ifdef ACPI_DISASSEMBLER
-#include "acdisasm.h"
-#endif
#include "acparser.h"
#include "acpredef.h"
-#ifdef ACPI_DEBUGGER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbmethod")
@@ -301,12 +296,13 @@ AcpiDbSetMethodData (
if (Index > ACPI_METHOD_MAX_ARG)
{
- AcpiOsPrintf ("Arg%u - Invalid argument name\n", Index);
+ AcpiOsPrintf ("Arg%u - Invalid argument name\n",
+ Index);
goto Cleanup;
}
- Status = AcpiDsStoreObjectToLocal (ACPI_REFCLASS_ARG, Index, ObjDesc,
- WalkState);
+ Status = AcpiDsStoreObjectToLocal (ACPI_REFCLASS_ARG,
+ Index, ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -324,12 +320,13 @@ AcpiDbSetMethodData (
if (Index > ACPI_METHOD_MAX_LOCAL)
{
- AcpiOsPrintf ("Local%u - Invalid local variable name\n", Index);
+ AcpiOsPrintf ("Local%u - Invalid local variable name\n",
+ Index);
goto Cleanup;
}
- Status = AcpiDsStoreObjectToLocal (ACPI_REFCLASS_LOCAL, Index, ObjDesc,
- WalkState);
+ Status = AcpiDsStoreObjectToLocal (ACPI_REFCLASS_LOCAL,
+ Index, ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
@@ -470,14 +467,14 @@ AcpiDbDisassembleMethod (
Status = AcpiPsParseAml (WalkState);
-#ifdef ACPI_DISASSEMBER
+#ifdef ACPI_DISASSEMBLER
(void) AcpiDmParseDeferredOps (Op);
/* Now we can disassemble the method */
- AcpiGbl_DbOpt_Verbose = FALSE;
+ AcpiGbl_DmOpt_Verbose = FALSE;
AcpiDmDisassemble (NULL, Op, 0);
- AcpiGbl_DbOpt_Verbose = TRUE;
+ AcpiGbl_DmOpt_Verbose = TRUE;
#endif
AcpiPsDeleteParseTree (Op);
@@ -489,5 +486,3 @@ AcpiDbDisassembleMethod (
AcpiUtReleaseOwnerId (&ObjDesc->Method.OwnerId);
return (AE_OK);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c
index 0fd752d..0af1b1f 100644
--- a/src/acpica/source/components/debugger/dbnames.c
+++ b/src/acpica/source/components/debugger/dbnames.c
@@ -120,8 +120,6 @@
#include "acpredef.h"
-#ifdef ACPI_DEBUGGER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbnames")
@@ -150,6 +148,13 @@ AcpiDbWalkForSpecificObjects (
void **ReturnValue);
static ACPI_STATUS
+AcpiDbWalkForObjectCounts (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue);
+
+static ACPI_STATUS
AcpiDbIntegrityWalk (
ACPI_HANDLE ObjHandle,
UINT32 NestingLevel,
@@ -197,7 +202,13 @@ static ACPI_DB_ARGUMENT_INFO AcpiDbObjectTypes [] =
{"BANKFIELDS"},
{"INDEXFIELDS"},
{"REFERENCES"},
- {"ALIAS"},
+ {"ALIASES"},
+ {"METHODALIASES"},
+ {"NOTIFY"},
+ {"ADDRESSHANDLER"},
+ {"RESOURCE"},
+ {"RESOURCEFIELD"},
+ {"SCOPES"},
{NULL} /* Must be null terminated */
};
@@ -235,8 +246,8 @@ AcpiDbSetScope (
{
/* Validate new scope from the root */
- Status = AcpiNsGetNode (AcpiGbl_RootNode, Name, ACPI_NS_NO_UPSEARCH,
- &Node);
+ Status = AcpiNsGetNode (AcpiGbl_RootNode, Name,
+ ACPI_NS_NO_UPSEARCH, &Node);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
@@ -248,8 +259,8 @@ AcpiDbSetScope (
{
/* Validate new scope relative to old scope */
- Status = AcpiNsGetNode (AcpiGbl_DbScopeNode, Name, ACPI_NS_NO_UPSEARCH,
- &Node);
+ Status = AcpiNsGetNode (AcpiGbl_DbScopeNode, Name,
+ ACPI_NS_NO_UPSEARCH, &Node);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
@@ -259,14 +270,14 @@ AcpiDbSetScope (
/* Build the final pathname */
if (AcpiUtSafeStrcat (AcpiGbl_DbScopeBuf, sizeof (AcpiGbl_DbScopeBuf),
- Name))
+ Name))
{
Status = AE_BUFFER_OVERFLOW;
goto ErrorExit;
}
if (AcpiUtSafeStrcat (AcpiGbl_DbScopeBuf, sizeof (AcpiGbl_DbScopeBuf),
- "\\"))
+ "\\"))
{
Status = AE_BUFFER_OVERFLOW;
goto ErrorExit;
@@ -406,8 +417,8 @@ AcpiDbDumpNamespaceByOwner (
/* Display the subtree */
AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT);
- AcpiNsDumpObjects (ACPI_TYPE_ANY, ACPI_DISPLAY_SUMMARY, MaxDepth, OwnerId,
- SubtreeEntry);
+ AcpiNsDumpObjects (ACPI_TYPE_ANY, ACPI_DISPLAY_SUMMARY, MaxDepth,
+ OwnerId, SubtreeEntry);
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
}
@@ -446,7 +457,8 @@ AcpiDbWalkAndMatchName (
/* Wildcard support */
if ((RequestedName[i] != '?') &&
- (RequestedName[i] != ((ACPI_NAMESPACE_NODE *) ObjHandle)->Name.Ascii[i]))
+ (RequestedName[i] != ((ACPI_NAMESPACE_NODE *)
+ ObjHandle)->Name.Ascii[i]))
{
/* No match, just exit */
@@ -457,10 +469,11 @@ AcpiDbWalkAndMatchName (
/* Get the full pathname to this object */
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
- Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, FALSE);
+ Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could Not get pathname for object %p\n", ObjHandle);
+ AcpiOsPrintf ("Could Not get pathname for object %p\n",
+ ObjHandle);
}
else
{
@@ -498,7 +511,7 @@ AcpiDbFindNameInNamespace (
char *AcpiNamePtr = AcpiName;
- if (strlen (NameArg) > 4)
+ if (strlen (NameArg) > ACPI_NAME_SIZE)
{
AcpiOsPrintf ("Name must be no longer than 4 characters\n");
return (AE_OK);
@@ -516,8 +529,8 @@ AcpiDbFindNameInNamespace (
/* Walk the namespace from the root */
- (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
- AcpiDbWalkAndMatchName, NULL, AcpiName, NULL);
+ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbWalkAndMatchName, NULL, AcpiName, NULL);
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
return (AE_OK);
@@ -618,8 +631,8 @@ AcpiDbCheckPredefinedNames (
/* Search all nodes in namespace */
- (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
- AcpiDbWalkForPredefinedNames, NULL, (void *) &Count, NULL);
+ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbWalkForPredefinedNames, NULL, (void *) &Count, NULL);
AcpiOsPrintf ("Found %u predefined names in the namespace\n", Count);
}
@@ -627,6 +640,43 @@ AcpiDbCheckPredefinedNames (
/*******************************************************************************
*
+ * FUNCTION: AcpiDbWalkForObjectCounts
+ *
+ * PARAMETERS: Callback from WalkNamespace
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Display short info about objects in the namespace
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDbWalkForObjectCounts (
+ ACPI_HANDLE ObjHandle,
+ UINT32 NestingLevel,
+ void *Context,
+ void **ReturnValue)
+{
+ ACPI_OBJECT_INFO *Info = (ACPI_OBJECT_INFO *) Context;
+ ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
+
+
+ if (Node->Type > ACPI_TYPE_NS_NODE_MAX)
+ {
+ AcpiOsPrintf ("[%4.4s]: Unknown object type %X\n",
+ Node->Name.Ascii, Node->Type);
+ }
+ else
+ {
+ Info->Types[Node->Type]++;
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDbWalkForSpecificObjects
*
* PARAMETERS: Callback from WalkNamespace
@@ -654,7 +704,7 @@ AcpiDbWalkForSpecificObjects (
/* Get and display the full pathname to this object */
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
- Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, FALSE);
+ Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could Not get pathname for object %p\n", ObjHandle);
@@ -691,7 +741,39 @@ AcpiDbDisplayObjects (
{
ACPI_WALK_INFO Info;
ACPI_OBJECT_TYPE Type;
+ ACPI_OBJECT_INFO *ObjectInfo;
+ UINT32 i;
+ UINT32 TotalObjects = 0;
+
+
+ /* No argument means display summary/count of all object types */
+ if (!ObjTypeArg)
+ {
+ ObjectInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_OBJECT_INFO));
+
+ /* Walk the namespace from the root */
+
+ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbWalkForObjectCounts, NULL,
+ (void *) ObjectInfo, NULL);
+
+ AcpiOsPrintf ("\nSummary of namespace objects:\n\n");
+
+ for (i = 0; i < ACPI_TOTAL_TYPES; i++)
+ {
+ AcpiOsPrintf ("%8u %s\n", ObjectInfo->Types[i],
+ AcpiUtGetTypeName (i));
+
+ TotalObjects += ObjectInfo->Types[i];
+ }
+
+ AcpiOsPrintf ("\n%8u Total namespace objects\n\n",
+ TotalObjects);
+
+ ACPI_FREE (ObjectInfo);
+ return (AE_OK);
+ }
/* Get the object type */
@@ -717,7 +799,7 @@ AcpiDbDisplayObjects (
/* Walk the namespace from the root */
(void) AcpiWalkNamespace (Type, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
- AcpiDbWalkForSpecificObjects, NULL, (void *) &Info, NULL);
+ AcpiDbWalkForSpecificObjects, NULL, (void *) &Info, NULL);
AcpiOsPrintf (
"\nFound %u objects of type [%s] in the current ACPI Namespace\n",
@@ -761,9 +843,11 @@ AcpiDbIntegrityWalk (
{
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
{
- AcpiOsPrintf ("Invalid Descriptor Type for Node %p [%s] - is %2.2X should be %2.2X\n",
- Node, AcpiUtGetDescriptorName (Node), ACPI_GET_DESCRIPTOR_TYPE (Node),
- ACPI_DESC_TYPE_NAMED);
+ AcpiOsPrintf (
+ "Invalid Descriptor Type for Node %p [%s] - "
+ "is %2.2X should be %2.2X\n",
+ Node, AcpiUtGetDescriptorName (Node),
+ ACPI_GET_DESCRIPTOR_TYPE (Node), ACPI_DESC_TYPE_NAMED);
return (AE_OK);
}
@@ -826,8 +910,8 @@ AcpiDbCheckIntegrity (
/* Search all nodes in namespace */
- (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
- AcpiDbIntegrityWalk, NULL, (void *) &Info, NULL);
+ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbIntegrityWalk, NULL, (void *) &Info, NULL);
AcpiOsPrintf ("Verified %u namespace nodes with %u Objects\n",
Info.Nodes, Info.Objects);
@@ -907,8 +991,9 @@ AcpiDbFindReferences (
/* Search all nodes in namespace */
- (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
- AcpiDbWalkForReferences, NULL, (void *) ObjDesc, NULL);
+ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbWalkForReferences, NULL,
+ (void *) ObjDesc, NULL);
}
@@ -958,10 +1043,11 @@ AcpiDbBusWalk (
/* Get the full path to this device object */
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
- Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, FALSE);
+ Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could Not get pathname for object %p\n", ObjHandle);
+ AcpiOsPrintf ("Could Not get pathname for object %p\n",
+ ObjHandle);
return (AE_OK);
}
@@ -990,7 +1076,8 @@ AcpiDbBusWalk (
if (Info->Valid & ACPI_VALID_ADR)
{
- AcpiOsPrintf ("_ADR: %8.8X%8.8X\n", ACPI_FORMAT_UINT64 (Info->Address));
+ AcpiOsPrintf ("_ADR: %8.8X%8.8X\n",
+ ACPI_FORMAT_UINT64 (Info->Address));
}
else
{
@@ -1051,8 +1138,6 @@ AcpiDbGetBusInfo (
{
/* Search all nodes in namespace */
- (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
- AcpiDbBusWalk, NULL, NULL, NULL);
+ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbBusWalk, NULL, NULL, NULL);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbobject.c b/src/acpica/source/components/debugger/dbobject.c
index 5d2e0fb..35cea65 100644
--- a/src/acpica/source/components/debugger/dbobject.c
+++ b/src/acpica/source/components/debugger/dbobject.c
@@ -117,16 +117,12 @@
#include "accommon.h"
#include "acnamesp.h"
#include "acdebug.h"
-#ifdef ACPI_DISASSEMBLER
-#include "acdisasm.h"
-#endif
-#ifdef ACPI_DEBUGGER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbobject")
+
/* Local prototypes */
static void
@@ -220,7 +216,8 @@ AcpiDbDecodeInternalObject (
if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND)
{
- AcpiOsPrintf (" %p [%s]", ObjDesc, AcpiUtGetDescriptorName (ObjDesc));
+ AcpiOsPrintf (" %p [%s]", ObjDesc,
+ AcpiUtGetDescriptorName (ObjDesc));
return;
}
@@ -231,13 +228,13 @@ AcpiDbDecodeInternalObject (
case ACPI_TYPE_INTEGER:
AcpiOsPrintf (" %8.8X%8.8X",
- ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
+ ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
break;
case ACPI_TYPE_STRING:
AcpiOsPrintf ("(%u) \"%.24s",
- ObjDesc->String.Length, ObjDesc->String.Pointer);
+ ObjDesc->String.Length, ObjDesc->String.Pointer);
if (ObjDesc->String.Length > 24)
{
@@ -284,7 +281,7 @@ AcpiDbDecodeNode (
{
AcpiOsPrintf ("<Node> Name %4.4s",
- AcpiUtGetNodeName (Node));
+ AcpiUtGetNodeName (Node));
if (Node->Flags & ANOBJ_METHOD_ARG)
{
@@ -387,7 +384,7 @@ AcpiDbDisplayInternalObject (
if (WalkState)
{
ObjDesc = WalkState->LocalVariables
- [ObjDesc->Reference.Value].Object;
+ [ObjDesc->Reference.Value].Object;
AcpiOsPrintf ("%p", ObjDesc);
AcpiDbDecodeInternalObject (ObjDesc);
}
@@ -399,7 +396,7 @@ AcpiDbDisplayInternalObject (
if (WalkState)
{
ObjDesc = WalkState->Arguments
- [ObjDesc->Reference.Value].Object;
+ [ObjDesc->Reference.Value].Object;
AcpiOsPrintf ("%p", ObjDesc);
AcpiDbDecodeInternalObject (ObjDesc);
}
@@ -440,7 +437,8 @@ AcpiDbDisplayInternalObject (
if (!ObjDesc->Reference.Object)
{
- AcpiOsPrintf ("Uninitialized reference subobject pointer");
+ AcpiOsPrintf (
+ "Uninitialized reference subobject pointer");
break;
}
@@ -449,10 +447,12 @@ AcpiDbDisplayInternalObject (
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;
@@ -521,6 +521,7 @@ AcpiDbDecodeLocals (
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
+
if (!Node)
{
AcpiOsPrintf (
@@ -535,7 +536,7 @@ AcpiDbDecodeLocals (
}
AcpiOsPrintf ("Local Variables for method [%4.4s]:\n",
- AcpiUtGetNodeName (Node));
+ AcpiUtGetNodeName (Node));
for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++)
{
@@ -569,6 +570,7 @@ AcpiDbDecodeArguments (
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
+
if (!Node)
{
AcpiOsPrintf (
@@ -583,8 +585,10 @@ AcpiDbDecodeArguments (
}
AcpiOsPrintf (
- "Arguments for Method [%4.4s]: (%X arguments defined, max concurrency = %X)\n",
- AcpiUtGetNodeName (Node), ObjDesc->Method.ParamCount, ObjDesc->Method.SyncLevel);
+ "Arguments for Method [%4.4s]: "
+ "(%X arguments defined, max concurrency = %X)\n",
+ AcpiUtGetNodeName (Node), ObjDesc->Method.ParamCount,
+ ObjDesc->Method.SyncLevel);
for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
{
@@ -593,5 +597,3 @@ AcpiDbDecodeArguments (
AcpiDbDisplayInternalObject (ObjDesc, WalkState);
}
}
-
-#endif
diff --git a/src/acpica/source/components/debugger/dbstats.c b/src/acpica/source/components/debugger/dbstats.c
index 61095e1..1b757a4 100644
--- a/src/acpica/source/components/debugger/dbstats.c
+++ b/src/acpica/source/components/debugger/dbstats.c
@@ -118,11 +118,11 @@
#include "acdebug.h"
#include "acnamesp.h"
-#ifdef ACPI_DEBUGGER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbstats")
+
/* Local prototypes */
static void
@@ -199,7 +199,8 @@ AcpiDbListInfo (
if (List->MaxDepth > 0)
{
AcpiOsPrintf (
- " Cache: [Depth MaxD Avail Size] %8.2X %8.2X %8.2X %8.2X\n",
+ " Cache: [Depth MaxD Avail Size] "
+ "%8.2X %8.2X %8.2X %8.2X\n",
List->CurrentDepth,
List->MaxDepth,
List->MaxDepth - List->CurrentDepth,
@@ -210,7 +211,8 @@ AcpiDbListInfo (
if (List->MaxDepth > 0)
{
AcpiOsPrintf (
- " Cache: [Requests Hits Misses ObjSize] %8.2X %8.2X %8.2X %8.2X\n",
+ " Cache: [Requests Hits Misses ObjSize] "
+ "%8.2X %8.2X %8.2X %8.2X\n",
List->Requests,
List->Hits,
List->Requests - List->Hits,
@@ -222,7 +224,8 @@ AcpiDbListInfo (
if (List->ObjectSize)
{
AcpiOsPrintf (
- " Mem: [Alloc Free Max CurSize Outstanding] %8.2X %8.2X %8.2X %8.2X %8.2X\n",
+ " Mem: [Alloc Free Max CurSize Outstanding] "
+ "%8.2X %8.2X %8.2X %8.2X %8.2X\n",
List->TotalAllocated,
List->TotalFreed,
List->MaxOccupied,
@@ -232,7 +235,8 @@ AcpiDbListInfo (
else
{
AcpiOsPrintf (
- " Mem: [Alloc Free Max CurSize Outstanding Total] %8.2X %8.2X %8.2X %8.2X %8.2X %8.2X\n",
+ " Mem: [Alloc Free Max CurSize Outstanding Total] "
+ "%8.2X %8.2X %8.2X %8.2X %8.2X %8.2X\n",
List->TotalAllocated,
List->TotalFreed,
List->MaxOccupied,
@@ -446,7 +450,7 @@ AcpiDbCountNamespaceObjects (
}
(void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL, NULL);
+ ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL, NULL);
}
@@ -604,7 +608,8 @@ AcpiDbDisplayStatistics (
case CMD_STAT_STACK:
#if defined(ACPI_DEBUG_OUTPUT)
- Temp = (UINT32) ACPI_PTR_DIFF (AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer);
+ Temp = (UINT32) ACPI_PTR_DIFF (
+ AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer);
AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
AcpiOsPrintf ("Entry Stack Pointer %p\n", AcpiGbl_EntryStackPointer);
@@ -622,5 +627,3 @@ AcpiDbDisplayStatistics (
AcpiOsPrintf ("\n");
return (AE_OK);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbtest.c b/src/acpica/source/components/debugger/dbtest.c
index 40fab5c..679a9d6 100644
--- a/src/acpica/source/components/debugger/dbtest.c
+++ b/src/acpica/source/components/debugger/dbtest.c
@@ -119,7 +119,6 @@
#include "acnamesp.h"
#include "acpredef.h"
-#ifdef ACPI_DEBUGGER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbtest")
@@ -196,8 +195,8 @@ static ACPI_DB_ARGUMENT_INFO AcpiDbTestTypes [] =
* used to read and write the various namespace objects. The point
* is to force the AML interpreter do all of the work.
*/
-#define ACPI_DB_READ_METHOD "\\_T98"
-#define ACPI_DB_WRITE_METHOD "\\_T99"
+#define ACPI_DB_READ_METHOD "\\_T98"
+#define ACPI_DB_WRITE_METHOD "\\_T99"
static ACPI_HANDLE ReadHandle = NULL;
static ACPI_HANDLE WriteHandle = NULL;
@@ -355,7 +354,7 @@ AcpiDbTestAllObjects (
/* Walk the entire namespace, testing each supported named data object */
(void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
- ACPI_UINT32_MAX, AcpiDbTestOneObject, NULL, NULL, NULL);
+ ACPI_UINT32_MAX, AcpiDbTestOneObject, NULL, NULL, NULL);
}
@@ -767,7 +766,8 @@ AcpiDbTestBufferType (
goto Exit;
}
- if (memcmp (Temp1->Buffer.Pointer, Temp3->Buffer.Pointer, ByteLength))
+ if (memcmp (Temp1->Buffer.Pointer,
+ Temp3->Buffer.Pointer, ByteLength))
{
AcpiOsPrintf (" MISMATCH 3: While restoring original buffer");
}
@@ -919,7 +919,8 @@ AcpiDbReadFromObject (
ReturnObj.Length = ACPI_ALLOCATE_BUFFER;
AcpiGbl_MethodExecuting = TRUE;
- Status = AcpiEvaluateObject (ReadHandle, NULL, &ParamObjects, &ReturnObj);
+ Status = AcpiEvaluateObject (ReadHandle, NULL,
+ &ParamObjects, &ReturnObj);
AcpiGbl_MethodExecuting = FALSE;
if (ACPI_FAILURE (Status))
@@ -957,8 +958,8 @@ AcpiDbReadFromObject (
AcpiOsPrintf (" Unsupported return object type, %s",
AcpiUtGetTypeName (RetValue->Type));
- AcpiOsFree (ReturnObj.Pointer);
+ AcpiOsFree (ReturnObj.Pointer);
return (AE_TYPE);
}
@@ -1047,8 +1048,9 @@ AcpiDbEvaluateAllPredefinedNames (
/* Search all nodes in namespace */
- (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
- AcpiDbEvaluateOnePredefinedName, NULL, (void *) &Info, NULL);
+ (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+ ACPI_UINT32_MAX, AcpiDbEvaluateOnePredefinedName, NULL,
+ (void *) &Info, NULL);
AcpiOsPrintf ("Evaluated %u predefined names in the namespace\n", Info.Count);
}
@@ -1148,8 +1150,10 @@ AcpiDbEvaluateOnePredefinedName (
case ACPI_TYPE_STRING:
- ThisParam->String.Pointer = "This is the default argument string";
- ThisParam->String.Length = strlen (ThisParam->String.Pointer);
+ ThisParam->String.Pointer =
+ "This is the default argument string";
+ ThisParam->String.Length =
+ strlen (ThisParam->String.Pointer);
break;
case ACPI_TYPE_BUFFER:
@@ -1188,7 +1192,8 @@ AcpiDbEvaluateOnePredefinedName (
Status = AcpiEvaluateObject (Node, NULL, &ParamObjects, &ReturnObj);
- AcpiOsPrintf ("%-32s returned %s\n", Pathname, AcpiFormatException (Status));
+ AcpiOsPrintf ("%-32s returned %s\n",
+ Pathname, AcpiFormatException (Status));
AcpiGbl_MethodExecuting = FALSE;
ACPI_FREE (Pathname);
@@ -1206,5 +1211,3 @@ AcpiDbEvaluateOnePredefinedName (
return (Status);
}
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbutils.c b/src/acpica/source/components/debugger/dbutils.c
index 22a5c45..a52a201 100644
--- a/src/acpica/source/components/debugger/dbutils.c
+++ b/src/acpica/source/components/debugger/dbutils.c
@@ -119,11 +119,10 @@
#include "acdebug.h"
-#ifdef ACPI_DEBUGGER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbutils")
+
/* Local prototypes */
#ifdef ACPI_OBSOLETE_FUNCTIONS
@@ -136,7 +135,7 @@ AcpiDbDumpBuffer (
UINT32 Address);
#endif
-static char *Converter = "0123456789ABCDEF";
+static char *Gbl_HexToAscii = "0123456789ABCDEF";
/*******************************************************************************
@@ -199,7 +198,8 @@ AcpiDbSetOutputDestination (
AcpiGbl_DbOutputFlags = (UINT8) OutputFlags;
- if ((OutputFlags & ACPI_DB_REDIRECTABLE_OUTPUT) && AcpiGbl_DbOutputToFile)
+ if ((OutputFlags & ACPI_DB_REDIRECTABLE_OUTPUT) &&
+ AcpiGbl_DbOutputToFile)
{
AcpiDbgLevel = AcpiGbl_DbDebugLevel;
}
@@ -252,7 +252,7 @@ AcpiDbDumpExternalObject (
case ACPI_TYPE_INTEGER:
AcpiOsPrintf ("[Integer] = %8.8X%8.8X\n",
- ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
+ ACPI_FORMAT_UINT64 (ObjDesc->Integer.Value));
break;
case ACPI_TYPE_STRING:
@@ -271,8 +271,9 @@ AcpiDbDumpExternalObject (
{
AcpiOsPrintf ("\n");
}
- AcpiUtDebugDumpBuffer (ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
- ObjDesc->Buffer.Length, DB_BYTE_DISPLAY, _COMPONENT);
+ AcpiUtDebugDumpBuffer (
+ ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
+ ObjDesc->Buffer.Length, DB_BYTE_DISPLAY, _COMPONENT);
}
else
{
@@ -283,11 +284,12 @@ AcpiDbDumpExternalObject (
case ACPI_TYPE_PACKAGE:
AcpiOsPrintf ("[Package] Contains %u Elements:\n",
- ObjDesc->Package.Count);
+ ObjDesc->Package.Count);
for (i = 0; i < ObjDesc->Package.Count; i++)
{
- AcpiDbDumpExternalObject (&ObjDesc->Package.Elements[i], Level+1);
+ AcpiDbDumpExternalObject (
+ &ObjDesc->Package.Elements[i], Level+1);
}
break;
@@ -407,12 +409,13 @@ AcpiDbLocalNsLookup (
* Lookup the name.
* (Uses root node as the search starting point)
*/
- Status = AcpiNsLookup (NULL, InternalPath, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
- ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node);
+ Status = AcpiNsLookup (NULL, InternalPath, ACPI_TYPE_ANY,
+ ACPI_IMODE_EXECUTE, ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE,
+ NULL, &Node);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not locate name: %s, %s\n",
- Name, AcpiFormatException (Status));
+ Name, AcpiFormatException (Status));
}
ACPI_FREE (InternalPath);
@@ -454,7 +457,7 @@ AcpiDbUint32ToHexString (
for (i = 7; i >= 0; i--)
{
- Buffer[i] = Converter [Value & 0x0F];
+ Buffer[i] = Gbl_HexToAscii [Value & 0x0F];
Value = Value >> 4;
}
}
@@ -576,8 +579,6 @@ AcpiDbDumpBuffer (
AcpiDbgLevel |= ACPI_LV_TABLES;
AcpiUtDebugDumpBuffer (ACPI_TO_POINTER (Address), 64, DB_BYTE_DISPLAY,
- ACPI_UINT32_MAX);
+ ACPI_UINT32_MAX);
}
#endif
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/debugger/dbxface.c b/src/acpica/source/components/debugger/dbxface.c
index 2292152..eadcc16 100644
--- a/src/acpica/source/components/debugger/dbxface.c
+++ b/src/acpica/source/components/debugger/dbxface.c
@@ -117,12 +117,7 @@
#include "accommon.h"
#include "amlcode.h"
#include "acdebug.h"
-#ifdef ACPI_DISASSEMBLER
-#include "acdisasm.h"
-#endif
-
-#ifdef ACPI_DEBUGGER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbxface")
@@ -214,7 +209,8 @@ AcpiDbStartCommand (
ACPI_DB_LINE_BUFFER_SIZE, NULL);
if (ACPI_FAILURE (Status))
{
- ACPI_EXCEPTION ((AE_INFO, Status, "While parsing command line"));
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "While parsing command line"));
return (Status);
}
}
@@ -268,7 +264,7 @@ AcpiDbSingleStep (
}
AmlOffset = (UINT32) ACPI_PTR_DIFF (Op->Common.Aml,
- WalkState->ParserState.AmlStart);
+ WalkState->ParserState.AmlStart);
/* Check for single-step breakpoint */
@@ -472,7 +468,7 @@ AcpiDbSingleStep (
/*******************************************************************************
*
- * FUNCTION: AcpiDbInitialize
+ * FUNCTION: AcpiInitializeDebugger
*
* PARAMETERS: None
*
@@ -483,13 +479,13 @@ AcpiDbSingleStep (
******************************************************************************/
ACPI_STATUS
-AcpiDbInitialize (
+AcpiInitializeDebugger (
void)
{
ACPI_STATUS Status;
- ACPI_FUNCTION_TRACE (DbInitialize);
+ ACPI_FUNCTION_TRACE (AcpiInitializeDebugger);
/* Init globals */
@@ -502,8 +498,6 @@ AcpiDbInitialize (
AcpiGbl_DbConsoleDebugLevel = ACPI_NORMAL_DEFAULT | ACPI_LV_TABLES;
AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT;
- AcpiGbl_DbOpt_Disasm = FALSE;
- AcpiGbl_DbOpt_Verbose = TRUE;
AcpiGbl_DbOpt_NoIniMethods = FALSE;
AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
@@ -544,26 +538,25 @@ AcpiDbInitialize (
/* Create the debug execution thread to execute commands */
- Status = AcpiOsExecute (OSL_DEBUGGER_THREAD, AcpiDbExecuteThread, NULL);
+ Status = AcpiOsExecute (OSL_DEBUGGER_THREAD,
+ AcpiDbExecuteThread, NULL);
if (ACPI_FAILURE (Status))
{
- ACPI_EXCEPTION ((AE_INFO, Status, "Could not start debugger thread"));
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Could not start debugger thread"));
return_ACPI_STATUS (Status);
}
}
- if (!AcpiGbl_DbOpt_Verbose)
- {
- AcpiGbl_DbOpt_Disasm = TRUE;
- }
-
return_ACPI_STATUS (AE_OK);
}
+ACPI_EXPORT_SYMBOL (AcpiInitializeDebugger)
+
/*******************************************************************************
*
- * FUNCTION: AcpiDbTerminate
+ * FUNCTION: AcpiTerminateDebugger
*
* PARAMETERS: None
*
@@ -574,7 +567,7 @@ AcpiDbInitialize (
******************************************************************************/
void
-AcpiDbTerminate (
+AcpiTerminateDebugger (
void)
{
@@ -589,6 +582,8 @@ AcpiDbTerminate (
AcpiGbl_DbOutputFlags = ACPI_DB_DISABLE_OUTPUT;
}
+ACPI_EXPORT_SYMBOL (AcpiTerminateDebugger)
+
#ifdef ACPI_OBSOLETE_FUNCTIONS
/*******************************************************************************
@@ -618,5 +613,3 @@ AcpiDbMethodEnd (
AcpiDbStartCommand (WalkState, NULL);
}
#endif
-
-#endif /* ACPI_DEBUGGER */
diff --git a/src/acpica/source/components/disassembler/dmbuffer.c b/src/acpica/source/components/disassembler/dmbuffer.c
index f4fee3d..d6985ef 100644
--- a/src/acpica/source/components/disassembler/dmbuffer.c
+++ b/src/acpica/source/components/disassembler/dmbuffer.c
@@ -122,8 +122,6 @@
#include "acinterp.h"
-#ifdef ACPI_DISASSEMBLER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dmbuffer")
@@ -845,22 +843,19 @@ AcpiDmPldBuffer (
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Reference", PldInfo->Reference);
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Rotation", PldInfo->Rotation);
- if (ByteCount < ACPI_PLD_REV1_BUFFER_SIZE)
- {
- AcpiOsPrintf (ACPI_PLD_OUTPUT08P, "PLD_Order", PldInfo->Order);
- }
- else
+ if (ByteCount >= ACPI_PLD_REV2_BUFFER_SIZE)
{
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Order", PldInfo->Order);
- }
- /* Fifth 32-bit dword */
+ /* Fifth 32-bit dword */
- if (ByteCount >= ACPI_PLD_REV1_BUFFER_SIZE)
- {
- AcpiOsPrintf (ACPI_PLD_OUTPUT16, "PLD_VerticalOffset", PldInfo->VerticalOffset);
+ AcpiOsPrintf (ACPI_PLD_OUTPUT16, "PLD_VerticalOffset", PldInfo->VerticalOffset);
AcpiOsPrintf (ACPI_PLD_OUTPUT16P, "PLD_HorizontalOffset", PldInfo->HorizontalOffset);
}
+ else /* Rev 1 buffer */
+ {
+ AcpiOsPrintf (ACPI_PLD_OUTPUT08P, "PLD_Order", PldInfo->Order);
+ }
ACPI_FREE (PldInfo);
}
@@ -1102,5 +1097,3 @@ AcpiDmDecompressEisaId (
AcpiOsPrintf (" /* %s */", Info->Description);
}
}
-
-#endif
diff --git a/src/acpica/source/components/disassembler/dmcstyle.c b/src/acpica/source/components/disassembler/dmcstyle.c
index 9584052..37f31e8 100644
--- a/src/acpica/source/components/disassembler/dmcstyle.c
+++ b/src/acpica/source/components/disassembler/dmcstyle.c
@@ -117,10 +117,8 @@
#include "accommon.h"
#include "acparser.h"
#include "amlcode.h"
-#include "acdisasm.h"
#include "acdebug.h"
-#ifdef ACPI_DISASSEMBLER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dmcstyle")
@@ -898,5 +896,3 @@ AcpiDmIsTargetAnOperand (
}
return (TRUE);
}
-
-#endif
diff --git a/src/acpica/source/components/disassembler/dmnames.c b/src/acpica/source/components/disassembler/dmnames.c
index 1cf0700..673d726 100644
--- a/src/acpica/source/components/disassembler/dmnames.c
+++ b/src/acpica/source/components/disassembler/dmnames.c
@@ -120,8 +120,6 @@
#include "acdisasm.h"
-#ifdef ACPI_DISASSEMBLER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dmnames")
@@ -486,6 +484,8 @@ AcpiDmValidateName (
char *Name,
ACPI_PARSE_OBJECT *Op)
{
+ ACPI_PARSE_OBJECT *TargetOp;
+
if ((!Name) ||
(!Op->Common.Parent))
@@ -499,9 +499,6 @@ AcpiDmValidateName (
" /**** Name not found or not accessible from this scope ****/ ");
}
- ACPI_PARSE_OBJECT *TargetOp;
-
-
if ((!Name) ||
(!Op->Common.Parent))
{
@@ -522,5 +519,3 @@ AcpiDmValidateName (
}
}
#endif
-
-#endif
diff --git a/src/acpica/source/components/disassembler/dmopcode.c b/src/acpica/source/components/disassembler/dmopcode.c
index 2941a40..866da38 100644
--- a/src/acpica/source/components/disassembler/dmopcode.c
+++ b/src/acpica/source/components/disassembler/dmopcode.c
@@ -117,12 +117,10 @@
#include "accommon.h"
#include "acparser.h"
#include "amlcode.h"
-#include "acdisasm.h"
#include "acinterp.h"
#include "acnamesp.h"
#include "acdebug.h"
-#ifdef ACPI_DISASSEMBLER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dmopcode")
@@ -1050,5 +1048,3 @@ AcpiDmDisassembleOneOp (
break;
}
}
-
-#endif /* ACPI_DISASSEMBLER */
diff --git a/src/acpica/source/components/disassembler/dmresrc.c b/src/acpica/source/components/disassembler/dmresrc.c
index 654d20b..5c9e7b9 100644
--- a/src/acpica/source/components/disassembler/dmresrc.c
+++ b/src/acpica/source/components/disassembler/dmresrc.c
@@ -118,7 +118,6 @@
#include "amlcode.h"
#include "acdisasm.h"
-#ifdef ACPI_DISASSEMBLER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbresrc")
@@ -516,5 +515,3 @@ AcpiDmIsResourceTemplate (
*/
return (AE_OK);
}
-
-#endif
diff --git a/src/acpica/source/components/disassembler/dmresrcl.c b/src/acpica/source/components/disassembler/dmresrcl.c
index b19dffd..155f01c 100644
--- a/src/acpica/source/components/disassembler/dmresrcl.c
+++ b/src/acpica/source/components/disassembler/dmresrcl.c
@@ -118,8 +118,6 @@
#include "acdisasm.h"
-#ifdef ACPI_DISASSEMBLER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbresrcl")
@@ -1151,5 +1149,3 @@ AcpiDmVendorLargeDescriptor (
ACPI_ADD_PTR (UINT8, Resource, sizeof (AML_RESOURCE_LARGE_HEADER)),
Length, Level);
}
-
-#endif
diff --git a/src/acpica/source/components/disassembler/dmresrcl2.c b/src/acpica/source/components/disassembler/dmresrcl2.c
index a9eb885..8006458 100644
--- a/src/acpica/source/components/disassembler/dmresrcl2.c
+++ b/src/acpica/source/components/disassembler/dmresrcl2.c
@@ -118,8 +118,6 @@
#include "acdisasm.h"
-#ifdef ACPI_DISASSEMBLER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbresrcl2")
@@ -798,5 +796,3 @@ AcpiDmSerialBusDescriptor (
SerialBusResourceDispatch [Resource->CommonSerialBus.Type] (
Info, Resource, Length, Level);
}
-
-#endif
diff --git a/src/acpica/source/components/disassembler/dmresrcs.c b/src/acpica/source/components/disassembler/dmresrcs.c
index cb2084f..99d0dfc 100644
--- a/src/acpica/source/components/disassembler/dmresrcs.c
+++ b/src/acpica/source/components/disassembler/dmresrcs.c
@@ -118,8 +118,6 @@
#include "acdisasm.h"
-#ifdef ACPI_DISASSEMBLER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbresrcs")
@@ -440,5 +438,3 @@ AcpiDmVendorSmallDescriptor (
ACPI_ADD_PTR (UINT8, Resource, sizeof (AML_RESOURCE_SMALL_HEADER)),
Length, Level);
}
-
-#endif
diff --git a/src/acpica/source/components/disassembler/dmutils.c b/src/acpica/source/components/disassembler/dmutils.c
index 382ec79..676ed1b 100644
--- a/src/acpica/source/components/disassembler/dmutils.c
+++ b/src/acpica/source/components/disassembler/dmutils.c
@@ -122,7 +122,6 @@
#include <acnamesp.h>
#endif
-#ifdef ACPI_DISASSEMBLER
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dmutils")
@@ -401,5 +400,3 @@ AcpiDmCommaIfFieldMember (
AcpiOsPrintf (", ");
}
}
-
-#endif
diff --git a/src/acpica/source/components/disassembler/dmwalk.c b/src/acpica/source/components/disassembler/dmwalk.c
index 091c69c..a2a5c51 100644
--- a/src/acpica/source/components/disassembler/dmwalk.c
+++ b/src/acpica/source/components/disassembler/dmwalk.c
@@ -117,12 +117,9 @@
#include "accommon.h"
#include "acparser.h"
#include "amlcode.h"
-#include "acdisasm.h"
#include "acdebug.h"
-#ifdef ACPI_DISASSEMBLER
-
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dmwalk")
@@ -189,10 +186,11 @@ AcpiDmDisassemble (
return;
}
- Info.Flags = 0;
- Info.Level = 0;
- Info.Count = 0;
+ memset (&Info, 0, sizeof (ACPI_OP_WALK_INFO));
Info.WalkState = WalkState;
+ Info.StartAml = Op->Common.Aml - sizeof (ACPI_TABLE_HEADER);
+ Info.AmlOffset = Op->Common.Aml - Info.StartAml;
+
AcpiDmWalkParseTree (Op, AcpiDmDescendingOp, AcpiDmAscendingOp, &Info);
return;
}
@@ -487,20 +485,40 @@ AcpiDmDescendingOp (
UINT32 AmlOffset;
- if (AcpiGbl_DbOpt_Verbose && AcpiGbl_PreviousOp)
+ OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+
+ /* Listing support to dump the AML code after the ASL statement */
+
+ if (AcpiGbl_DmOpt_Listing)
{
- /* Dump the entire statement in AML byte code */
+ /* We only care about these classes of objects */
- if (Op->Common.Aml > AcpiGbl_PreviousOp->Common.Aml)
+ if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) ||
+ (OpInfo->Class == AML_CLASS_CONTROL) ||
+ (OpInfo->Class == AML_CLASS_CREATE) ||
+ ((OpInfo->Class == AML_CLASS_EXECUTE) && (!Op->Common.Next)))
{
- AcpiOsPrintf ("\n");
- AcpiUtDumpBuffer (AcpiGbl_PreviousOp->Common.Aml,
- (Op->Common.Aml - AcpiGbl_PreviousOp->Common.Aml),
- DB_BYTE_DISPLAY, 0);
- AcpiDmIndent (Level);
+ if (AcpiGbl_DmOpt_Listing && Info->PreviousAml)
+ {
+ /* Dump the AML byte code for the previous Op */
+
+ if (Op->Common.Aml > Info->PreviousAml)
+ {
+ AcpiOsPrintf ("\n");
+ AcpiUtDumpBuffer (
+ (Info->StartAml + Info->AmlOffset),
+ (Op->Common.Aml - Info->PreviousAml),
+ DB_BYTE_DISPLAY,
+ Info->AmlOffset);
+ AcpiOsPrintf ("\n");
+ }
+
+ Info->AmlOffset = (Op->Common.Aml - Info->StartAml);
+ }
+
+ Info->PreviousAml = Op->Common.Aml;
}
}
- AcpiGbl_PreviousOp = Op;
if (Op->Common.DisasmFlags & ACPI_PARSEOP_IGNORE)
{
@@ -519,10 +537,13 @@ AcpiDmDescendingOp (
{
AmlOffset = (UINT32) ACPI_PTR_DIFF (Op->Common.Aml,
Info->WalkState->ParserState.AmlStart);
- VERBOSE_PRINT ((DB_FULL_OP_INFO,
- (Info->WalkState->MethodNode ?
- Info->WalkState->MethodNode->Name.Ascii : " "),
- AmlOffset, (UINT32) Op->Common.AmlOpcode));
+ if (AcpiGbl_DmOpt_Verbose)
+ {
+ AcpiOsPrintf (DB_FULL_OP_INFO,
+ (Info->WalkState->MethodNode ?
+ Info->WalkState->MethodNode->Name.Ascii : " "),
+ AmlOffset, (UINT32) Op->Common.AmlOpcode);
+ }
}
if (Op->Common.AmlOpcode == AML_SCOPE_OP)
@@ -613,8 +634,6 @@ AcpiDmDescendingOp (
/* Start the opcode argument list if necessary */
- OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
-
if ((OpInfo->Flags & AML_HAS_ARGS) ||
(Op->Common.AmlOpcode == AML_EVENT_OP))
{
@@ -654,7 +673,7 @@ AcpiDmDescendingOp (
if (Op->Common.AmlOpcode != AML_INT_NAMEDFIELD_OP)
{
- if (AcpiGbl_DbOpt_Verbose)
+ if (AcpiGbl_DmOpt_Verbose)
{
(void) AcpiPsDisplayObjectPathname (NULL, Op);
}
@@ -1118,5 +1137,3 @@ AcpiDmAscendingOp (
return (AE_OK);
}
-
-#endif /* ACPI_DISASSEMBLER */
diff --git a/src/acpica/source/components/dispatcher/dscontrol.c b/src/acpica/source/components/dispatcher/dscontrol.c
index 218cbe9..a069ed5 100644
--- a/src/acpica/source/components/dispatcher/dscontrol.c
+++ b/src/acpica/source/components/dispatcher/dscontrol.c
@@ -293,7 +293,7 @@ AcpiDsExecEndControlOp (
* loop does not implement a timeout.
*/
ControlState->Control.LoopCount++;
- if (ControlState->Control.LoopCount > ACPI_MAX_LOOP_ITERATIONS)
+ if (ControlState->Control.LoopCount > AcpiGbl_MaxLoopIterations)
{
Status = AE_AML_INFINITE_LOOP;
break;
diff --git a/src/acpica/source/components/dispatcher/dsdebug.c b/src/acpica/source/components/dispatcher/dsdebug.c
index 8c4a7ed..80b3e0c 100644
--- a/src/acpica/source/components/dispatcher/dsdebug.c
+++ b/src/acpica/source/components/dispatcher/dsdebug.c
@@ -168,7 +168,7 @@ AcpiDsPrintNodePathname (
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
- Status = AcpiNsHandleToPathname (Node, &Buffer, FALSE);
+ Status = AcpiNsHandleToPathname (Node, &Buffer, TRUE);
if (ACPI_SUCCESS (Status))
{
if (Message)
diff --git a/src/acpica/source/components/dispatcher/dsinit.c b/src/acpica/source/components/dispatcher/dsinit.c
index 2cd5c4e..d24cc01 100644
--- a/src/acpica/source/components/dispatcher/dsinit.c
+++ b/src/acpica/source/components/dispatcher/dsinit.c
@@ -327,10 +327,19 @@ AcpiDsInitializeObjects (
return_ACPI_STATUS (Status);
}
+ /* DSDT is always the first AML table */
+
+ if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT))
+ {
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "\nInitializing Namespace objects:\n"));
+ }
+
+ /* Summary of objects initialized */
+
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
- "Table [%4.4s] (id %4.4X) - %4u Objects with %3u Devices, "
- "%3u Regions, %3u Methods (%u/%u/%u Serial/Non/Cvt)\n",
- Table->Signature, OwnerId, Info.ObjectCount, Info.DeviceCount,
+ "Table [%4.4s:%8.8s] (id %.2X) - %4u Objects with %3u Devices, "
+ "%3u Regions, %4u Methods (%u/%u/%u Serial/Non/Cvt)\n",
+ Table->Signature, Table->OemTableId, OwnerId, Info.ObjectCount, Info.DeviceCount,
Info.OpRegionCount, Info.MethodCount, Info.SerialMethodCount,
Info.NonSerialMethodCount, Info.SerializedMethodCount));
diff --git a/src/acpica/source/components/dispatcher/dsopcode.c b/src/acpica/source/components/dispatcher/dsopcode.c
index 6a7a559..6e2c784 100644
--- a/src/acpica/source/components/dispatcher/dsopcode.c
+++ b/src/acpica/source/components/dispatcher/dsopcode.c
@@ -585,8 +585,8 @@ AcpiDsEvalTableRegionOperands (
ACPI_OPERAND_OBJECT **Operand;
ACPI_NAMESPACE_NODE *Node;
ACPI_PARSE_OBJECT *NextOp;
- UINT32 TableIndex;
ACPI_TABLE_HEADER *Table;
+ UINT32 TableIndex;
ACPI_FUNCTION_TRACE_PTR (DsEvalTableRegionOperands, Op);
@@ -612,6 +612,8 @@ AcpiDsEvalTableRegionOperands (
return_ACPI_STATUS (Status);
}
+ Operand = &WalkState->Operands[0];
+
/*
* Resolve the Signature string, OemId string,
* and OemTableId string operands
@@ -620,49 +622,57 @@ AcpiDsEvalTableRegionOperands (
ACPI_WALK_OPERANDS, WalkState);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ goto Cleanup;
}
- Operand = &WalkState->Operands[0];
-
/* Find the ACPI table */
- Status = AcpiTbFindTable (Operand[0]->String.Pointer,
- Operand[1]->String.Pointer, Operand[2]->String.Pointer,
- &TableIndex);
+ Status = AcpiTbFindTable (
+ Operand[0]->String.Pointer,
+ Operand[1]->String.Pointer,
+ Operand[2]->String.Pointer, &TableIndex);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ if (Status == AE_NOT_FOUND)
+ {
+ ACPI_ERROR ((AE_INFO,
+ "ACPI Table [%4.4s] OEM:(%s, %s) not found in RSDT/XSDT",
+ Operand[0]->String.Pointer,
+ Operand[1]->String.Pointer,
+ Operand[2]->String.Pointer));
+ }
+ goto Cleanup;
}
- AcpiUtRemoveReference (Operand[0]);
- AcpiUtRemoveReference (Operand[1]);
- AcpiUtRemoveReference (Operand[2]);
-
Status = AcpiGetTableByIndex (TableIndex, &Table);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ goto Cleanup;
}
ObjDesc = AcpiNsGetAttachedObject (Node);
if (!ObjDesc)
{
- return_ACPI_STATUS (AE_NOT_EXIST);
+ Status = AE_NOT_EXIST;
+ goto Cleanup;
}
ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
ObjDesc->Region.Length = Table->Length;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
- ObjDesc,
- ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
+ ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
ObjDesc->Region.Length));
/* Now the address and length are valid for this opregion */
ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID;
+Cleanup:
+ AcpiUtRemoveReference (Operand[0]);
+ AcpiUtRemoveReference (Operand[1]);
+ AcpiUtRemoveReference (Operand[2]);
+
return_ACPI_STATUS (Status);
}
diff --git a/src/acpica/source/components/events/evregion.c b/src/acpica/source/components/events/evregion.c
index 25a7900..24848db 100644
--- a/src/acpica/source/components/events/evregion.c
+++ b/src/acpica/source/components/events/evregion.c
@@ -732,10 +732,17 @@ AcpiEvExecuteRegMethods (
ACPI_ADR_SPACE_TYPE SpaceId)
{
ACPI_STATUS Status;
+ ACPI_REG_WALK_INFO Info;
ACPI_FUNCTION_TRACE (EvExecuteRegMethods);
+ Info.SpaceId = SpaceId;
+ Info.RegRunCount = 0;
+
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES,
+ " Running _REG methods for SpaceId %s\n",
+ AcpiUtGetRegionName (Info.SpaceId)));
/*
* Run all _REG methods for all Operation Regions for this space ID. This
@@ -744,8 +751,7 @@ AcpiEvExecuteRegMethods (
* regions of this Space ID before we can run any _REG methods)
*/
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
- ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, NULL,
- &SpaceId, NULL);
+ ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, NULL, &Info, NULL);
/* Special case for EC: handle "orphan" _REG methods with no region */
@@ -754,6 +760,10 @@ AcpiEvExecuteRegMethods (
AcpiEvOrphanEcRegMethod (Node);
}
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES,
+ " Executed %u _REG methods for SpaceId %s\n",
+ Info.RegRunCount, AcpiUtGetRegionName (Info.SpaceId)));
+
return_ACPI_STATUS (Status);
}
@@ -777,11 +787,11 @@ AcpiEvRegRun (
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_NAMESPACE_NODE *Node;
- ACPI_ADR_SPACE_TYPE SpaceId;
ACPI_STATUS Status;
+ ACPI_REG_WALK_INFO *Info;
- SpaceId = *ACPI_CAST_PTR (ACPI_ADR_SPACE_TYPE, Context);
+ Info = ACPI_CAST_PTR (ACPI_REG_WALK_INFO, Context);
/* Convert and validate the device handle */
@@ -813,13 +823,14 @@ AcpiEvRegRun (
/* Object is a Region */
- if (ObjDesc->Region.SpaceId != SpaceId)
+ if (ObjDesc->Region.SpaceId != Info->SpaceId)
{
/* This region is for a different address space, just ignore it */
return (AE_OK);
}
+ Info->RegRunCount++;
Status = AcpiEvExecuteRegMethod (ObjDesc, ACPI_REG_CONNECT);
return (Status);
}
diff --git a/src/acpica/source/components/executer/exconfig.c b/src/acpica/source/components/executer/exconfig.c
index 9580bc0..d4f7087 100644
--- a/src/acpica/source/components/executer/exconfig.c
+++ b/src/acpica/source/components/executer/exconfig.c
@@ -251,15 +251,6 @@ AcpiExLoadTableOp (
ACPI_FUNCTION_TRACE (ExLoadTableOp);
- /* Validate lengths for the Signature, OemId, and OemTableId strings */
-
- if ((Operand[0]->String.Length > ACPI_NAME_SIZE) ||
- (Operand[1]->String.Length > ACPI_OEM_ID_SIZE) ||
- (Operand[2]->String.Length > ACPI_OEM_TABLE_ID_SIZE))
- {
- return_ACPI_STATUS (AE_AML_STRING_LIMIT);
- }
-
/* Find the ACPI table in the RSDT/XSDT */
Status = AcpiTbFindTable (
diff --git a/src/acpica/source/components/executer/exdump.c b/src/acpica/source/components/executer/exdump.c
index c13839b..c682777 100644
--- a/src/acpica/source/components/executer/exdump.c
+++ b/src/acpica/source/components/executer/exdump.c
@@ -1112,7 +1112,7 @@ AcpiExDumpReferenceObj (
AcpiOsPrintf (" %p ", ObjDesc->Reference.Node);
Status = AcpiNsHandleToPathname (ObjDesc->Reference.Node,
- &RetBuf, FALSE);
+ &RetBuf, TRUE);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf (" Could not convert name to pathname\n");
diff --git a/src/acpica/source/components/executer/exresnte.c b/src/acpica/source/components/executer/exresnte.c
index d72ec55..6967bbb 100644
--- a/src/acpica/source/components/executer/exresnte.c
+++ b/src/acpica/source/components/executer/exresnte.c
@@ -206,7 +206,7 @@ AcpiExResolveNodeToValue (
{
ACPI_ERROR ((AE_INFO, "No object attached to node [%4.4s] %p",
Node->Name.Ascii, Node));
- return_ACPI_STATUS (AE_AML_NO_OPERAND);
+ return_ACPI_STATUS (AE_AML_UNINITIALIZED_NODE);
}
/*
diff --git a/src/acpica/source/components/executer/exresolv.c b/src/acpica/source/components/executer/exresolv.c
index e874342..d32e842 100644
--- a/src/acpica/source/components/executer/exresolv.c
+++ b/src/acpica/source/components/executer/exresolv.c
@@ -423,8 +423,8 @@ AcpiExResolveMultiple (
ACPI_OBJECT_TYPE *ReturnType,
ACPI_OPERAND_OBJECT **ReturnDesc)
{
- ACPI_OPERAND_OBJECT *ObjDesc = (void *) Operand;
- ACPI_NAMESPACE_NODE *Node;
+ ACPI_OPERAND_OBJECT *ObjDesc = ACPI_CAST_PTR (void, Operand);
+ ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Operand);
ACPI_OBJECT_TYPE Type;
ACPI_STATUS Status;
@@ -444,7 +444,7 @@ AcpiExResolveMultiple (
case ACPI_DESC_TYPE_NAMED:
Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
- ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
+ ObjDesc = AcpiNsGetAttachedObject (Node);
/* If we had an Alias node, use the attached object for type info */
@@ -453,6 +453,14 @@ AcpiExResolveMultiple (
Type = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Type;
ObjDesc = AcpiNsGetAttachedObject ((ACPI_NAMESPACE_NODE *) ObjDesc);
}
+
+ if (!ObjDesc)
+ {
+ ACPI_ERROR ((AE_INFO,
+ "[%4.4s] Node is unresolved or uninitialized",
+ AcpiUtGetNodeName (Node)));
+ return_ACPI_STATUS (AE_AML_UNINITIALIZED_NODE);
+ }
break;
default:
diff --git a/src/acpica/source/components/hardware/hwxfsleep.c b/src/acpica/source/components/hardware/hwxfsleep.c
index 09cbe2f..ce6e8ee 100644
--- a/src/acpica/source/components/hardware/hwxfsleep.c
+++ b/src/acpica/source/components/hardware/hwxfsleep.c
@@ -241,21 +241,9 @@ AcpiSetFirmwareWakingVector (
ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
- /* If Hardware Reduced flag is set, there is no FACS */
-
- if (AcpiGbl_ReducedHardware)
- {
- return_ACPI_STATUS (AE_OK);
- }
-
- if (AcpiGbl_Facs32)
- {
- (void) AcpiHwSetFirmwareWakingVector (AcpiGbl_Facs32,
- PhysicalAddress, PhysicalAddress64);
- }
- if (AcpiGbl_Facs64)
+ if (AcpiGbl_FACS)
{
- (void) AcpiHwSetFirmwareWakingVector (AcpiGbl_Facs64,
+ (void) AcpiHwSetFirmwareWakingVector (AcpiGbl_FACS,
PhysicalAddress, PhysicalAddress64);
}
diff --git a/src/acpica/source/components/namespace/nseval.c b/src/acpica/source/components/namespace/nseval.c
index 947a34d..7c8d6fd 100644
--- a/src/acpica/source/components/namespace/nseval.c
+++ b/src/acpica/source/components/namespace/nseval.c
@@ -357,6 +357,7 @@ AcpiNsEvaluate (
if (ACPI_FAILURE (Status))
{
+ Info->ReturnObject = NULL;
goto Cleanup;
}
@@ -562,7 +563,8 @@ AcpiNsExecModuleCode (
Status = AcpiNsEvaluate (Info);
- ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "Executed module-level code at %p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES,
+ "Executed module-level code at %p\n",
MethodObj->Method.AmlStart));
/* Delete a possible implicit return value (in slack mode) */
diff --git a/src/acpica/source/components/namespace/nsload.c b/src/acpica/source/components/namespace/nsload.c
index 590be03..8e1a0c2 100644
--- a/src/acpica/source/components/namespace/nsload.c
+++ b/src/acpica/source/components/namespace/nsload.c
@@ -200,7 +200,21 @@ AcpiNsLoadTable (
}
else
{
- (void) AcpiTbReleaseOwnerId (TableIndex);
+ /*
+ * On error, delete any namespace objects created by this table.
+ * We cannot initialize these objects, so delete them. There are
+ * a couple of expecially bad cases:
+ * AE_ALREADY_EXISTS - namespace collision.
+ * AE_NOT_FOUND - the target of a Scope operator does not
+ * exist. This target of Scope must already exist in the
+ * namespace, as per the ACPI specification.
+ */
+ (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+ AcpiNsDeleteNamespaceByOwner (
+ AcpiGbl_RootTableList.Tables[TableIndex].OwnerId);
+ AcpiTbReleaseOwnerId (TableIndex);
+
+ return_ACPI_STATUS (Status);
}
Unlock:
diff --git a/src/acpica/source/components/namespace/nsutils.c b/src/acpica/source/components/namespace/nsutils.c
index 03b9d18..acee749 100644
--- a/src/acpica/source/components/namespace/nsutils.c
+++ b/src/acpica/source/components/namespace/nsutils.c
@@ -162,7 +162,7 @@ AcpiNsPrintNodePathname (
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
- Status = AcpiNsHandleToPathname (Node, &Buffer, FALSE);
+ Status = AcpiNsHandleToPathname (Node, &Buffer, TRUE);
if (ACPI_SUCCESS (Status))
{
if (Message)
@@ -769,6 +769,24 @@ AcpiNsTerminate (
ACPI_FUNCTION_TRACE (NsTerminate);
+#ifdef ACPI_EXEC_APP
+ {
+ ACPI_OPERAND_OBJECT *Prev;
+ ACPI_OPERAND_OBJECT *Next;
+
+ /* Delete any module-level code blocks */
+
+ Next = AcpiGbl_ModuleCodeList;
+ while (Next)
+ {
+ Prev = Next;
+ Next = Next->Method.Mutex;
+ Prev->Method.Mutex = NULL; /* Clear the Mutex (cheated) field */
+ AcpiUtRemoveReference (Prev);
+ }
+ }
+#endif
+
/*
* Free the entire namespace -- all nodes and all objects
* attached to the nodes
diff --git a/src/acpica/source/components/parser/psloop.c b/src/acpica/source/components/parser/psloop.c
index b7b2dcd..bd7166f 100644
--- a/src/acpica/source/components/parser/psloop.c
+++ b/src/acpica/source/components/parser/psloop.c
@@ -390,6 +390,9 @@ AcpiPsLinkModuleCode (
ACPI_NAMESPACE_NODE *ParentNode;
+ ACPI_FUNCTION_TRACE (PsLinkModuleCode);
+
+
/* Get the tail of the list */
Prev = Next = AcpiGbl_ModuleCodeList;
@@ -411,9 +414,12 @@ AcpiPsLinkModuleCode (
MethodObj = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
if (!MethodObj)
{
- return;
+ return_VOID;
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "Create/Link new code block: %p\n", MethodObj));
+
if (ParentOp->Common.Node)
{
ParentNode = ParentOp->Common.Node;
@@ -446,8 +452,13 @@ AcpiPsLinkModuleCode (
}
else
{
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "Appending to existing code block: %p\n", Prev));
+
Prev->Method.AmlLength += AmlLength;
}
+
+ return_VOID;
}
/*******************************************************************************
diff --git a/src/acpica/source/components/resources/rsdump.c b/src/acpica/source/components/resources/rsdump.c
index 6237118..07d308a 100644
--- a/src/acpica/source/components/resources/rsdump.c
+++ b/src/acpica/source/components/resources/rsdump.c
@@ -123,7 +123,6 @@
/*
* All functions in this module are used by the AML Debugger only
*/
-#if defined(ACPI_DEBUGGER)
/* Local prototypes */
@@ -739,5 +738,3 @@ AcpiRsDumpWordList (
"Word", i, Data[i]);
}
}
-
-#endif
diff --git a/src/acpica/source/components/tables/tbfadt.c b/src/acpica/source/components/tables/tbfadt.c
index 15a57e3..4f82733 100644
--- a/src/acpica/source/components/tables/tbfadt.c
+++ b/src/acpica/source/components/tables/tbfadt.c
@@ -448,7 +448,7 @@ AcpiTbParseFadt (
/* Obtain the DSDT and FACS tables via their addresses within the FADT */
AcpiTbInstallFixedTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XDsdt,
- ACPI_SIG_DSDT, ACPI_TABLE_INDEX_DSDT);
+ ACPI_SIG_DSDT, &AcpiGbl_DsdtIndex);
/* If Hardware Reduced flag is set, there is no FACS */
@@ -457,12 +457,12 @@ AcpiTbParseFadt (
if (AcpiGbl_FADT.Facs)
{
AcpiTbInstallFixedTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs,
- ACPI_SIG_FACS, ACPI_TABLE_INDEX_FACS);
+ ACPI_SIG_FACS, &AcpiGbl_FacsIndex);
}
if (AcpiGbl_FADT.XFacs)
{
AcpiTbInstallFixedTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs,
- ACPI_SIG_FACS, ACPI_TABLE_INDEX_X_FACS);
+ ACPI_SIG_FACS, &AcpiGbl_XFacsIndex);
}
}
}
diff --git a/src/acpica/source/components/tables/tbfind.c b/src/acpica/source/components/tables/tbfind.c
index a52d0de..bf692b8 100644
--- a/src/acpica/source/components/tables/tbfind.c
+++ b/src/acpica/source/components/tables/tbfind.c
@@ -145,14 +145,29 @@ AcpiTbFindTable (
char *OemTableId,
UINT32 *TableIndex)
{
- UINT32 i;
ACPI_STATUS Status;
ACPI_TABLE_HEADER Header;
+ UINT32 i;
ACPI_FUNCTION_TRACE (TbFindTable);
+ /* Validate the input table signature */
+
+ if (!AcpiIsValidSignature (Signature))
+ {
+ return_ACPI_STATUS (AE_BAD_SIGNATURE);
+ }
+
+ /* Don't allow the OEM strings to be too long */
+
+ if ((strlen (OemId) > ACPI_OEM_ID_SIZE) ||
+ (strlen (OemTableId) > ACPI_OEM_TABLE_ID_SIZE))
+ {
+ return_ACPI_STATUS (AE_AML_STRING_LIMIT);
+ }
+
/* Normalize the input strings */
memset (&Header, 0, sizeof (ACPI_TABLE_HEADER));
diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c
index 4ddf2ee..2d7bb94 100644
--- a/src/acpica/source/components/tables/tbinstal.c
+++ b/src/acpica/source/components/tables/tbinstal.c
@@ -180,9 +180,9 @@ AcpiTbCompareTables (
*
* FUNCTION: AcpiTbInstallTableWithOverride
*
- * PARAMETERS: TableIndex - Index into root table array
- * NewTableDesc - New table descriptor to install
+ * PARAMETERS: NewTableDesc - New table descriptor to install
* Override - Whether override should be performed
+ * TableIndex - Where the table index is returned
*
* RETURN: None
*
@@ -195,12 +195,16 @@ AcpiTbCompareTables (
void
AcpiTbInstallTableWithOverride (
- UINT32 TableIndex,
ACPI_TABLE_DESC *NewTableDesc,
- BOOLEAN Override)
+ BOOLEAN Override,
+ UINT32 *TableIndex)
{
+ UINT32 i;
+ ACPI_STATUS Status;
+
- if (TableIndex >= AcpiGbl_RootTableList.CurrentTableCount)
+ Status = AcpiTbGetNextTableDescriptor (&i, NULL);
+ if (ACPI_FAILURE (Status))
{
return;
}
@@ -217,14 +221,18 @@ AcpiTbInstallTableWithOverride (
AcpiTbOverrideTable (NewTableDesc);
}
- AcpiTbInitTableDescriptor (&AcpiGbl_RootTableList.Tables[TableIndex],
+ AcpiTbInitTableDescriptor (&AcpiGbl_RootTableList.Tables[i],
NewTableDesc->Address, NewTableDesc->Flags, NewTableDesc->Pointer);
AcpiTbPrintTableHeader (NewTableDesc->Address, NewTableDesc->Pointer);
+ /* This synchronizes AcpiGbl_DsdtIndex */
+
+ *TableIndex = i;
+
/* Set the global integer width (based upon revision of the DSDT) */
- if (TableIndex == ACPI_TABLE_INDEX_DSDT)
+ if (i == AcpiGbl_DsdtIndex)
{
AcpiUtSetIntegerWidth (NewTableDesc->Pointer->Revision);
}
@@ -238,7 +246,7 @@ AcpiTbInstallTableWithOverride (
* PARAMETERS: Address - Physical address of DSDT or FACS
* Signature - Table signature, NULL if no need to
* match
- * TableIndex - Index into root table array
+ * TableIndex - Where the table index is returned
*
* RETURN: Status
*
@@ -251,7 +259,7 @@ ACPI_STATUS
AcpiTbInstallFixedTable (
ACPI_PHYSICAL_ADDRESS Address,
char *Signature,
- UINT32 TableIndex)
+ UINT32 *TableIndex)
{
ACPI_TABLE_DESC NewTableDesc;
ACPI_STATUS Status;
@@ -286,7 +294,9 @@ AcpiTbInstallFixedTable (
goto ReleaseAndExit;
}
- AcpiTbInstallTableWithOverride (TableIndex, &NewTableDesc, TRUE);
+ /* Add the table to the global root table list */
+
+ AcpiTbInstallTableWithOverride (&NewTableDesc, TRUE, TableIndex);
ReleaseAndExit:
@@ -447,14 +457,7 @@ AcpiTbInstallStandardTable (
/* Add the table to the global root table list */
- Status = AcpiTbGetNextTableDescriptor (&i, NULL);
- if (ACPI_FAILURE (Status))
- {
- goto ReleaseAndExit;
- }
-
- *TableIndex = i;
- AcpiTbInstallTableWithOverride (i, &NewTableDesc, Override);
+ AcpiTbInstallTableWithOverride (&NewTableDesc, Override, TableIndex);
ReleaseAndExit:
diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c
index 19ebec8..0570425 100644
--- a/src/acpica/source/components/tables/tbutils.c
+++ b/src/acpica/source/components/tables/tbutils.c
@@ -147,6 +147,8 @@ ACPI_STATUS
AcpiTbInitializeFacs (
void)
{
+ ACPI_TABLE_FACS *Facs;
+
/* If Hardware Reduced flag is set, there is no FACS */
@@ -155,19 +157,18 @@ AcpiTbInitializeFacs (
AcpiGbl_FACS = NULL;
return (AE_OK);
}
-
- (void) AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS,
- ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_Facs32));
- (void) AcpiGetTableByIndex (ACPI_TABLE_INDEX_X_FACS,
- ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_Facs64));
-
- if (AcpiGbl_Facs64 && (!AcpiGbl_Facs32 || !AcpiGbl_Use32BitFacsAddresses))
+ else if (AcpiGbl_FADT.XFacs &&
+ (!AcpiGbl_FADT.Facs || !AcpiGbl_Use32BitFacsAddresses))
{
- AcpiGbl_FACS = AcpiGbl_Facs64;
+ (void) AcpiGetTableByIndex (AcpiGbl_XFacsIndex,
+ ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
+ AcpiGbl_FACS = Facs;
}
- else if (AcpiGbl_Facs32)
+ else if (AcpiGbl_FADT.Facs)
{
- AcpiGbl_FACS = AcpiGbl_Facs32;
+ (void) AcpiGetTableByIndex (AcpiGbl_FacsIndex,
+ ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
+ AcpiGbl_FACS = Facs;
}
/* If there is no FACS, just continue. There was already an error msg */
@@ -278,7 +279,7 @@ AcpiTbCopyDsdt (
AcpiTbUninstallTable (TableDesc);
AcpiTbInitTableDescriptor (
- &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT],
+ &AcpiGbl_RootTableList.Tables[AcpiGbl_DsdtIndex],
ACPI_PTR_TO_PHYSADDR (NewTable), ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL,
NewTable);
@@ -472,13 +473,6 @@ AcpiTbParseRootTable (
TableEntrySize);
TableEntry = ACPI_ADD_PTR (UINT8, Table, sizeof (ACPI_TABLE_HEADER));
- /*
- * First three entries in the table array are reserved for the DSDT
- * and 32bit/64bit FACS, which are not actually present in the
- * RSDT/XSDT - they come from the FADT
- */
- AcpiGbl_RootTableList.CurrentTableCount = 3;
-
/* Initialize the root table array from the RSDT/XSDT */
for (i = 0; i < TableCount; i++)
@@ -513,3 +507,43 @@ NextTable:
return_ACPI_STATUS (AE_OK);
}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiIsValidSignature
+ *
+ * PARAMETERS: Signature - Sig string to be validated
+ *
+ * RETURN: TRUE if signature is correct length and has valid characters
+ *
+ * DESCRIPTION: Validate an ACPI table signature.
+ *
+ ******************************************************************************/
+
+BOOLEAN
+AcpiIsValidSignature (
+ char *Signature)
+{
+ UINT32 i;
+
+
+ /* Validate the signature length */
+
+ if (strlen (Signature) != ACPI_NAME_SIZE)
+ {
+ return (FALSE);
+ }
+
+ /* Validate each character in the signature */
+
+ for (i = 0; i < ACPI_NAME_SIZE; i++)
+ {
+ if (!AcpiUtValidAcpiChar (Signature[i], i))
+ {
+ return (FALSE);
+ }
+ }
+
+ return (TRUE);
+}
diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c
index 7a6711f..1d51c91 100644
--- a/src/acpica/source/components/tables/tbxfload.c
+++ b/src/acpica/source/components/tables/tbxfload.c
@@ -123,12 +123,6 @@
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbxfload")
-/* Local prototypes */
-
-static ACPI_STATUS
-AcpiTbLoadNamespace (
- void);
-
/*******************************************************************************
*
@@ -155,6 +149,14 @@ AcpiLoadTables (
/* Load the namespace from the tables */
Status = AcpiTbLoadNamespace ();
+
+ /* Don't let single failures abort the load */
+
+ if (Status == AE_CTRL_TERMINATE)
+ {
+ Status = AE_OK;
+ }
+
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
@@ -180,13 +182,16 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiLoadTables)
*
******************************************************************************/
-static ACPI_STATUS
+ACPI_STATUS
AcpiTbLoadNamespace (
void)
{
ACPI_STATUS Status;
UINT32 i;
ACPI_TABLE_HEADER *NewDsdt;
+ ACPI_TABLE_DESC *Table;
+ UINT32 TablesLoaded = 0;
+ UINT32 TablesFailed = 0;
ACPI_FUNCTION_TRACE (TbLoadNamespace);
@@ -198,12 +203,11 @@ AcpiTbLoadNamespace (
* Load the namespace. The DSDT is required, but any SSDT and
* PSDT tables are optional. Verify the DSDT.
*/
+ Table = &AcpiGbl_RootTableList.Tables[AcpiGbl_DsdtIndex];
+
if (!AcpiGbl_RootTableList.CurrentTableCount ||
- !ACPI_COMPARE_NAME (
- &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature),
- ACPI_SIG_DSDT) ||
- ACPI_FAILURE (AcpiTbValidateTable (
- &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT])))
+ !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_DSDT) ||
+ ACPI_FAILURE (AcpiTbValidateTable (Table)))
{
Status = AE_NO_ACPI_TABLES;
goto UnlockAndExit;
@@ -215,7 +219,7 @@ AcpiTbLoadNamespace (
* array can change dynamically as tables are loaded at run-time. Note:
* .Pointer field is not validated until after call to AcpiTbValidateTable.
*/
- AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer;
+ AcpiGbl_DSDT = Table->Pointer;
/*
* Optionally copy the entire DSDT to local memory (instead of simply
@@ -225,7 +229,7 @@ AcpiTbLoadNamespace (
*/
if (AcpiGbl_CopyDsdtLocally)
{
- NewDsdt = AcpiTbCopyDsdt (ACPI_TABLE_INDEX_DSDT);
+ NewDsdt = AcpiTbCopyDsdt (AcpiGbl_DsdtIndex);
if (NewDsdt)
{
AcpiGbl_DSDT = NewDsdt;
@@ -243,10 +247,15 @@ AcpiTbLoadNamespace (
/* Load and parse tables */
- Status = AcpiNsLoadTable (ACPI_TABLE_INDEX_DSDT, AcpiGbl_RootNode);
+ Status = AcpiNsLoadTable (AcpiGbl_DsdtIndex, AcpiGbl_RootNode);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ ACPI_EXCEPTION ((AE_INFO, Status, "[DSDT] table load failed"));
+ TablesFailed++;
+ }
+ else
+ {
+ TablesLoaded++;
}
/* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */
@@ -254,15 +263,13 @@ AcpiTbLoadNamespace (
(void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
{
+ Table = &AcpiGbl_RootTableList.Tables[i];
+
if (!AcpiGbl_RootTableList.Tables[i].Address ||
- (!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
- ACPI_SIG_SSDT) &&
- !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
- ACPI_SIG_PSDT) &&
- !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
- ACPI_SIG_OSDT)) ||
- ACPI_FAILURE (AcpiTbValidateTable (
- &AcpiGbl_RootTableList.Tables[i])))
+ (!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) &&
+ !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) &&
+ !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) ||
+ ACPI_FAILURE (AcpiTbValidateTable (Table)))
{
continue;
}
@@ -270,11 +277,41 @@ AcpiTbLoadNamespace (
/* Ignore errors while loading tables, get as many as possible */
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
- (void) AcpiNsLoadTable (i, AcpiGbl_RootNode);
+ Status = AcpiNsLoadTable (i, AcpiGbl_RootNode);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "(%4.4s:%8.8s) while loading table",
+ Table->Signature.Ascii, Table->Pointer->OemTableId));
+ TablesFailed++;
+
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
+ "Table [%4.4s:%8.8s] (id FF) - Table namespace load failed\n\n",
+ Table->Signature.Ascii, Table->Pointer->OemTableId));
+ }
+ else
+ {
+ TablesLoaded++;
+ }
+
(void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
}
- ACPI_INFO ((AE_INFO, "All ACPI Tables successfully acquired"));
+ if (!TablesFailed)
+ {
+ ACPI_INFO ((AE_INFO,
+ "%u ACPI AML tables successfully acquired and loaded",
+ TablesLoaded));
+ }
+ else
+ {
+ ACPI_ERROR ((AE_INFO,
+ "%u table load failures, %u successful",
+ TablesFailed, TablesLoaded));
+
+ /* Indicate at least one failure */
+
+ Status = AE_CTRL_TERMINATE;
+ }
UnlockAndExit:
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
diff --git a/src/acpica/source/components/utilities/utfileio.c b/src/acpica/source/components/utilities/utfileio.c
index 5b78379..7d6c225 100644
--- a/src/acpica/source/components/utilities/utfileio.c
+++ b/src/acpica/source/components/utilities/utfileio.c
@@ -413,7 +413,8 @@ AcpiUtReadTableFromFile (
/* Get the entire file */
- fprintf (stderr, "Reading ACPI table from file %10s - Length %.8u (0x%06X)\n",
+ fprintf (stderr,
+ "Reading ACPI table from file %12s - Length %.8u (0x%06X)\n",
Filename, FileSize, FileSize);
Status = AcpiUtReadTable (File, Table, &TableLength);
diff --git a/src/acpica/source/components/utilities/utinit.c b/src/acpica/source/components/utilities/utinit.c
index 9653a3a..ed090f1 100644
--- a/src/acpica/source/components/utilities/utinit.c
+++ b/src/acpica/source/components/utilities/utinit.c
@@ -299,6 +299,7 @@ AcpiUtInitGlobals (
AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING;
AcpiGbl_OsiMutex = NULL;
AcpiGbl_RegMethodsExecuted = FALSE;
+ AcpiGbl_MaxLoopIterations = 0xFFFF;
/* Hardware oriented */
diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c
index 762790d..ecf22db 100644
--- a/src/acpica/source/components/utilities/utmisc.c
+++ b/src/acpica/source/components/utilities/utmisc.c
@@ -156,7 +156,7 @@ AcpiUtIsPciRootBridge (
}
-#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_NAMES_APP)
/*******************************************************************************
*
* FUNCTION: AcpiUtIsAmlTable
@@ -490,7 +490,7 @@ AcpiUtDisplayInitPathname (
/* Get the full pathname to the node */
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
- Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, FALSE);
+ Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
if (ACPI_FAILURE (Status))
{
return;
diff --git a/src/acpica/source/components/utilities/utxface.c b/src/acpica/source/components/utilities/utxface.c
index 612024f..a34970e 100644
--- a/src/acpica/source/components/utilities/utxface.c
+++ b/src/acpica/source/components/utilities/utxface.c
@@ -171,14 +171,6 @@ AcpiTerminate (
AcpiUtMutexTerminate ();
-
-#ifdef ACPI_DEBUGGER
-
- /* Shut down the debugger */
-
- AcpiDbTerminate ();
-#endif
-
/* Now we can shutdown the OS-dependent layer */
Status = AcpiOsTerminate ();
@@ -676,7 +668,7 @@ AcpiDecodePldBuffer (
/* Parameter validation */
- if (!InBuffer || !ReturnBuffer || (Length < 16))
+ if (!InBuffer || !ReturnBuffer || (Length < ACPI_PLD_REV1_BUFFER_SIZE))
{
return (AE_BAD_PARAMETER);
}
@@ -728,7 +720,7 @@ AcpiDecodePldBuffer (
PldInfo->Rotation = ACPI_PLD_GET_ROTATION (&Dword);
PldInfo->Order = ACPI_PLD_GET_ORDER (&Dword);
- if (Length >= ACPI_PLD_BUFFER_SIZE)
+ if (Length >= ACPI_PLD_REV2_BUFFER_SIZE)
{
/* Fifth 32-bit DWord (Revision 2 of _PLD) */
diff --git a/src/acpica/source/components/utilities/utxfinit.c b/src/acpica/source/components/utilities/utxfinit.c
index 0d3cfdd..4703dc1 100644
--- a/src/acpica/source/components/utilities/utxfinit.c
+++ b/src/acpica/source/components/utilities/utxfinit.c
@@ -204,17 +204,6 @@ AcpiInitializeSubsystem (
return_ACPI_STATUS (Status);
}
- /* If configured, initialize the AML debugger */
-
-#ifdef ACPI_DEBUGGER
- Status = AcpiDbInitialize ();
- if (ACPI_FAILURE (Status))
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Debugger initialization"));
- return_ACPI_STATUS (Status);
- }
-#endif
-
return_ACPI_STATUS (AE_OK);
}
diff --git a/src/acpica/source/include/acbuffer.h b/src/acpica/source/include/acbuffer.h
index bbcff57..881b0f9 100644
--- a/src/acpica/source/include/acbuffer.h
+++ b/src/acpica/source/include/acbuffer.h
@@ -229,6 +229,7 @@ typedef struct acpi_pld_info
* (Intended for BIOS use only)
*/
#define ACPI_PLD_REV1_BUFFER_SIZE 16 /* For Revision 1 of the buffer (From ACPI spec) */
+#define ACPI_PLD_REV2_BUFFER_SIZE 20 /* For Revision 2 of the buffer (From ACPI spec) */
#define ACPI_PLD_BUFFER_SIZE 20 /* For Revision 2 of the buffer (From ACPI spec) */
/* First 32-bit dword, bits 0:32 */
diff --git a/src/acpica/source/include/acconfig.h b/src/acpica/source/include/acconfig.h
index 41fa33d..e49862c 100644
--- a/src/acpica/source/include/acconfig.h
+++ b/src/acpica/source/include/acconfig.h
@@ -210,10 +210,6 @@
#define ACPI_ROOT_TABLE_SIZE_INCREMENT 4
-/* Maximum number of While() loop iterations before forced abort */
-
-#define ACPI_MAX_LOOP_ITERATIONS 0xFFFF
-
/* Maximum sleep allowed via Sleep() operator */
#define ACPI_MAX_SLEEP 2000 /* 2000 millisec == two seconds */
diff --git a/src/acpica/source/include/acdebug.h b/src/acpica/source/include/acdebug.h
index 909c831..3b245b0 100644
--- a/src/acpica/source/include/acdebug.h
+++ b/src/acpica/source/include/acdebug.h
@@ -116,6 +116,12 @@
#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 */
@@ -149,9 +155,6 @@ typedef struct acpi_db_execute_walk
#define PARAM_LIST(pl) pl
-#define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_Verbose)
-#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
- AcpiOsPrintf PARAM_LIST(fp);}
#define EX_NO_SINGLE_STEP 1
#define EX_SINGLE_STEP 2
@@ -161,14 +164,6 @@ typedef struct acpi_db_execute_walk
* dbxface - external debugger interfaces
*/
ACPI_STATUS
-AcpiDbInitialize (
- void);
-
-void
-AcpiDbTerminate (
- void);
-
-ACPI_STATUS
AcpiDbSingleStep (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op,
diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
index 2cad1b9..d448b9f 100644
--- a/src/acpica/source/include/acdisasm.h
+++ b/src/acpica/source/include/acdisasm.h
@@ -258,13 +258,16 @@ typedef struct acpi_dmtable_data
typedef struct acpi_op_walk_info
{
+ ACPI_WALK_STATE *WalkState;
+ ACPI_PARSE_OBJECT *MappingOp;
+ UINT8 *PreviousAml;
+ UINT8 *StartAml;
UINT32 Level;
UINT32 LastLevel;
UINT32 Count;
UINT32 BitOffset;
UINT32 Flags;
- ACPI_WALK_STATE *WalkState;
- ACPI_PARSE_OBJECT *MappingOp;
+ UINT32 AmlOffset;
} ACPI_OP_WALK_INFO;
diff --git a/src/acpica/source/include/acexcep.h b/src/acpica/source/include/acexcep.h
index 90511b2..cf89df2 100644
--- a/src/acpica/source/include/acexcep.h
+++ b/src/acpica/source/include/acexcep.h
@@ -269,8 +269,9 @@ typedef struct acpi_exception_info
#define AE_AML_BAD_RESOURCE_LENGTH EXCEP_AML (0x001F)
#define AE_AML_ILLEGAL_ADDRESS EXCEP_AML (0x0020)
#define AE_AML_INFINITE_LOOP EXCEP_AML (0x0021)
+#define AE_AML_UNINITIALIZED_NODE EXCEP_AML (0x0022)
-#define AE_CODE_AML_MAX 0x0021
+#define AE_CODE_AML_MAX 0x0022
/*
@@ -394,7 +395,8 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Aml[] =
EXCEP_TXT ("AE_AML_CIRCULAR_REFERENCE", "Two references refer to each other"),
EXCEP_TXT ("AE_AML_BAD_RESOURCE_LENGTH", "The length of a Resource Descriptor in the AML is incorrect"),
EXCEP_TXT ("AE_AML_ILLEGAL_ADDRESS", "A memory, I/O, or PCI configuration address is invalid"),
- EXCEP_TXT ("AE_AML_INFINITE_LOOP", "An apparent infinite AML While loop, method was aborted")
+ EXCEP_TXT ("AE_AML_INFINITE_LOOP", "An apparent infinite AML While loop, method was aborted"),
+ EXCEP_TXT ("AE_AML_UNINITIALIZED_NODE", "A namespace node is uninitialized or unresolved")
};
static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Ctrl[] =
diff --git a/src/acpica/source/include/acglobal.h b/src/acpica/source/include/acglobal.h
index 4061401..d9ef98c 100644
--- a/src/acpica/source/include/acglobal.h
+++ b/src/acpica/source/include/acglobal.h
@@ -131,11 +131,12 @@ ACPI_GLOBAL (ACPI_TABLE_LIST, AcpiGbl_RootTableList);
ACPI_GLOBAL (ACPI_TABLE_HEADER *, AcpiGbl_DSDT);
ACPI_GLOBAL (ACPI_TABLE_HEADER, AcpiGbl_OriginalDsdtHeader);
+ACPI_INIT_GLOBAL (UINT32, AcpiGbl_DsdtIndex, ACPI_INVALID_TABLE_INDEX);
+ACPI_INIT_GLOBAL (UINT32, AcpiGbl_FacsIndex, ACPI_INVALID_TABLE_INDEX);
+ACPI_INIT_GLOBAL (UINT32, AcpiGbl_XFacsIndex, ACPI_INVALID_TABLE_INDEX);
#if (!ACPI_REDUCED_HARDWARE)
ACPI_GLOBAL (ACPI_TABLE_FACS *, AcpiGbl_FACS);
-ACPI_GLOBAL (ACPI_TABLE_FACS *, AcpiGbl_Facs32);
-ACPI_GLOBAL (ACPI_TABLE_FACS *, AcpiGbl_Facs64);
#endif /* !ACPI_REDUCED_HARDWARE */
@@ -312,6 +313,10 @@ ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0);
ACPI_GLOBAL (ACPI_THREAD_STATE *, AcpiGbl_CurrentWalkList);
+/* Maximum number of While() loop iterations before forced abort */
+
+ACPI_GLOBAL (UINT16, AcpiGbl_MaxLoopIterations);
+
/* Control method single step flag */
ACPI_GLOBAL (UINT8, AcpiGbl_CmSingleStep);
@@ -383,10 +388,11 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_NoResourceDisassembly, FALSE);
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE);
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_CstyleDisassembly, TRUE);
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ForceAmlDisassembly, FALSE);
-ACPI_INIT_GLOBAL (ACPI_PARSE_OBJECT *, AcpiGbl_PreviousOp, NULL);
+ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Verbose, TRUE);
+//ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Verbose, FALSE); OK
-ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Disasm);
-ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_Verbose);
+ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Disasm);
+ACPI_GLOBAL (BOOLEAN, AcpiGbl_DmOpt_Listing);
ACPI_GLOBAL (BOOLEAN, AcpiGbl_NumExternalMethods);
ACPI_GLOBAL (UINT32, AcpiGbl_ResolvedExternalMethods);
ACPI_GLOBAL (ACPI_EXTERNAL_LIST *, AcpiGbl_ExternalList);
@@ -421,8 +427,8 @@ ACPI_GLOBAL (char, AcpiGbl_DbDebugFilename[ACPI_DB_LINE_BUF
/*
* Statistic globals
*/
-ACPI_GLOBAL (UINT16, AcpiGbl_ObjTypeCount[ACPI_TYPE_NS_NODE_MAX+1]);
-ACPI_GLOBAL (UINT16, AcpiGbl_NodeTypeCount[ACPI_TYPE_NS_NODE_MAX+1]);
+ACPI_GLOBAL (UINT16, AcpiGbl_ObjTypeCount[ACPI_TOTAL_TYPES]);
+ACPI_GLOBAL (UINT16, AcpiGbl_NodeTypeCount[ACPI_TOTAL_TYPES]);
ACPI_GLOBAL (UINT16, AcpiGbl_ObjTypeCountMisc);
ACPI_GLOBAL (UINT16, AcpiGbl_NodeTypeCountMisc);
ACPI_GLOBAL (UINT32, AcpiGbl_NumNodes);
diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h
index bd026ae..58f2320 100644
--- a/src/acpica/source/include/aclocal.h
+++ b/src/acpica/source/include/aclocal.h
@@ -310,11 +310,9 @@ typedef struct acpi_table_list
#define ACPI_ROOT_ALLOW_RESIZE (2)
-/* Predefined (fixed) table indexes */
+/* Predefined table indexes */
-#define ACPI_TABLE_INDEX_DSDT (0)
-#define ACPI_TABLE_INDEX_FACS (1)
-#define ACPI_TABLE_INDEX_X_FACS (2)
+#define ACPI_INVALID_TABLE_INDEX (0xFFFFFFFF)
typedef struct acpi_find_context
@@ -537,6 +535,16 @@ typedef struct acpi_simple_repair_info
#define ACPI_NUM_RTYPES 5 /* Number of actual object types */
+/* Info for running the _REG methods */
+
+typedef struct acpi_reg_walk_info
+{
+ ACPI_ADR_SPACE_TYPE SpaceId;
+ UINT32 RegRunCount;
+
+} ACPI_REG_WALK_INFO;
+
+
/*****************************************************************************
*
* Event typedefs and structs
@@ -1391,6 +1399,13 @@ typedef struct acpi_integrity_info
#define ACPI_DB_DUPLICATE_OUTPUT 0x03
+typedef struct acpi_object_info
+{
+ UINT32 Types[ACPI_TOTAL_TYPES];
+
+} ACPI_OBJECT_INFO;
+
+
/*****************************************************************************
*
* Debug
diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
index 791aa64..e0cd0d0 100644
--- a/src/acpica/source/include/acpixf.h
+++ b/src/acpica/source/include/acpixf.h
@@ -118,7 +118,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20150717
+#define ACPI_CA_VERSION 0x20150818
#include "acconfig.h"
#include "actypes.h"
@@ -1280,4 +1280,12 @@ AcpiLogError (
const char *Format,
...))
+ACPI_STATUS
+AcpiInitializeDebugger (
+ void);
+
+void
+AcpiTerminateDebugger (
+ void);
+
#endif /* __ACXFACE_H__ */
diff --git a/src/acpica/source/include/actables.h b/src/acpica/source/include/actables.h
index 5a79540..10fb56d 100644
--- a/src/acpica/source/include/actables.h
+++ b/src/acpica/source/include/actables.h
@@ -308,18 +308,30 @@ AcpiTbCopyDsdt (
void
AcpiTbInstallTableWithOverride (
- UINT32 TableIndex,
ACPI_TABLE_DESC *NewTableDesc,
- BOOLEAN Override);
+ BOOLEAN Override,
+ UINT32 *TableIndex);
ACPI_STATUS
AcpiTbInstallFixedTable (
ACPI_PHYSICAL_ADDRESS Address,
char *Signature,
- UINT32 TableIndex);
+ UINT32 *TableIndex);
ACPI_STATUS
AcpiTbParseRootTable (
ACPI_PHYSICAL_ADDRESS RsdpAddress);
+BOOLEAN
+AcpiIsValidSignature (
+ char *Signature);
+
+
+/*
+ * tbxfload
+ */
+ACPI_STATUS
+AcpiTbLoadNamespace (
+ void);
+
#endif /* __ACTABLES_H__ */
diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h
index dcf11b5..e9e765d 100644
--- a/src/acpica/source/include/actypes.h
+++ b/src/acpica/source/include/actypes.h
@@ -746,6 +746,7 @@ typedef UINT32 ACPI_OBJECT_TYPE;
#define ACPI_TYPE_DEBUG_OBJECT 0x10
#define ACPI_TYPE_EXTERNAL_MAX 0x10
+#define ACPI_NUM_TYPES (ACPI_TYPE_EXTERNAL_MAX + 1)
/*
* These are object types that do not map directly to the ACPI
@@ -767,6 +768,7 @@ typedef UINT32 ACPI_OBJECT_TYPE;
#define ACPI_TYPE_LOCAL_SCOPE 0x1B /* 1 Name, multiple ObjectList Nodes */
#define ACPI_TYPE_NS_NODE_MAX 0x1B /* Last typecode used within a NS Node */
+#define ACPI_TOTAL_TYPES (ACPI_TYPE_NS_NODE_MAX + 1)
/*
* These are special object types that never appear in
diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
index 429c0a3..4fc44ff 100644
--- a/src/acpica/source/include/acutils.h
+++ b/src/acpica/source/include/acutils.h
@@ -814,7 +814,7 @@ BOOLEAN
AcpiUtIsPciRootBridge (
char *Id);
-#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_NAMES_APP)
BOOLEAN
AcpiUtIsAmlTable (
ACPI_TABLE_HEADER *Table);
diff --git a/src/acpica/source/include/platform/acenv.h b/src/acpica/source/include/platform/acenv.h
index 4e5fc15..614a538 100644
--- a/src/acpica/source/include/platform/acenv.h
+++ b/src/acpica/source/include/platform/acenv.h
@@ -143,13 +143,14 @@
#ifdef ACPI_ASL_COMPILER
#define ACPI_APPLICATION
-#define ACPI_DISASSEMBLER
#define ACPI_DEBUG_OUTPUT
#define ACPI_CONSTANT_EVAL_ONLY
#define ACPI_LARGE_NAMESPACE_NODE
#define ACPI_DATA_TABLE_DISASSEMBLY
#define ACPI_SINGLE_THREADED
#define ACPI_32BIT_PHYSICAL_ADDRESS
+
+#define ACPI_DISASSEMBLER 1
#endif
/* AcpiExec configuration. Multithreaded with full AML debugger */
@@ -162,8 +163,8 @@
#endif
/*
- * AcpiBin/AcpiDump/AcpiHelp/AcpiNames/AcpiSrc/AcpiXtract/Example configuration.
- * All single threaded.
+ * AcpiBin/AcpiDump/AcpiHelp/AcpiNames/AcpiSrc/AcpiXtract/Example
+ * configuration. All single threaded.
*/
#if (defined ACPI_BIN_APP) || \
(defined ACPI_DUMP_APP) || \
@@ -196,7 +197,7 @@
#define ACPI_USE_NATIVE_RSDP_POINTER
#endif
-/* AcpiDump configuration. Native mapping used if provied by OSPMs */
+/* AcpiDump configuration. Native mapping used if provided by the host */
#ifdef ACPI_DUMP_APP
#define ACPI_USE_NATIVE_MEMORY_MAPPING
@@ -214,6 +215,7 @@
#ifdef ACPI_LIBRARY
#define ACPI_USE_LOCAL_CACHE
+#define ACPI_FULL_DEBUG
#endif
/* Common for all ACPICA applications */
@@ -223,15 +225,14 @@
#define ACPI_USE_LOCAL_CACHE
#endif
-/* Common debug support */
+/* Common debug/disassembler support */
#ifdef ACPI_FULL_DEBUG
-#define ACPI_DEBUGGER
#define ACPI_DEBUG_OUTPUT
-#define ACPI_DISASSEMBLER
+#define ACPI_DEBUGGER 1
+#define ACPI_DISASSEMBLER 1
#endif
-
/*! [Begin] no source code translation */
/******************************************************************************
@@ -398,8 +399,8 @@
* ACPI_USE_STANDARD_HEADERS - Define this if linking to a C library and
* the standard header files may be used.
*
- * The ACPICA subsystem only uses low level C library functions that do not call
- * operating system services and may therefore be inlined in the code.
+ * The ACPICA subsystem only uses low level C library functions that do not
+ * call operating system services and may therefore be inlined in the code.
*
* It may be necessary to tailor these include files to the target
* generation environment.
--
2.5.0
More information about the fwts-devel
mailing list