aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2010-03-05 19:58:45 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2010-03-05 19:58:45 +0000
commit6e5c66621e4fd1bac329fef86cb2c60491b539a9 (patch)
tree0be33ec592058c38b9f9acfda3c00ed09663ccd8
parentf154176708d42f8a4778e3cf4b55e45b4a2be545 (diff)
downloadsrc-6e5c66621e4fd1bac329fef86cb2c60491b539a9.tar.gz
src-6e5c66621e4fd1bac329fef86cb2c60491b539a9.zip
Import ACPICA 20100304.vendor/acpica/20100304
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=204766 svn path=/vendor-sys/acpica/20100304/; revision=204767; tag=vendor/acpica/20100304
-rw-r--r--changes.txt53
-rw-r--r--common/dmextern.c2
-rw-r--r--common/dmtable.c3
-rw-r--r--common/dmtbdump.c14
-rw-r--r--common/dmtbinfo.c25
-rw-r--r--compiler/Makefile2
-rw-r--r--compiler/aslanalyze.c283
-rw-r--r--compiler/aslcompiler.h21
-rw-r--r--compiler/aslglobal.h1
-rw-r--r--compiler/aslmain.c2
-rw-r--r--compiler/aslmap.c317
-rw-r--r--compiler/aslpredef.c706
-rw-r--r--compiler/aslstubs.c10
-rw-r--r--compiler/asltypes.h17
-rw-r--r--dispatcher/dsfield.c2
-rw-r--r--dispatcher/dsmethod.c2
-rw-r--r--dispatcher/dsmthdat.c10
-rw-r--r--dispatcher/dsobject.c14
-rw-r--r--dispatcher/dsopcode.c12
-rw-r--r--dispatcher/dswexec.c6
-rw-r--r--dispatcher/dswstate.c10
-rw-r--r--events/evevent.c2
-rw-r--r--events/evgpe.c12
-rw-r--r--events/evgpeblk.c4
-rw-r--r--events/evmisc.c2
-rw-r--r--events/evxface.c4
-rw-r--r--executer/exconvrt.c4
-rw-r--r--executer/excreate.c4
-rw-r--r--executer/exdebug.c350
-rw-r--r--executer/exfield.c2
-rw-r--r--executer/exfldio.c16
-rw-r--r--executer/exmisc.c8
-rw-r--r--executer/exmutex.c19
-rw-r--r--executer/exnames.c4
-rw-r--r--executer/exoparg1.c16
-rw-r--r--executer/exoparg2.c10
-rw-r--r--executer/exoparg3.c4
-rw-r--r--executer/exoparg6.c4
-rw-r--r--executer/exprep.c4
-rw-r--r--executer/exregion.c4
-rw-r--r--executer/exresnte.c4
-rw-r--r--executer/exresolv.c8
-rw-r--r--executer/exresop.c8
-rw-r--r--executer/exstore.c223
-rw-r--r--executer/exsystem.c2
-rw-r--r--hardware/hwregs.c6
-rw-r--r--hardware/hwsleep.c2
-rw-r--r--hardware/hwvalid.c2
-rw-r--r--include/acdisasm.h1
-rw-r--r--include/acglobal.h5
-rw-r--r--include/acinterp.h10
-rw-r--r--include/acoutput.h2
-rw-r--r--include/acpixf.h3
-rw-r--r--include/actbl2.h30
-rw-r--r--namespace/nsaccess.c2
-rw-r--r--namespace/nsdump.c2
-rw-r--r--namespace/nsnames.c2
-rw-r--r--namespace/nssearch.c2
-rw-r--r--namespace/nsutils.c4
-rw-r--r--os_specific/service_layers/oswinxf.c81
-rw-r--r--parser/psargs.c4
-rw-r--r--parser/psloop.c3
-rw-r--r--resources/rscreate.c14
-rw-r--r--resources/rslist.c6
-rw-r--r--resources/rsmisc.c4
-rw-r--r--tables/tbfadt.c16
-rw-r--r--tables/tbutils.c4
-rw-r--r--tables/tbxfroot.c6
-rw-r--r--tools/acpiexec/Makefile1
-rw-r--r--tools/acpiexec/aehandlers.c2
-rw-r--r--tools/acpisrc/astable.c1
-rw-r--r--tools/examples/examples.c4
-rw-r--r--utilities/utalloc.c2
-rw-r--r--utilities/utdelete.c4
-rw-r--r--utilities/uteval.c2
-rw-r--r--utilities/utmisc.c6
-rw-r--r--utilities/utmutex.c4
-rw-r--r--utilities/utobject.c8
-rw-r--r--utilities/uttrack.c4
79 files changed, 1486 insertions, 993 deletions
diff --git a/changes.txt b/changes.txt
index 60620ce4f76b..5bd82ab6949a 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,4 +1,57 @@
----------------------------------------
+04 March 2010. Summary of changes for version 20100304:
+
+1) ACPI CA Core Subsystem:
+
+Fixed a possible problem with the AML Mutex handling function
+AcpiExReleaseMutex where the function could fault under the very rare
+condition when the interpreter has blocked, the interpreter lock is released,
+the interpreter is then reentered via the same thread, and attempts to
+acquire an AML mutex that was previously acquired. FreeBSD report 140979. Lin
+Ming.
+
+Implemented additional configuration support for the AML "Debug Object".
+Output from the debug object can now be enabled via a global variable,
+AcpiGbl_EnableAmlDebugObject. This will assist with remote machine debugging.
+This debug output is now available in the release version of ACPICA instead
+of just the debug version. Also, the entire debug output module can now be
+configured out of the ACPICA build if desired. One new file added,
+executer/exdebug.c. Lin Ming, Bob Moore.
+
+Added header support for the ACPI MCHI table (Management Controller Host
+Interface Table). This table was added in ACPI 4.0, but the defining document
+has only recently become available.
+
+Standardized output of integer values for ACPICA warnings/errors. Always use
+0x prefix for hex output, always use %u for unsigned integer decimal output.
+Affects ACPI_INFO, ACPI_ERROR, ACPI_EXCEPTION, and ACPI_WARNING (about 400
+invocations.) These invocations were converted from the original
+ACPI_DEBUG_PRINT invocations and were not consistent. ACPICA BZ 835.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has a
+much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 87.1K Code, 18.0K Data, 105.1K Total
+ Debug Version: 163.5K Code, 50.9K Data, 214.4K Total
+ Current Release:
+ Non-Debug Version: 87.5K Code, 18.4K Data, 105.9K Total
+ Debug Version: 163.4K Code, 51.1K Data, 214.5K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented typechecking support for static (non-control method)
+predefined named objects that are declared with the Name() operator. For
+example, the type of this object is now validated to be of type Integer:
+Name(_BBN, 1). This change migrates the compiler to using the core predefined
+name table instead of maintaining a local version. Added a new file,
+aslpredef.c. ACPICA BZ 832.
+
+Disassembler: Added support for the ACPI 4.0 MCHI table.
+
+----------------------------------------
21 January 2010. Summary of changes for version 20100121:
1) ACPI CA Core Subsystem:
diff --git a/common/dmextern.c b/common/dmextern.c
index 29b15d805e94..5afd03419884 100644
--- a/common/dmextern.c
+++ b/common/dmextern.c
@@ -374,7 +374,7 @@ AcpiDmAddToExternalList (
(NextExternal->Value != Value))
{
ACPI_ERROR ((AE_INFO,
- "Argument count mismatch for method %s %d %d",
+ "Argument count mismatch for method %s %u %u",
NextExternal->Path, NextExternal->Value, Value));
}
diff --git a/common/dmtable.c b/common/dmtable.c
index dd82016fef9e..057194d551de 100644
--- a/common/dmtable.c
+++ b/common/dmtable.c
@@ -262,6 +262,7 @@ static ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, "I/O Virtualization Reporting Structure"},
{ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, "Multiple APIC Description Table"},
{ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, "Memory Mapped Configuration table"},
+ {ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, "Management Controller Host Interface table"},
{ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, "Maximum System Characteristics Table"},
{ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, "Root System Description Table"},
{ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, "Smart Battery Specification Table"},
@@ -911,7 +912,7 @@ AcpiDmDumpTable (
default:
ACPI_ERROR ((AE_INFO,
- "**** Invalid table opcode [%X] ****\n", Info->Opcode));
+ "**** Invalid table opcode [0x%X] ****\n", Info->Opcode));
return (AE_SUPPORT);
}
}
diff --git a/common/dmtbdump.c b/common/dmtbdump.c
index 30d86708ce97..af7ee6712af6 100644
--- a/common/dmtbdump.c
+++ b/common/dmtbdump.c
@@ -363,7 +363,7 @@ AcpiDmDumpAsf (
break;
default:
- AcpiOsPrintf ("\n**** Unknown ASF sub-table type %X\n", SubTable->Header.Type);
+ AcpiOsPrintf ("\n**** Unknown ASF sub-table type 0x%X\n", SubTable->Header.Type);
return;
}
@@ -561,7 +561,7 @@ AcpiDmDumpDmar (
ScopeOffset = sizeof (ACPI_DMAR_RHSA);
break;
default:
- AcpiOsPrintf ("\n**** Unknown DMAR sub-table type %X\n\n", SubTable->Type);
+ AcpiOsPrintf ("\n**** Unknown DMAR sub-table type 0x%X\n\n", SubTable->Type);
return;
}
@@ -809,7 +809,7 @@ AcpiDmDumpHest (
default:
/* Cannot continue on unknown type - no length */
- AcpiOsPrintf ("\n**** Unknown HEST sub-table type %X\n", SubTable->Type);
+ AcpiOsPrintf ("\n**** Unknown HEST sub-table type 0x%X\n", SubTable->Type);
return;
}
@@ -916,7 +916,7 @@ AcpiDmDumpIvrs (
InfoTable = AcpiDmTableInfoIvrs1;
break;
default:
- AcpiOsPrintf ("\n**** Unknown IVRS sub-table type %X\n",
+ AcpiOsPrintf ("\n**** Unknown IVRS sub-table type 0x%X\n",
SubTable->Type);
/* Attempt to continue */
@@ -1002,7 +1002,7 @@ AcpiDmDumpIvrs (
InfoTable = AcpiDmTableInfoIvrs4;
AcpiOsPrintf (
"\n**** Unknown IVRS device entry type/length: "
- "%.2X/%X at offset %.4X: (header below)\n",
+ "0x%.2X/0x%X at offset 0x%.4X: (header below)\n",
EntryType, EntryLength, EntryOffset);
break;
}
@@ -1110,7 +1110,7 @@ AcpiDmDumpMadt (
InfoTable = AcpiDmTableInfoMadt10;
break;
default:
- AcpiOsPrintf ("\n**** Unknown MADT sub-table type %X\n\n", SubTable->Type);
+ AcpiOsPrintf ("\n**** Unknown MADT sub-table type 0x%X\n\n", SubTable->Type);
/* Attempt to continue */
@@ -1378,7 +1378,7 @@ AcpiDmDumpSrat (
InfoTable = AcpiDmTableInfoSrat2;
break;
default:
- AcpiOsPrintf ("\n**** Unknown SRAT sub-table type %X\n", SubTable->Type);
+ AcpiOsPrintf ("\n**** Unknown SRAT sub-table type 0x%X\n", SubTable->Type);
/* Attempt to continue */
diff --git a/common/dmtbinfo.c b/common/dmtbinfo.c
index 805c81f65347..5c7ecb8e26dd 100644
--- a/common/dmtbinfo.c
+++ b/common/dmtbinfo.c
@@ -142,6 +142,7 @@
#define ACPI_IVRS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_IVRS,f)
#define ACPI_MADT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MADT,f)
#define ACPI_MCFG_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
+#define ACPI_MCHI_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCHI,f)
#define ACPI_MSCT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MSCT,f)
#define ACPI_SBST_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SBST,f)
#define ACPI_SLIT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
@@ -1226,6 +1227,30 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[] =
/*******************************************************************************
*
+ * MCHI - Management Controller Host Interface table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[] =
+{
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (InterfaceType), "Interface Type"},
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (Protocol), "Protocol"},
+ {ACPI_DMT_UINT64, ACPI_MCHI_OFFSET (ProtocolData), "Protocol Data"},
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (InterruptType), "Interrupt Type"},
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (Gpe), "Gpe"},
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciDeviceFlag), "Pci Device Flag"},
+ {ACPI_DMT_UINT32, ACPI_MCHI_OFFSET (GlobalInterrupt), "Global Interrupt"},
+ {ACPI_DMT_GAS, ACPI_MCHI_OFFSET (ControlRegister), "Control Register"},
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciSegment), "Pci Segment"},
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciBus), "Pci Bus"},
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciDevice), "Pci Device"},
+ {ACPI_DMT_UINT8, ACPI_MCHI_OFFSET (PciFunction), "Pci Function"},
+ {ACPI_DMT_EXIT, 0, NULL}
+};
+
+
+/*******************************************************************************
+ *
* MSCT - Maximum System Characteristics Table (ACPI 4.0)
*
******************************************************************************/
diff --git a/compiler/Makefile b/compiler/Makefile
index 597d1ffcbebe..b4c03fd06279 100644
--- a/compiler/Makefile
+++ b/compiler/Makefile
@@ -4,7 +4,7 @@ PROG= iasl
SRCS= aslcompilerparse.c aslcompilerlex.c aslanalyze.c aslcodegen.c \
aslcompile.c aslerror.c aslfiles.c asllength.c \
asllisting.c aslload.c asllookup.c aslmain.c aslmap.c aslopcodes.c \
- asloperands.c aslresource.c aslrestype1.c aslrestype2.c aslstartup.c \
+ asloperands.c aslpredef.c aslresource.c aslrestype1.c aslrestype2.c aslstartup.c \
asltree.c aslutils.c asltransform.c aslfold.c aslstubs.c aslopt.c \
../common/getopt.c \
../utilities/utalloc.c \
diff --git a/compiler/aslanalyze.c b/compiler/aslanalyze.c
index 4cbfcd6e0681..eaefd3fdf7f9 100644
--- a/compiler/aslanalyze.c
+++ b/compiler/aslanalyze.c
@@ -143,16 +143,6 @@ AnGetBtype (
ACPI_PARSE_OBJECT *Op);
static UINT32
-AnCheckForReservedName (
- ACPI_PARSE_OBJECT *Op,
- char *Name);
-
-static void
-AnCheckForReservedMethod (
- ACPI_PARSE_OBJECT *Op,
- ASL_METHOD_INFO *MethodInfo);
-
-static UINT32
AnMapObjTypeToBtype (
ACPI_PARSE_OBJECT *Op);
@@ -598,219 +588,6 @@ AnGetBtype (
/*******************************************************************************
*
- * FUNCTION: AnCheckForReservedName
- *
- * PARAMETERS: Op - A parse node
- * Name - NameSeg to check
- *
- * RETURN: None
- *
- * DESCRIPTION: Check a NameSeg against the reserved list.
- *
- ******************************************************************************/
-
-static UINT32
-AnCheckForReservedName (
- ACPI_PARSE_OBJECT *Op,
- char *Name)
-{
- UINT32 i;
-
-
- if (Name[0] == 0)
- {
- AcpiOsPrintf ("Found a null name, external = %s\n",
- Op->Asl.ExternalName);
- }
-
- /* All reserved names are prefixed with a single underscore */
-
- if (Name[0] != '_')
- {
- return (ACPI_NOT_RESERVED_NAME);
- }
-
- /* Check for a standard reserved method name */
-
- for (i = 0; ReservedMethods[i].Name; i++)
- {
- if (ACPI_COMPARE_NAME (Name, ReservedMethods[i].Name))
- {
- if (ReservedMethods[i].Flags & ASL_RSVD_SCOPE)
- {
- AslError (ASL_ERROR, ASL_MSG_RESERVED_WORD, Op,
- Op->Asl.ExternalName);
- return (ACPI_PREDEFINED_NAME);
- }
- else if (ReservedMethods[i].Flags & ASL_RSVD_RESOURCE_NAME)
- {
- AslError (ASL_ERROR, ASL_MSG_RESERVED_WORD, Op,
- Op->Asl.ExternalName);
- return (ACPI_PREDEFINED_NAME);
- }
-
- /* Return index into reserved array */
-
- return i;
- }
- }
-
- /*
- * Now check for the "special" reserved names --
- * GPE: _Lxx
- * GPE: _Exx
- * EC: _Qxx
- */
- if ((Name[1] == 'L') ||
- (Name[1] == 'E') ||
- (Name[1] == 'Q'))
- {
- /* The next two characters must be hex digits */
-
- if ((isxdigit ((int) Name[2])) &&
- (isxdigit ((int) Name[3])))
- {
- return (ACPI_EVENT_RESERVED_NAME);
- }
- }
-
-
- /* Check for the names reserved for the compiler itself: _T_x */
-
- else if ((Op->Asl.ExternalName[1] == 'T') &&
- (Op->Asl.ExternalName[2] == '_'))
- {
- /* Ignore if actually emitted by the compiler */
-
- if (Op->Asl.CompileFlags & NODE_COMPILER_EMITTED)
- {
- return (ACPI_NOT_RESERVED_NAME);
- }
-
- /*
- * Was not actually emitted by the compiler. This is a special case,
- * however. If the ASL code being compiled was the result of a
- * dissasembly, it may possibly contain valid compiler-emitted names
- * of the form "_T_x". We don't want to issue an error or even a
- * warning and force the user to manually change the names. So, we
- * will issue a remark instead.
- */
- AslError (ASL_REMARK, ASL_MSG_COMPILER_RESERVED, Op, Op->Asl.ExternalName);
- return (ACPI_COMPILER_RESERVED_NAME);
- }
-
- /*
- * The name didn't match any of the known reserved names. Flag it as a
- * warning, since the entire namespace starting with an underscore is
- * reserved by the ACPI spec.
- */
- AslError (ASL_WARNING, ASL_MSG_UNKNOWN_RESERVED_NAME, Op,
- Op->Asl.ExternalName);
-
- return (ACPI_NOT_RESERVED_NAME);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AnCheckForReservedMethod
- *
- * PARAMETERS: Op - A parse node of type "METHOD".
- * MethodInfo - Saved info about this method
- *
- * RETURN: None
- *
- * DESCRIPTION: If method is a reserved name, check that the number of arguments
- * and the return type (returns a value or not) is correct.
- *
- ******************************************************************************/
-
-static void
-AnCheckForReservedMethod (
- ACPI_PARSE_OBJECT *Op,
- ASL_METHOD_INFO *MethodInfo)
-{
- UINT32 Index;
- UINT32 RequiredArgsCurrent;
- UINT32 RequiredArgsOld;
-
-
- /* Check for a match against the reserved name list */
-
- Index = AnCheckForReservedName (Op, Op->Asl.NameSeg);
-
- switch (Index)
- {
- case ACPI_NOT_RESERVED_NAME:
- case ACPI_PREDEFINED_NAME:
- case ACPI_COMPILER_RESERVED_NAME:
-
- /* Just return, nothing to do */
- break;
-
-
- case ACPI_EVENT_RESERVED_NAME:
-
- Gbl_ReservedMethods++;
-
- /* NumArguments must be zero for all _Lxx, _Exx, and _Qxx methods */
-
- if (MethodInfo->NumArguments != 0)
- {
- sprintf (MsgBuffer, "%s requires %d",
- Op->Asl.ExternalName, 0);
-
- AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op, MsgBuffer);
- }
- break;
-
-
- default:
-
- Gbl_ReservedMethods++;
-
- /*
- * Matched a reserved method name
- *
- * Validate the ASL-defined argument count. Allow two different legal
- * arg counts.
- */
- RequiredArgsCurrent = ReservedMethods[Index].NumArguments & 0x0F;
- RequiredArgsOld = ReservedMethods[Index].NumArguments >> 4;
-
- if ((MethodInfo->NumArguments != RequiredArgsCurrent) &&
- (MethodInfo->NumArguments != RequiredArgsOld))
- {
- sprintf (MsgBuffer, "%s requires %d",
- ReservedMethods[Index].Name,
- RequiredArgsCurrent);
-
- if (MethodInfo->NumArguments > RequiredArgsCurrent)
- {
- AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
- MsgBuffer);
- }
- else
- {
- AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_LO, Op,
- MsgBuffer);
- }
- }
-
- if (MethodInfo->NumReturnNoValue &&
- ReservedMethods[Index].Flags & ASL_RSVD_RETURN_VALUE)
- {
- sprintf (MsgBuffer, "%s", ReservedMethods[Index].Name);
-
- AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op, MsgBuffer);
- }
- break;
- }
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AnMapObjTypeToBtype
*
* PARAMETERS: Op - A parse node
@@ -1187,7 +964,7 @@ AnMethodAnalysisWalkBegin (
* The first operand is a name to be created in the namespace.
* Check against the reserved list.
*/
- i = AnCheckForReservedName (Op, Op->Asl.NameSeg);
+ i = ApCheckForPredefinedName (Op, Op->Asl.NameSeg);
if (i < ACPI_VALID_RESERVED_NAME_MAX)
{
AslError (ASL_ERROR, ASL_MSG_RESERVED_USE, Op, Op->Asl.ExternalName);
@@ -1197,51 +974,29 @@ AnMethodAnalysisWalkBegin (
case PARSEOP_NAME:
- i = AnCheckForReservedName (Op, Op->Asl.NameSeg);
- if (i < ACPI_VALID_RESERVED_NAME_MAX)
+ /* Typecheck any predefined names statically defined with Name() */
+
+ ApCheckForPredefinedObject (Op, Op->Asl.NameSeg);
+
+ /* Special typechecking for _HID */
+
+ if (!ACPI_STRCMP (METHOD_NAME__HID, Op->Asl.NameSeg))
{
- if (ReservedMethods[i].NumArguments > 0)
+ Next = Op->Asl.Child->Asl.Next;
+ if (Next->Asl.ParseOpcode == PARSEOP_STRING_LITERAL)
{
/*
- * This reserved name must be a control method because
- * it must have arguments
+ * _HID is a string, all characters must be alphanumeric.
+ * One of the things we want to catch here is the use of
+ * a leading asterisk in the string.
*/
- AslError (ASL_ERROR, ASL_MSG_RESERVED_METHOD, Op,
- "with arguments");
- }
-
- /* Typechecking for _HID */
-
- else if (!ACPI_STRCMP (METHOD_NAME__HID, ReservedMethods[i].Name))
- {
- /* Examine the second operand to typecheck it */
-
- Next = Op->Asl.Child->Asl.Next;
-
- if ((Next->Asl.ParseOpcode != PARSEOP_INTEGER) &&
- (Next->Asl.ParseOpcode != PARSEOP_STRING_LITERAL))
- {
- /* _HID must be a string or an integer */
-
- AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Next,
- "String or Integer");
- }
-
- if (Next->Asl.ParseOpcode == PARSEOP_STRING_LITERAL)
+ for (i = 0; Next->Asl.Value.String[i]; i++)
{
- /*
- * _HID is a string, all characters must be alphanumeric.
- * One of the things we want to catch here is the use of
- * a leading asterisk in the string.
- */
- for (i = 0; Next->Asl.Value.String[i]; i++)
+ if (!isalnum ((int) Next->Asl.Value.String[i]))
{
- if (!isalnum ((int) Next->Asl.Value.String[i]))
- {
- AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING,
- Next, Next->Asl.Value.String);
- break;
- }
+ AslError (ASL_ERROR, ASL_MSG_ALPHANUMERIC_STRING,
+ Next, Next->Asl.Value.String);
+ break;
}
}
}
@@ -1394,7 +1149,7 @@ AnMethodAnalysisWalkEnd (
* Check predefined method names for correct return behavior
* and correct number of arguments
*/
- AnCheckForReservedMethod (Op, MethodInfo);
+ ApCheckForPredefinedMethod (Op, MethodInfo);
ACPI_FREE (MethodInfo);
break;
diff --git a/compiler/aslcompiler.h b/compiler/aslcompiler.h
index 76bf51a8b95d..cf6c8f3ce018 100644
--- a/compiler/aslcompiler.h
+++ b/compiler/aslcompiler.h
@@ -452,8 +452,27 @@ ACPI_OBJECT_TYPE
AslMapNamedOpcodeToDataType (
UINT16 Opcode);
+
+/*
+ * aslpredef - ACPI predefined names support
+ */
+void
+ApCheckForPredefinedMethod (
+ ACPI_PARSE_OBJECT *Op,
+ ASL_METHOD_INFO *MethodInfo);
+
+UINT32
+ApCheckForPredefinedName (
+ ACPI_PARSE_OBJECT *Op,
+ char *Name);
+
+void
+ApCheckForPredefinedObject (
+ ACPI_PARSE_OBJECT *Op,
+ char *Name);
+
void
-MpDisplayReservedNames (
+ApDisplayReservedNames (
void);
diff --git a/compiler/aslglobal.h b/compiler/aslglobal.h
index 69fcf8438a1e..01ab931e0d0d 100644
--- a/compiler/aslglobal.h
+++ b/compiler/aslglobal.h
@@ -261,7 +261,6 @@ ASL_EXTERN FILE *AcpiGbl_DebugFile; /* Placeholder for oswin
ASL_EXTERN ASL_ANALYSIS_WALK_INFO AnalysisWalkInfo;
ASL_EXTERN ACPI_TABLE_HEADER TableHeader;
-extern const ASL_RESERVED_INFO ReservedMethods[];
/* Event timing */
diff --git a/compiler/aslmain.c b/compiler/aslmain.c
index 45d7252c0a2f..59b5880e76da 100644
--- a/compiler/aslmain.c
+++ b/compiler/aslmain.c
@@ -570,7 +570,7 @@ AslDoOptions (
case 'r':
/* reserved names */
- MpDisplayReservedNames ();
+ ApDisplayReservedNames ();
exit (0);
default:
diff --git a/compiler/aslmap.c b/compiler/aslmap.c
index 6b3019a72680..9eb3843529e6 100644
--- a/compiler/aslmap.c
+++ b/compiler/aslmap.c
@@ -114,7 +114,6 @@
*
*****************************************************************************/
-
#include "aslcompiler.h"
#include "amlcode.h"
#include "acparser.h"
@@ -171,322 +170,6 @@ AslMapNamedOpcodeToDataType (
/*******************************************************************************
*
- * FUNCTION: MpDisplayReservedNames
- *
- * PARAMETERS: None
- *
- * RETURN: None
- *
- * DESCRIPTION: Print the table above
- *
- ******************************************************************************/
-
-void
-MpDisplayReservedNames (
- void)
-{
- UINT32 i;
-
- printf ("Reserved name information\n\n");
-
- for (i = 0; ReservedMethods[i].Name; i++)
- {
- printf ("%s ", ReservedMethods[i].Name);
-
- if (ReservedMethods[i].Flags & ASL_RSVD_SCOPE)
- {
- printf ("Reserved scope name\n");
- }
- else if (ReservedMethods[i].Flags & ASL_RSVD_RESOURCE_NAME)
- {
- printf ("Resource data type reserved field name\n");
- }
- else
- {
- printf ("Method with %d arguments, ",
- ReservedMethods[i].NumArguments & 0x0F);
-
- if (ReservedMethods[i].Flags & ASL_RSVD_RETURN_VALUE)
- {
- printf ("must return a value\n");
- }
- else
- {
- printf ("no return value\n");
- }
- }
- }
-}
-
-
-/*******************************************************************************
- *
- * DATA STRUCTURE: ReservedMethods
- *
- * DESCRIPTION: Contains all reserved methods and names as defined in the
- * ACPI specification. Used during the analysis phase to
- * ensure that reserved methods have the required number of
- * arguments and the proper return type.
- *
- * Each entry in the table contains the following items:
- *
- * Name - The ACPI reserved name
- * Args - Number of arguments to the method
- * Flags - Whether this method must return a value or not. Or if the
- * name is a resource descriptor label.
- *
- ******************************************************************************/
-
-const ASL_RESERVED_INFO ReservedMethods[] = {
- {"_AC0", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC1", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC2", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC3", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC4", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC5", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC6", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC7", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC8", 0, ASL_RSVD_RETURN_VALUE},
- {"_AC9", 0, ASL_RSVD_RETURN_VALUE},
- {"_ADR", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL0", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL1", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL2", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL3", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL4", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL5", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL6", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL7", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL8", 0, ASL_RSVD_RETURN_VALUE},
- {"_AL9", 0, ASL_RSVD_RETURN_VALUE},
- {"_ALC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_ALI", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_ALN", 0, ASL_RSVD_RESOURCE_NAME},
- {"_ALP", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_ALR", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_ALT", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_ART", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_ASI", 0, ASL_RSVD_RESOURCE_NAME},
- {"_ASZ", 0, ASL_RSVD_RESOURCE_NAME},
- {"_BAS", 0, ASL_RSVD_RESOURCE_NAME},
- {"_BBN", 0, ASL_RSVD_RETURN_VALUE},
- {"_BCL", 0, ASL_RSVD_RETURN_VALUE},
- {"_BCM", 1, 0},
- {"_BCT", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_BDN", 0, ASL_RSVD_RETURN_VALUE},
- {"_BFS", 1, 0},
- {"_BIF", 0, ASL_RSVD_RETURN_VALUE},
- {"_BIX", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_BLT", 3, 0}, /* Acpi 3.0 */
- {"_BM_", 0, ASL_RSVD_RESOURCE_NAME},
- {"_BMA", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_BMC", 1, 0}, /* Acpi 3.0 */
- {"_BMD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_BMS", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_BQC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_BST", 0, ASL_RSVD_RETURN_VALUE},
- {"_BTM", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_BTP", 1, 0},
- {"_CBA", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_CDM", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_CID", 0, ASL_RSVD_RETURN_VALUE},
- {"_CRS", 0, ASL_RSVD_RETURN_VALUE},
- {"_CRT", 0, ASL_RSVD_RETURN_VALUE},
- {"_CSD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_CST", 0, ASL_RSVD_RETURN_VALUE},
- {"_DCK", 1, ASL_RSVD_RETURN_VALUE},
- {"_DCS", 0, ASL_RSVD_RETURN_VALUE},
- {"_DDC", 1, ASL_RSVD_RETURN_VALUE},
- {"_DDN", 0, 0},
- {"_DEC", 0, ASL_RSVD_RESOURCE_NAME},
- {"_DGS", 0, ASL_RSVD_RETURN_VALUE},
- {"_DIS", 0, 0},
- {"_DMA", 0, ASL_RSVD_RETURN_VALUE},
- {"_DOD", 0, ASL_RSVD_RETURN_VALUE},
- {"_DOS", 1, 0},
- {"_DSM", 4, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_DSS", 1, 0},
- {"_DSW", 3, 0}, /* Acpi 3.0 */
- {"_DTI", 1, 0}, /* Acpi 4.0 */
- {"_EC_", 0, ASL_RSVD_RETURN_VALUE},
- {"_EDL", 0, ASL_RSVD_RETURN_VALUE},
- {"_EJ0", 1, 0},
- {"_EJ1", 1, 0},
- {"_EJ2", 1, 0},
- {"_EJ3", 1, 0},
- {"_EJ4", 1, 0},
- {"_EJD", 0, ASL_RSVD_RETURN_VALUE},
- {"_ERR", 3, ASL_RSVD_RETURN_VALUE},
- {"_FDE", 0, ASL_RSVD_RETURN_VALUE},
- {"_FDI", 0, ASL_RSVD_RETURN_VALUE},
- {"_FDM", 1, 0},
- {"_FIF", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_FIX", 0, ASL_RSVD_RETURN_VALUE},
- {"_FPS", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_FSL", 1, 0}, /* Acpi 4.0 */
- {"_FST", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_GAI", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_GHL", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_GL_", 0, ASL_RSVD_RETURN_VALUE},
- {"_GLK", 0, ASL_RSVD_RETURN_VALUE},
- {"_GPD", 0, ASL_RSVD_RETURN_VALUE},
- {"_GPE", 0, ASL_RSVD_RETURN_VALUE},
- {"_GRA", 0, ASL_RSVD_RESOURCE_NAME},
- {"_GSB", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_GTF", 0, ASL_RSVD_RETURN_VALUE},
- {"_GTM", 0, ASL_RSVD_RETURN_VALUE},
- {"_GTS", 1, 0},
- {"_HE_", 0, ASL_RSVD_RESOURCE_NAME},
- {"_HID", 0, ASL_RSVD_RETURN_VALUE},
- {"_HOT", 0, ASL_RSVD_RETURN_VALUE},
- {"_HPP", 0, ASL_RSVD_RETURN_VALUE},
- {"_HPX", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_IFT", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_INI", 0, 0},
- {"_INT", 0, ASL_RSVD_RESOURCE_NAME},
- {"_IRC", 0, 0},
- {"_LCK", 1, 0},
- {"_LEN", 0, ASL_RSVD_RESOURCE_NAME},
- {"_LID", 0, ASL_RSVD_RETURN_VALUE},
- {"_LL_", 0, ASL_RSVD_RESOURCE_NAME},
- {"_MAF", 0, ASL_RSVD_RESOURCE_NAME},
- {"_MAT", 0, ASL_RSVD_RETURN_VALUE},
- {"_MAX", 0, ASL_RSVD_RESOURCE_NAME},
- {"_MBM", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_MEM", 0, ASL_RSVD_RESOURCE_NAME},
- {"_MIF", 0, ASL_RSVD_RESOURCE_NAME},
- {"_MIN", 0, ASL_RSVD_RESOURCE_NAME},
- {"_MLS", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_MSG", 1, 0},
- {"_MSM", 4, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_MTP", 0, ASL_RSVD_RESOURCE_NAME},
- {"_NTT", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_OFF", 0, 0},
- {"_ON_", 0, 0},
- {"_OS_", 0, ASL_RSVD_RETURN_VALUE},
- {"_OSC", 4, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_OSI", 1, ASL_RSVD_RETURN_VALUE},
- {"_OST", 3, 0}, /* Acpi 3.0 */
- {"_PAI", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PCL", 0, ASL_RSVD_RETURN_VALUE},
- {"_PCT", 0, ASL_RSVD_RETURN_VALUE},
- {"_PDC", 1, 0},
- {"_PDL", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PIC", 1, 0},
- {"_PIF", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PLD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_PMC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PMD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PMM", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PPC", 0, ASL_RSVD_RETURN_VALUE},
- {"_PPE", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_PR0", 0, ASL_RSVD_RETURN_VALUE},
- {"_PR1", 0, ASL_RSVD_RETURN_VALUE},
- {"_PR2", 0, ASL_RSVD_RETURN_VALUE},
- {"_PR3", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PRL", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PRS", 0, ASL_RSVD_RETURN_VALUE},
- {"_PRT", 0, ASL_RSVD_RETURN_VALUE},
- {"_PRW", 0, ASL_RSVD_RETURN_VALUE},
- {"_PS0", 0, 0},
- {"_PS1", 0, 0},
- {"_PS2", 0, 0},
- {"_PS3", 0, 0},
- {"_PSC", 0, ASL_RSVD_RETURN_VALUE},
- {"_PSD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_PSL", 0, ASL_RSVD_RETURN_VALUE},
- {"_PSR", 0, ASL_RSVD_RETURN_VALUE},
- {"_PSS", 0, ASL_RSVD_RETURN_VALUE},
- {"_PSV", 0, ASL_RSVD_RETURN_VALUE},
- {"_PSW", 1, 0},
- {"_PTC", 0, ASL_RSVD_RETURN_VALUE},
- {"_PTP", 2, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PTS", 1, 0},
- {"_PUR", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_PXM", 0, ASL_RSVD_RETURN_VALUE},
- {"_RBO", 0, ASL_RSVD_RESOURCE_NAME},
- {"_RBW", 0, ASL_RSVD_RESOURCE_NAME},
- {"_REG", 2, 0},
- {"_REV", 0, ASL_RSVD_RETURN_VALUE},
- {"_RMV", 0, ASL_RSVD_RETURN_VALUE},
- {"_RNG", 0, ASL_RSVD_RESOURCE_NAME},
- {"_ROM", 2, ASL_RSVD_RETURN_VALUE},
- {"_RT_", 0, ASL_RSVD_RESOURCE_NAME}, /* Acpi 3.0 */
- {"_RTV", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_RW_", 0, ASL_RSVD_RESOURCE_NAME},
- {"_S0_", 0, ASL_RSVD_RETURN_VALUE},
- {"_S1_", 0, ASL_RSVD_RETURN_VALUE},
- {"_S2_", 0, ASL_RSVD_RETURN_VALUE},
- {"_S3_", 0, ASL_RSVD_RETURN_VALUE},
- {"_S4_", 0, ASL_RSVD_RETURN_VALUE},
- {"_S5_", 0, ASL_RSVD_RETURN_VALUE},
- {"_S1D", 0, ASL_RSVD_RETURN_VALUE},
- {"_S2D", 0, ASL_RSVD_RETURN_VALUE},
- {"_S3D", 0, ASL_RSVD_RETURN_VALUE},
- {"_S4D", 0, ASL_RSVD_RETURN_VALUE},
- {"_S0W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_S1W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_S2W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_S3W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_S4W", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_SB_", 0, ASL_RSVD_SCOPE},
- {"_SBS", 0, ASL_RSVD_RETURN_VALUE},
- {"_SCP", 0x13, 0}, /* Acpi 1.0 - one arg; Acpi 3.0 - three args */
- {"_SDD", 1, 0}, /* Acpi 3.0 */
- {"_SEG", 0, ASL_RSVD_RETURN_VALUE},
- {"_SHL", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_SHR", 0, ASL_RSVD_RESOURCE_NAME},
- {"_SI_", 0, ASL_RSVD_SCOPE},
- {"_SIZ", 0, ASL_RSVD_RESOURCE_NAME},
- {"_SLI", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_SPD", 1, ASL_RSVD_RETURN_VALUE},
- {"_SRS", 1, 0},
- {"_SRV", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_SST", 1, 0},
- {"_STA", 0, ASL_RSVD_RETURN_VALUE},
- {"_STM", 3, 0},
- {"_STP", 2, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_STR", 0, ASL_RSVD_RETURN_VALUE},
- {"_STV", 2, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_SUN", 0, ASL_RSVD_RETURN_VALUE},
- {"_SWS", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_TC1", 0, ASL_RSVD_RETURN_VALUE},
- {"_TC2", 0, ASL_RSVD_RETURN_VALUE},
- {"_TDL", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0b */
- {"_TIP", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_TIV", 1, ASL_RSVD_RETURN_VALUE}, /* Acpi 4.0 */
- {"_TMP", 0, ASL_RSVD_RETURN_VALUE},
- {"_TPC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_TPT", 1, 0}, /* Acpi 3.0 */
- {"_TRA", 0, ASL_RSVD_RESOURCE_NAME},
- {"_TRS", 0, ASL_RSVD_RESOURCE_NAME},
- {"_TRT", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_TSD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_TSF", 0, ASL_RSVD_RESOURCE_NAME}, /* Acpi 3.0 */
- {"_TSP", 0, ASL_RSVD_RETURN_VALUE},
- {"_TSS", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_TST", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_TTP", 0, ASL_RSVD_RESOURCE_NAME},
- {"_TTS", 1, 0}, /* Acpi 3.0 */
- {"_TYP", 0, ASL_RSVD_RESOURCE_NAME},
- {"_TZ_", 0, ASL_RSVD_SCOPE},
- {"_TZD", 0, ASL_RSVD_RETURN_VALUE},
- {"_TZM", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_TZP", 0, ASL_RSVD_RETURN_VALUE},
- {"_UID", 0, ASL_RSVD_RETURN_VALUE},
- {"_UPC", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_UPD", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_UPP", 0, ASL_RSVD_RETURN_VALUE}, /* Acpi 3.0 */
- {"_VPO", 0, ASL_RSVD_RETURN_VALUE},
- {"_WAK", 1, ASL_RSVD_RETURN_VALUE},
- {"_WDG", 0, ASL_RSVD_RETURN_VALUE}, /* MS Extension */
- {"_WED", 1, ASL_RSVD_RETURN_VALUE}, /* MS Extension */
- {NULL, 0, 0},
-};
-
-
-/*******************************************************************************
- *
* DATA STRUCTURE: AslKeywordMapping
*
* DESCRIPTION: Maps the ParseOpcode to the actual AML opcode. The parse
diff --git a/compiler/aslpredef.c b/compiler/aslpredef.c
new file mode 100644
index 000000000000..04cd2d405c14
--- /dev/null
+++ b/compiler/aslpredef.c
@@ -0,0 +1,706 @@
+/******************************************************************************
+ *
+ * Module Name: aslpredef - support for ACPI predefined names
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#define ACPI_CREATE_PREDEFINED_TABLE
+
+#include "aslcompiler.h"
+#include "aslcompiler.y.h"
+#include "amlcode.h"
+#include "acparser.h"
+#include "acpredef.h"
+
+
+#define _COMPONENT ACPI_COMPILER
+ ACPI_MODULE_NAME ("aslpredef")
+
+
+/* Local prototypes */
+
+static UINT32
+ApCheckForSpecialName (
+ ACPI_PARSE_OBJECT *Op,
+ char *Name);
+
+static void
+ApCheckObjectType (
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 ExpectedBtypes);
+
+static void
+ApGetExpectedTypes (
+ char *Buffer,
+ UINT32 ExpectedBtypes);
+
+
+/*
+ * Names for the types that can be returned by the predefined objects.
+ * Used for warning messages. Must be in the same order as the ACPI_RTYPEs
+ */
+static const char *AcpiRtypeNames[] =
+{
+ "/Integer",
+ "/String",
+ "/Buffer",
+ "/Package",
+ "/Reference",
+};
+
+/*
+ * Predefined names for use in Resource Descriptors. These names do not
+ * appear in the global Predefined Name table (since these names never
+ * appear in actual AML byte code, only in the original ASL)
+ */
+static const ACPI_PREDEFINED_INFO ResourceNames[] = {
+ {{"_ALN", 0, 0}},
+ {{"_ASI", 0, 0}},
+ {{"_ASZ", 0, 0}},
+ {{"_ATT", 0, 0}},
+ {{"_BAS", 0, 0}},
+ {{"_BM_", 0, 0}},
+ {{"_DEC", 0, 0}},
+ {{"_GRA", 0, 0}},
+ {{"_HE_", 0, 0}},
+ {{"_INT", 0, 0}},
+ {{"_LEN", 0, 0}},
+ {{"_LL_", 0, 0}},
+ {{"_MAF", 0, 0}},
+ {{"_MAX", 0, 0}},
+ {{"_MEM", 0, 0}},
+ {{"_MIF", 0, 0}},
+ {{"_MIN", 0, 0}},
+ {{"_MTP", 0, 0}},
+ {{"_RBO", 0, 0}},
+ {{"_RBW", 0, 0}},
+ {{"_RNG", 0, 0}},
+ {{"_RT_", 0, 0}}, /* Acpi 3.0 */
+ {{"_RW_", 0, 0}},
+ {{"_SHR", 0, 0}},
+ {{"_SIZ", 0, 0}},
+ {{"_TRA", 0, 0}},
+ {{"_TRS", 0, 0}},
+ {{"_TSF", 0, 0}}, /* Acpi 3.0 */
+ {{"_TTP", 0, 0}},
+ {{"_TYP", 0, 0}},
+ {{{0,0,0,0}, 0, 0}} /* Table terminator */
+};
+
+static const ACPI_PREDEFINED_INFO ScopeNames[] = {
+ {{"_SB_", 0, 0}},
+ {{"_SI_", 0, 0}},
+ {{"_TZ_", 0, 0}},
+ {{{0,0,0,0}, 0, 0}} /* Table terminator */
+};
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: ApCheckForPredefinedMethod
+ *
+ * PARAMETERS: Op - A parse node of type "METHOD".
+ * MethodInfo - Saved info about this method
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: If method is a predefined name, check that the number of
+ * arguments and the return type (returns a value or not)
+ * is correct.
+ *
+ ******************************************************************************/
+
+void
+ApCheckForPredefinedMethod (
+ ACPI_PARSE_OBJECT *Op,
+ ASL_METHOD_INFO *MethodInfo)
+{
+ UINT32 Index;
+ UINT32 RequiredArgsCurrent;
+ UINT32 RequiredArgsOld;
+
+
+ /* Check for a match against the predefined name list */
+
+ Index = ApCheckForPredefinedName (Op, Op->Asl.NameSeg);
+
+ switch (Index)
+ {
+ case ACPI_NOT_RESERVED_NAME: /* No underscore or _Txx or _xxx name not matched */
+ case ACPI_PREDEFINED_NAME: /* Resource Name or reserved scope name */
+ case ACPI_COMPILER_RESERVED_NAME: /* A _Txx that was not emitted by compiler */
+
+ /* Just return, nothing to do */
+ break;
+
+
+ case ACPI_EVENT_RESERVED_NAME: /* _Lxx, _Exx, and _Qxx methods */
+
+ Gbl_ReservedMethods++;
+
+ /* NumArguments must be zero for all _Lxx, _Exx, and _Qxx methods */
+
+ if (MethodInfo->NumArguments != 0)
+ {
+ sprintf (MsgBuffer, "%s requires %d", Op->Asl.ExternalName, 0);
+
+ AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
+ MsgBuffer);
+ }
+ break;
+
+
+ default:
+ /*
+ * Matched a predefined method name
+ *
+ * Validate the ASL-defined argument count. Allow two different legal
+ * arg counts.
+ */
+ Gbl_ReservedMethods++;
+
+ RequiredArgsCurrent = PredefinedNames[Index].Info.ParamCount & 0x0F;
+ RequiredArgsOld = PredefinedNames[Index].Info.ParamCount >> 4;
+
+ if ((MethodInfo->NumArguments != RequiredArgsCurrent) &&
+ (MethodInfo->NumArguments != RequiredArgsOld))
+ {
+ sprintf (MsgBuffer, "%4.4s requires %d",
+ PredefinedNames[Index].Info.Name, RequiredArgsCurrent);
+
+ if (MethodInfo->NumArguments > RequiredArgsCurrent)
+ {
+ AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
+ MsgBuffer);
+ }
+ else
+ {
+ AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_LO, Op,
+ MsgBuffer);
+ }
+ }
+
+ /*
+ * Check if method returns no value, but the predefined name is
+ * required to return a value
+ */
+ if (MethodInfo->NumReturnNoValue &&
+ PredefinedNames[Index].Info.ExpectedBtypes)
+ {
+ sprintf (MsgBuffer, "%4.4s", PredefinedNames[Index].Info.Name);
+
+ AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op,
+ MsgBuffer);
+ }
+ break;
+ }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: ApCheckForPredefinedObject
+ *
+ * PARAMETERS: Op - A parse node
+ * Name - The ACPI name to be checked
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Check for a predefined name for a static object (created via
+ * the ASL Name operator). If it is a predefined ACPI name, ensure
+ * that the name does not require any arguments (which would
+ * require a control method implemenation of the name), and that
+ * the type of the object is one of the expected types for the
+ * predefined name.
+ *
+ ******************************************************************************/
+
+void
+ApCheckForPredefinedObject (
+ ACPI_PARSE_OBJECT *Op,
+ char *Name)
+{
+ UINT32 Index;
+
+
+ /*
+ * Check for a real predefined name -- not a resource descriptor name
+ * or a predefined scope name
+ */
+ Index = ApCheckForPredefinedName (Op, Name);
+ if (Index > ACPI_VALID_RESERVED_NAME_MAX)
+ {
+ return;
+ }
+
+ /*
+ * We found a matching predefind name.
+ * Check if this predefined name requires input arguments
+ */
+ if (PredefinedNames[Index].Info.ParamCount > 0)
+ {
+ /*
+ * This predefined name must always be defined as a control
+ * method because it is required to have input arguments.
+ */
+ AslError (ASL_ERROR, ASL_MSG_RESERVED_METHOD, Op,
+ "with arguments");
+ }
+
+ /* Typecheck the actual object, it is the next argument */
+
+ ApCheckObjectType (Op->Asl.Child->Asl.Next,
+ PredefinedNames[Index].Info.ExpectedBtypes);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: ApCheckForPredefinedName
+ *
+ * PARAMETERS: Op - A parse node
+ * Name - NameSeg to check
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Check a NameSeg against the reserved list.
+ *
+ ******************************************************************************/
+
+UINT32
+ApCheckForPredefinedName (
+ ACPI_PARSE_OBJECT *Op,
+ char *Name)
+{
+ UINT32 i;
+
+
+ if (Name[0] == 0)
+ {
+ AcpiOsPrintf ("Found a null name, external = %s\n",
+ Op->Asl.ExternalName);
+ }
+
+ /* All reserved names are prefixed with a single underscore */
+
+ if (Name[0] != '_')
+ {
+ return (ACPI_NOT_RESERVED_NAME);
+ }
+
+ /* Check for a standard predefined method name */
+
+ for (i = 0; PredefinedNames[i].Info.Name[0]; i++)
+ {
+ if (ACPI_COMPARE_NAME (Name, PredefinedNames[i].Info.Name))
+ {
+ /* Return index into predefined array */
+ return (i);
+ }
+ }
+
+ /* Check for resource names and predefined scope names */
+
+ for (i = 0; ResourceNames[i].Info.Name[0]; i++)
+ {
+ if (ACPI_COMPARE_NAME (Name, ResourceNames[i].Info.Name))
+ {
+ return (ACPI_PREDEFINED_NAME);
+ }
+ }
+
+ for (i = 0; ScopeNames[i].Info.Name[0]; i++)
+ {
+ if (ACPI_COMPARE_NAME (Name, ScopeNames[i].Info.Name))
+ {
+ return (ACPI_PREDEFINED_NAME);
+ }
+ }
+
+ /* Check for _Lxx, _Exx, _Qxx, _T_x. Warning if unknown predefined name */
+
+ return (ApCheckForSpecialName (Op, Name));
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: ApCheckForSpecialName
+ *
+ * PARAMETERS: Op - A parse node
+ * Name - NameSeg to check
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Check for the "special" predefined names -
+ * _Lxx, _Exx, _Qxx, and _T_x
+ *
+ ******************************************************************************/
+
+static UINT32
+ApCheckForSpecialName (
+ ACPI_PARSE_OBJECT *Op,
+ char *Name)
+{
+
+ /*
+ * Check for the "special" predefined names. We know the first char is an
+ * underscore already.
+ * GPE: _Lxx
+ * GPE: _Exx
+ * EC: _Qxx
+ */
+ if ((Name[1] == 'L') ||
+ (Name[1] == 'E') ||
+ (Name[1] == 'Q'))
+ {
+ /* The next two characters must be hex digits */
+
+ if ((isxdigit ((int) Name[2])) &&
+ (isxdigit ((int) Name[3])))
+ {
+ return (ACPI_EVENT_RESERVED_NAME);
+ }
+ }
+
+ /* Check for the names reserved for the compiler itself: _T_x */
+
+ else if ((Op->Asl.ExternalName[1] == 'T') &&
+ (Op->Asl.ExternalName[2] == '_'))
+ {
+ /* Ignore if actually emitted by the compiler */
+
+ if (Op->Asl.CompileFlags & NODE_COMPILER_EMITTED)
+ {
+ return (ACPI_NOT_RESERVED_NAME);
+ }
+
+ /*
+ * Was not actually emitted by the compiler. This is a special case,
+ * however. If the ASL code being compiled was the result of a
+ * dissasembly, it may possibly contain valid compiler-emitted names
+ * of the form "_T_x". We don't want to issue an error or even a
+ * warning and force the user to manually change the names. So, we
+ * will issue a remark instead.
+ */
+ AslError (ASL_REMARK, ASL_MSG_COMPILER_RESERVED, Op, Op->Asl.ExternalName);
+ return (ACPI_COMPILER_RESERVED_NAME);
+ }
+
+ /*
+ * The name didn't match any of the known predefined names. Flag it as a
+ * warning, since the entire namespace starting with an underscore is
+ * reserved by the ACPI spec.
+ */
+ AslError (ASL_WARNING, ASL_MSG_UNKNOWN_RESERVED_NAME, Op,
+ Op->Asl.ExternalName);
+
+ return (ACPI_NOT_RESERVED_NAME);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: ApCheckObjectType
+ *
+ * PARAMETERS: Op - A parse node
+ * ExpectedBtypes - Bitmap of expected return type(s)
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Check if the object type is one of the types that is expected
+ * by the predefined name. Only a limited number of object types
+ * can be returned by the predefined names.
+ *
+ ******************************************************************************/
+
+static void
+ApCheckObjectType (
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 ExpectedBtypes)
+{
+ UINT32 ReturnBtype;
+ char TypeBuffer[48]; /* Room for 5 types */
+
+
+ switch (Op->Asl.ParseOpcode)
+ {
+ case PARSEOP_INTEGER:
+ ReturnBtype = ACPI_RTYPE_INTEGER;
+ break;
+
+ case PARSEOP_BUFFER:
+ ReturnBtype = ACPI_RTYPE_BUFFER;
+ break;
+
+ case PARSEOP_STRING_LITERAL:
+ ReturnBtype = ACPI_RTYPE_STRING;
+ break;
+
+ case PARSEOP_PACKAGE:
+ ReturnBtype = ACPI_RTYPE_PACKAGE;
+ break;
+
+ default:
+ /* Not one of the supported object types */
+
+ goto TypeErrorExit;
+ }
+
+ /* Is the object one of the expected types? */
+
+ if (ReturnBtype & ExpectedBtypes)
+ {
+ return;
+ }
+
+
+TypeErrorExit:
+
+ /* Format the expected types and emit an error message */
+
+ ApGetExpectedTypes (TypeBuffer, ExpectedBtypes);
+
+ AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op,
+ TypeBuffer);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: ApDisplayReservedNames
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Dump information about the ACPI predefined names and predefined
+ * resource descriptor names.
+ *
+ ******************************************************************************/
+
+void
+ApDisplayReservedNames (
+ void)
+{
+ const ACPI_PREDEFINED_INFO *ThisName;
+ char TypeBuffer[48]; /* Room for 5 types */
+ UINT32 Count;
+
+
+ /*
+ * Predefined names/methods
+ */
+ printf ("\nPredefined Name Information\n\n");
+
+ Count = 0;
+ ThisName = PredefinedNames;
+ while (ThisName->Info.Name[0])
+ {
+ printf ("%4.4s Requires %d arguments, ",
+ ThisName->Info.Name, ThisName->Info.ParamCount & 0x0F);
+
+ if (ThisName->Info.ExpectedBtypes)
+ {
+ ApGetExpectedTypes (TypeBuffer, ThisName->Info.ExpectedBtypes);
+ printf ("Must return: %s\n", TypeBuffer);
+ }
+ else
+ {
+ printf ("No return value\n");
+ }
+
+ /*
+ * Skip next entry in the table if this name returns a Package
+ * (next entry contains the package info)
+ */
+ if (ThisName->Info.ExpectedBtypes & ACPI_RTYPE_PACKAGE)
+ {
+ ThisName++;
+ }
+
+ Count++;
+ ThisName++;
+ }
+
+ printf ("%u Predefined Names are recognized\n", Count);
+
+ /*
+ * Resource Descriptor names
+ */
+ printf ("\nResource Descriptor Predefined Names\n\n");
+
+ Count = 0;
+ ThisName = ResourceNames;
+ while (ThisName->Info.Name[0])
+ {
+ printf ("%4.4s Resource Descriptor\n", ThisName->Info.Name);
+ Count++;
+ ThisName++;
+ }
+
+ printf ("%u Resource Descriptor Names are recognized\n", Count);
+
+ /*
+ * Predefined scope names
+ */
+ printf ("\nPredefined Scope Names\n\n");
+
+ ThisName = ScopeNames;
+ while (ThisName->Info.Name[0])
+ {
+ printf ("%4.4s Scope\n", ThisName->Info.Name);
+ ThisName++;
+ }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: ApGetExpectedTypes
+ *
+ * PARAMETERS: Buffer - Where the formatted string is returned
+ * ExpectedBTypes - Bitfield of expected data types
+ *
+ * RETURN: None, formatted string
+ *
+ * DESCRIPTION: Format the expected object types into a printable string.
+ *
+ ******************************************************************************/
+
+static void
+ApGetExpectedTypes (
+ char *Buffer,
+ UINT32 ExpectedBtypes)
+{
+ UINT32 ThisRtype;
+ UINT32 i;
+ UINT32 j;
+
+
+ j = 1;
+ Buffer[0] = 0;
+ ThisRtype = ACPI_RTYPE_INTEGER;
+
+ for (i = 0; i < ACPI_NUM_RTYPES; i++)
+ {
+ /* If one of the expected types, concatenate the name of this type */
+
+ if (ExpectedBtypes & ThisRtype)
+ {
+ ACPI_STRCAT (Buffer, &AcpiRtypeNames[i][j]);
+ j = 0; /* Use name separator from now on */
+ }
+ ThisRtype <<= 1; /* Next Rtype */
+ }
+}
+
diff --git a/compiler/aslstubs.c b/compiler/aslstubs.c
index 66e3c0cce0d8..8f3de7e83b4a 100644
--- a/compiler/aslstubs.c
+++ b/compiler/aslstubs.c
@@ -250,6 +250,15 @@ AcpiEvCheckForWakeOnlyGpe (
return (AE_OK);
}
+void
+AcpiExDoDebugObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ UINT32 Level,
+ UINT32 Index)
+{
+ return;
+}
+
ACPI_STATUS
AcpiExReadDataFromField (
ACPI_WALK_STATE *WalkState,
@@ -276,7 +285,6 @@ AcpiExLoadTableOp (
return (AE_SUPPORT);
}
-
ACPI_STATUS
AcpiExUnloadTable (
ACPI_OPERAND_OBJECT *DdbHandle)
diff --git a/compiler/asltypes.h b/compiler/asltypes.h
index 9e1d426d2b75..6edf9870680a 100644
--- a/compiler/asltypes.h
+++ b/compiler/asltypes.h
@@ -188,21 +188,6 @@ typedef struct asl_mapping_entry
} ASL_MAPPING_ENTRY;
-/* An entry in the Reserved Name information table */
-
-#define ASL_RSVD_RETURN_VALUE 0x01
-#define ASL_RSVD_RESOURCE_NAME 0x02
-#define ASL_RSVD_SCOPE 0x04
-
-typedef struct asl_reserved_info
-{
- char *Name;
- UINT8 NumArguments;
- UINT8 Flags;
-
-} ASL_RESERVED_INFO;
-
-
/* Parse tree walk info structure */
typedef struct asl_walk_info
@@ -522,7 +507,7 @@ char *AslMessages [] = {
/* ASL_MSG_RESERVED_ARG_COUNT_HI */ "Reserved method has too many arguments",
/* ASL_MSG_RESERVED_ARG_COUNT_LO */ "Reserved method has too few arguments",
/* ASL_MSG_RESERVED_METHOD */ "Reserved name must be a control method",
-/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid operand type for reserved name, must be",
+/* ASL_MSG_RESERVED_OPERAND_TYPE */ "Invalid object type for reserved name, must be",
/* ASL_MSG_RESERVED_RETURN_VALUE */ "Reserved method must return a value",
/* ASL_MSG_RESERVED_USE */ "Invalid use of reserved name",
/* ASL_MSG_RESERVED_WORD */ "Use of reserved name",
diff --git a/dispatcher/dsfield.c b/dispatcher/dsfield.c
index 8453c8808711..23e33782d54d 100644
--- a/dispatcher/dsfield.c
+++ b/dispatcher/dsfield.c
@@ -424,7 +424,7 @@ AcpiDsGetFieldNames (
default:
ACPI_ERROR ((AE_INFO,
- "Invalid opcode in field list: %X", Arg->Common.AmlOpcode));
+ "Invalid opcode in field list: 0x%X", Arg->Common.AmlOpcode));
return_ACPI_STATUS (AE_AML_BAD_OPCODE);
}
diff --git a/dispatcher/dsmethod.c b/dispatcher/dsmethod.c
index 29153b0754a0..969c9ca23e39 100644
--- a/dispatcher/dsmethod.c
+++ b/dispatcher/dsmethod.c
@@ -318,7 +318,7 @@ AcpiDsBeginMethodExecution (
(WalkState->Thread->CurrentSyncLevel > ObjDesc->Method.Mutex->Mutex.SyncLevel))
{
ACPI_ERROR ((AE_INFO,
- "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%d)",
+ "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%u)",
AcpiUtGetNodeName (MethodNode),
WalkState->Thread->CurrentSyncLevel));
diff --git a/dispatcher/dsmthdat.c b/dispatcher/dsmthdat.c
index 128308286ca1..54678921bc1b 100644
--- a/dispatcher/dsmthdat.c
+++ b/dispatcher/dsmthdat.c
@@ -363,7 +363,7 @@ AcpiDsMethodDataGetNode (
if (Index > ACPI_METHOD_MAX_LOCAL)
{
ACPI_ERROR ((AE_INFO,
- "Local index %d is invalid (max %d)",
+ "Local index %u is invalid (max %u)",
Index, ACPI_METHOD_MAX_LOCAL));
return_ACPI_STATUS (AE_AML_INVALID_INDEX);
}
@@ -378,7 +378,7 @@ AcpiDsMethodDataGetNode (
if (Index > ACPI_METHOD_MAX_ARG)
{
ACPI_ERROR ((AE_INFO,
- "Arg index %d is invalid (max %d)",
+ "Arg index %u is invalid (max %u)",
Index, ACPI_METHOD_MAX_ARG));
return_ACPI_STATUS (AE_AML_INVALID_INDEX);
}
@@ -389,7 +389,7 @@ AcpiDsMethodDataGetNode (
break;
default:
- ACPI_ERROR ((AE_INFO, "Type %d is invalid", Type));
+ ACPI_ERROR ((AE_INFO, "Type %u is invalid", Type));
return_ACPI_STATUS (AE_TYPE);
}
@@ -540,7 +540,7 @@ AcpiDsMethodDataGetValue (
case ACPI_REFCLASS_ARG:
ACPI_ERROR ((AE_INFO,
- "Uninitialized Arg[%d] at node %p",
+ "Uninitialized Arg[%u] at node %p",
Index, Node));
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
@@ -555,7 +555,7 @@ AcpiDsMethodDataGetValue (
default:
- ACPI_ERROR ((AE_INFO, "Not a Arg/Local opcode: %X", Type));
+ ACPI_ERROR ((AE_INFO, "Not a Arg/Local opcode: 0x%X", Type));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
}
diff --git a/dispatcher/dsobject.c b/dispatcher/dsobject.c
index 2796f66c70f4..3d8fce40390b 100644
--- a/dispatcher/dsobject.c
+++ b/dispatcher/dsobject.c
@@ -365,7 +365,7 @@ AcpiDsBuildInternalBufferObj (
if (ByteList->Common.AmlOpcode != AML_INT_BYTELIST_OP)
{
ACPI_ERROR ((AE_INFO,
- "Expecting bytelist, got AML opcode %X in op %p",
+ "Expecting bytelist, found AML opcode 0x%X in op %p",
ByteList->Common.AmlOpcode, ByteList));
AcpiUtRemoveReference (ObjDesc);
@@ -599,7 +599,7 @@ AcpiDsBuildInternalPackageObj (
}
ACPI_INFO ((AE_INFO,
- "Actual Package length (0x%X) is larger than NumElements field (0x%X), truncated\n",
+ "Actual Package length (%u) is larger than NumElements field (%u), truncated\n",
i, ElementCount));
}
else if (i < ElementCount)
@@ -609,7 +609,7 @@ AcpiDsBuildInternalPackageObj (
* Note: this is not an error, the package is padded out with NULLs.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Package List length (0x%X) smaller than NumElements count (0x%X), padded with null elements\n",
+ "Package List length (%u) smaller than NumElements count (%u), padded with null elements\n",
i, ElementCount));
}
@@ -804,7 +804,7 @@ AcpiDsInitObjectFromOp (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown constant opcode %X", Opcode));
+ "Unknown constant opcode 0x%X", Opcode));
Status = AE_AML_OPERAND_TYPE;
break;
}
@@ -821,7 +821,7 @@ AcpiDsInitObjectFromOp (
default:
- ACPI_ERROR ((AE_INFO, "Unknown Integer type %X",
+ ACPI_ERROR ((AE_INFO, "Unknown Integer type 0x%X",
OpInfo->Type));
Status = AE_AML_OPERAND_TYPE;
break;
@@ -902,7 +902,7 @@ AcpiDsInitObjectFromOp (
default:
ACPI_ERROR ((AE_INFO,
- "Unimplemented reference type for AML opcode: %4.4X", Opcode));
+ "Unimplemented reference type for AML opcode: 0x%4.4X", Opcode));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
break;
@@ -912,7 +912,7 @@ AcpiDsInitObjectFromOp (
default:
- ACPI_ERROR ((AE_INFO, "Unimplemented data type: %X",
+ ACPI_ERROR ((AE_INFO, "Unimplemented data type: 0x%X",
ObjDesc->Common.Type));
Status = AE_AML_OPERAND_TYPE;
diff --git a/dispatcher/dsopcode.c b/dispatcher/dsopcode.c
index 328a350092a5..e7ebc765301a 100644
--- a/dispatcher/dsopcode.c
+++ b/dispatcher/dsopcode.c
@@ -395,7 +395,7 @@ AcpiDsGetBufferArguments (
if (!Node)
{
ACPI_ERROR ((AE_INFO,
- "No pointer back to NS node in buffer obj %p", ObjDesc));
+ "No pointer back to namespace node in buffer object %p", ObjDesc));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -444,7 +444,7 @@ AcpiDsGetPackageArguments (
if (!Node)
{
ACPI_ERROR ((AE_INFO,
- "No pointer back to NS node in package %p", ObjDesc));
+ "No pointer back to namespace node in package %p", ObjDesc));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -678,7 +678,7 @@ AcpiDsInitBufferField (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown field creation opcode %02x",
+ "Unknown field creation opcode 0x%02X",
AmlOpcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
@@ -690,7 +690,7 @@ AcpiDsInitBufferField (
(8 * (UINT32) BufferDesc->Buffer.Length))
{
ACPI_ERROR ((AE_INFO,
- "Field [%4.4s] at %d exceeds Buffer [%4.4s] size %d (bits)",
+ "Field [%4.4s] at %u exceeds Buffer [%4.4s] size %u (bits)",
AcpiUtGetNodeName (ResultDesc),
BitOffset + BitCount,
AcpiUtGetNodeName (BufferDesc->Buffer.Node),
@@ -806,7 +806,7 @@ AcpiDsEvalBufferFieldOperands (
ACPI_WALK_OPERANDS, WalkState);
if (ACPI_FAILURE (Status))
{
- ACPI_ERROR ((AE_INFO, "(%s) bad operand(s) (%X)",
+ ACPI_ERROR ((AE_INFO, "(%s) bad operand(s), status 0x%X",
AcpiPsGetOpcodeName (Op->Common.AmlOpcode), Status));
return_ACPI_STATUS (Status);
@@ -1607,7 +1607,7 @@ AcpiDsExecEndControlOp (
default:
- ACPI_ERROR ((AE_INFO, "Unknown control opcode=%X Op=%p",
+ ACPI_ERROR ((AE_INFO, "Unknown control opcode=0x%X Op=%p",
Op->Common.AmlOpcode, Op));
Status = AE_AML_BAD_OPCODE;
diff --git a/dispatcher/dswexec.c b/dispatcher/dswexec.c
index d4b3f0c9280c..3c1f85e261d1 100644
--- a/dispatcher/dswexec.c
+++ b/dispatcher/dswexec.c
@@ -227,7 +227,7 @@ AcpiDsGetPredicateValue (
if (LocalObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
ACPI_ERROR ((AE_INFO,
- "Bad predicate (not an integer) ObjDesc=%p State=%p Type=%X",
+ "Bad predicate (not an integer) ObjDesc=%p State=%p Type=0x%X",
ObjDesc, WalkState, ObjDesc->Common.Type));
Status = AE_AML_OPERAND_TYPE;
@@ -463,7 +463,7 @@ AcpiDsExecEndOp (
if (OpClass == AML_CLASS_UNKNOWN)
{
- ACPI_ERROR ((AE_INFO, "Unknown opcode %X", Op->Common.AmlOpcode));
+ ACPI_ERROR ((AE_INFO, "Unknown opcode 0x%X", Op->Common.AmlOpcode));
return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
}
@@ -783,7 +783,7 @@ AcpiDsExecEndOp (
default:
ACPI_ERROR ((AE_INFO,
- "Unimplemented opcode, class=%X type=%X Opcode=%X Op=%p",
+ "Unimplemented opcode, class=0x%X type=0x%X Opcode=-0x%X Op=%p",
OpClass, OpType, Op->Common.AmlOpcode, Op));
Status = AE_NOT_IMPLEMENTED;
diff --git a/dispatcher/dswstate.c b/dispatcher/dswstate.c
index ffe2895fa8e7..91f019f6d168 100644
--- a/dispatcher/dswstate.c
+++ b/dispatcher/dswstate.c
@@ -277,7 +277,7 @@ AcpiDsResultPush (
if (!Object)
{
ACPI_ERROR ((AE_INFO,
- "Null Object! Obj=%p State=%p Num=%X",
+ "Null Object! Obj=%p State=%p Num=%u",
Object, WalkState, WalkState->ResultCount));
return (AE_BAD_PARAMETER);
}
@@ -323,7 +323,7 @@ AcpiDsResultStackPush (
if (((UINT32) WalkState->ResultSize + ACPI_RESULTS_FRAME_OBJ_NUM) >
ACPI_RESULTS_OBJ_NUM_MAX)
{
- ACPI_ERROR ((AE_INFO, "Result stack overflow: State=%p Num=%X",
+ ACPI_ERROR ((AE_INFO, "Result stack overflow: State=%p Num=%u",
WalkState, WalkState->ResultSize));
return (AE_STACK_OVERFLOW);
}
@@ -426,7 +426,7 @@ AcpiDsObjStackPush (
if (WalkState->NumOperands >= ACPI_OBJ_NUM_OPERANDS)
{
ACPI_ERROR ((AE_INFO,
- "Object stack overflow! Obj=%p State=%p #Ops=%X",
+ "Object stack overflow! Obj=%p State=%p #Ops=%u",
Object, WalkState, WalkState->NumOperands));
return (AE_STACK_OVERFLOW);
}
@@ -480,7 +480,7 @@ AcpiDsObjStackPop (
if (WalkState->NumOperands == 0)
{
ACPI_ERROR ((AE_INFO,
- "Object stack underflow! Count=%X State=%p #Ops=%X",
+ "Object stack underflow! Count=%X State=%p #Ops=%u",
PopCount, WalkState, WalkState->NumOperands));
return (AE_STACK_UNDERFLOW);
}
@@ -491,7 +491,7 @@ AcpiDsObjStackPop (
WalkState->Operands [WalkState->NumOperands] = NULL;
}
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Count=%X State=%p #Ops=%X\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Count=%X State=%p #Ops=%u\n",
PopCount, WalkState, WalkState->NumOperands));
return (AE_OK);
diff --git a/events/evevent.c b/events/evevent.c
index 05cc4cd8b739..d9715a8232e3 100644
--- a/events/evevent.c
+++ b/events/evevent.c
@@ -415,7 +415,7 @@ AcpiEvFixedEventDispatch (
ACPI_DISABLE_EVENT);
ACPI_ERROR ((AE_INFO,
- "No installed handler for fixed event [%08X]",
+ "No installed handler for fixed event [0x%08X]",
Event));
return (ACPI_INTERRUPT_NOT_HANDLED);
diff --git a/events/evgpe.c b/events/evgpe.c
index de1f861d5d92..41efada245e6 100644
--- a/events/evgpe.c
+++ b/events/evgpe.c
@@ -803,7 +803,7 @@ AcpiEvGpeDispatch (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Unable to clear GPE[%2X]", GpeNumber));
+ "Unable to clear GPE[0x%2X]", GpeNumber));
return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED);
}
}
@@ -836,7 +836,7 @@ AcpiEvGpeDispatch (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Unable to clear GPE[%2X]", GpeNumber));
+ "Unable to clear GPE[0x%2X]", GpeNumber));
return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED);
}
}
@@ -852,7 +852,7 @@ AcpiEvGpeDispatch (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Unable to disable GPE[%2X]", GpeNumber));
+ "Unable to disable GPE[0x%2X]", GpeNumber));
return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED);
}
@@ -865,7 +865,7 @@ AcpiEvGpeDispatch (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Unable to queue handler for GPE[%2X] - event disabled",
+ "Unable to queue handler for GPE[0x%2X] - event disabled",
GpeNumber));
}
break;
@@ -875,7 +875,7 @@ AcpiEvGpeDispatch (
/* No handler or method to run! */
ACPI_ERROR ((AE_INFO,
- "No handler or method for GPE[%2X], disabling event",
+ "No handler or method for GPE[0x%2X], disabling event",
GpeNumber));
/*
@@ -886,7 +886,7 @@ AcpiEvGpeDispatch (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Unable to disable GPE[%2X]", GpeNumber));
+ "Unable to disable GPE[0x%2X]", GpeNumber));
return_UINT32 (ACPI_INTERRUPT_NOT_HANDLED);
}
break;
diff --git a/events/evgpeblk.c b/events/evgpeblk.c
index 10f48a5d9139..be6d45b5dc37 100644
--- a/events/evgpeblk.c
+++ b/events/evgpeblk.c
@@ -1337,8 +1337,8 @@ AcpiEvGpeInitialize (
(GpeNumberMax >= AcpiGbl_FADT.Gpe1Base))
{
ACPI_ERROR ((AE_INFO,
- "GPE0 block (GPE 0 to %d) overlaps the GPE1 block "
- "(GPE %d to %d) - Ignoring GPE1",
+ "GPE0 block (GPE 0 to %u) overlaps the GPE1 block "
+ "(GPE %u to %u) - Ignoring GPE1",
GpeNumberMax, AcpiGbl_FADT.Gpe1Base,
AcpiGbl_FADT.Gpe1Base +
((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1)));
diff --git a/events/evmisc.c b/events/evmisc.c
index 62f549d1cadf..b0e1cac144f4 100644
--- a/events/evmisc.c
+++ b/events/evmisc.c
@@ -696,7 +696,7 @@ AcpiEvTerminate (
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO,
- "Could not disable fixed event %d", (UINT32) i));
+ "Could not disable fixed event %u", (UINT32) i));
}
}
diff --git a/events/evxface.c b/events/evxface.c
index 3ca00215e84e..051e5bf4a7f8 100644
--- a/events/evxface.c
+++ b/events/evxface.c
@@ -232,7 +232,7 @@ AcpiInstallFixedEventHandler (
Status = AcpiEnableEvent (Event, 0);
if (ACPI_FAILURE (Status))
{
- ACPI_WARNING ((AE_INFO, "Could not enable fixed event %X", Event));
+ ACPI_WARNING ((AE_INFO, "Could not enable fixed event 0x%X", Event));
/* Remove the handler */
@@ -303,7 +303,7 @@ AcpiRemoveFixedEventHandler (
if (ACPI_FAILURE (Status))
{
ACPI_WARNING ((AE_INFO,
- "Could not write to fixed event enable register %X", Event));
+ "Could not write to fixed event enable register 0x%X", Event));
}
else
{
diff --git a/executer/exconvrt.c b/executer/exconvrt.c
index 2e154d1202ae..d0831a32cad6 100644
--- a/executer/exconvrt.c
+++ b/executer/exconvrt.c
@@ -786,7 +786,7 @@ AcpiExConvertToTargetType (
default:
- ACPI_ERROR ((AE_INFO, "Bad destination type during conversion: %X",
+ ACPI_ERROR ((AE_INFO, "Bad destination type during conversion: 0x%X",
DestinationType));
Status = AE_AML_INTERNAL;
break;
@@ -803,7 +803,7 @@ AcpiExConvertToTargetType (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Target type ID 0x%X AmlOpcode %X DestType %s",
+ "Unknown Target type ID 0x%X AmlOpcode 0x%X DestType %s",
GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs),
WalkState->Opcode, AcpiUtGetTypeName (DestinationType)));
Status = AE_AML_INTERNAL;
diff --git a/executer/excreate.c b/executer/excreate.c
index 728603e49c28..87c4f8a8f90f 100644
--- a/executer/excreate.c
+++ b/executer/excreate.c
@@ -402,11 +402,11 @@ AcpiExCreateRegion (
if ((RegionSpace >= ACPI_NUM_PREDEFINED_REGIONS) &&
(RegionSpace < ACPI_USER_REGION_BEGIN))
{
- ACPI_ERROR ((AE_INFO, "Invalid AddressSpace type %X", RegionSpace));
+ ACPI_ERROR ((AE_INFO, "Invalid AddressSpace type 0x%X", RegionSpace));
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (%X)\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_LOAD, "Region Type - %s (0x%X)\n",
AcpiUtGetRegionName (RegionSpace), RegionSpace));
/* Create the region descriptor */
diff --git a/executer/exdebug.c b/executer/exdebug.c
new file mode 100644
index 000000000000..bef4f24a2086
--- /dev/null
+++ b/executer/exdebug.c
@@ -0,0 +1,350 @@
+/******************************************************************************
+ *
+ * Module Name: exdebug - Support for stores to the AML Debug Object
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#define __EXDEBUG_C__
+
+#include "acpi.h"
+#include "accommon.h"
+#include "acinterp.h"
+
+
+#define _COMPONENT ACPI_EXECUTER
+ ACPI_MODULE_NAME ("exdebug")
+
+
+#ifndef ACPI_NO_ERROR_MESSAGES
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExDoDebugObject
+ *
+ * PARAMETERS: SourceDesc - Object to be output to "Debug Object"
+ * Level - Indentation level (used for packages)
+ * Index - Current package element, zero if not pkg
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Handles stores to the AML Debug Object. For example:
+ * Store(INT1, Debug)
+ *
+ * This function is not compiled if ACPI_NO_ERROR_MESSAGES is set.
+ *
+ * This function is only enabled if AcpiGbl_EnableAmlDebugObject is set, or
+ * if ACPI_LV_DEBUG_OBJECT is set in the AcpiDbgLevel. Thus, in the normal
+ * operational case, stores to the debug object are ignored but can be easily
+ * enabled if necessary.
+ *
+ ******************************************************************************/
+
+void
+AcpiExDoDebugObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ UINT32 Level,
+ UINT32 Index)
+{
+ UINT32 i;
+
+
+ ACPI_FUNCTION_TRACE_PTR (ExDoDebugObject, SourceDesc);
+
+
+ /* Output must be enabled via the DebugObject global or the DbgLevel */
+
+ if (!AcpiGbl_EnableAmlDebugObject &&
+ !(AcpiDbgLevel & ACPI_LV_DEBUG_OBJECT))
+ {
+ return_VOID;
+ }
+
+ /*
+ * Print line header as long as we are not in the middle of an
+ * object display
+ */
+ if (!((Level > 0) && Index == 0))
+ {
+ AcpiOsPrintf ("[ACPI Debug] %*s", Level, " ");
+ }
+
+ /* Display the index for package output only */
+
+ if (Index > 0)
+ {
+ AcpiOsPrintf ("(%.2u) ", Index-1);
+ }
+
+ if (!SourceDesc)
+ {
+ AcpiOsPrintf ("[Null Object]\n");
+ return_VOID;
+ }
+
+ if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc) == ACPI_DESC_TYPE_OPERAND)
+ {
+ AcpiOsPrintf ("%s ", AcpiUtGetObjectTypeName (SourceDesc));
+
+ if (!AcpiUtValidInternalObject (SourceDesc))
+ {
+ AcpiOsPrintf ("%p, Invalid Internal Object!\n", SourceDesc);
+ return_VOID;
+ }
+ }
+ else if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc) == ACPI_DESC_TYPE_NAMED)
+ {
+ AcpiOsPrintf ("%s: %p\n",
+ AcpiUtGetTypeName (((ACPI_NAMESPACE_NODE *) SourceDesc)->Type),
+ SourceDesc);
+ return_VOID;
+ }
+ else
+ {
+ return_VOID;
+ }
+
+ /* SourceDesc is of type ACPI_DESC_TYPE_OPERAND */
+
+ switch (SourceDesc->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+
+ /* Output correct integer width */
+
+ if (AcpiGbl_IntegerByteWidth == 4)
+ {
+ AcpiOsPrintf ("0x%8.8X\n",
+ (UINT32) SourceDesc->Integer.Value);
+ }
+ else
+ {
+ AcpiOsPrintf ("0x%8.8X%8.8X\n",
+ ACPI_FORMAT_UINT64 (SourceDesc->Integer.Value));
+ }
+ break;
+
+ case ACPI_TYPE_BUFFER:
+
+ AcpiOsPrintf ("[0x%.2X]\n", (UINT32) SourceDesc->Buffer.Length);
+ AcpiUtDumpBuffer2 (SourceDesc->Buffer.Pointer,
+ (SourceDesc->Buffer.Length < 256) ?
+ SourceDesc->Buffer.Length : 256, DB_BYTE_DISPLAY);
+ break;
+
+ case ACPI_TYPE_STRING:
+
+ AcpiOsPrintf ("[0x%.2X] \"%s\"\n",
+ SourceDesc->String.Length, SourceDesc->String.Pointer);
+ break;
+
+ case ACPI_TYPE_PACKAGE:
+
+ AcpiOsPrintf ("[Contains 0x%.2X Elements]\n",
+ SourceDesc->Package.Count);
+
+ /* Output the entire contents of the package */
+
+ for (i = 0; i < SourceDesc->Package.Count; i++)
+ {
+ AcpiExDoDebugObject (SourceDesc->Package.Elements[i],
+ Level+4, i+1);
+ }
+ break;
+
+ case ACPI_TYPE_LOCAL_REFERENCE:
+
+ AcpiOsPrintf ("[%s] ", AcpiUtGetReferenceName (SourceDesc));
+
+ /* Decode the reference */
+
+ switch (SourceDesc->Reference.Class)
+ {
+ case ACPI_REFCLASS_INDEX:
+
+ AcpiOsPrintf ("0x%X\n", SourceDesc->Reference.Value);
+ break;
+
+ case ACPI_REFCLASS_TABLE:
+
+ /* Case for DdbHandle */
+
+ AcpiOsPrintf ("Table Index 0x%X\n", SourceDesc->Reference.Value);
+ return;
+
+ default:
+ break;
+ }
+
+ AcpiOsPrintf (" ");
+
+ /* Check for valid node first, then valid object */
+
+ if (SourceDesc->Reference.Node)
+ {
+ if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Node) !=
+ ACPI_DESC_TYPE_NAMED)
+ {
+ AcpiOsPrintf (" %p - Not a valid namespace node\n",
+ SourceDesc->Reference.Node);
+ }
+ else
+ {
+ AcpiOsPrintf ("Node %p [%4.4s] ", SourceDesc->Reference.Node,
+ (SourceDesc->Reference.Node)->Name.Ascii);
+
+ switch ((SourceDesc->Reference.Node)->Type)
+ {
+ /* These types have no attached object */
+
+ case ACPI_TYPE_DEVICE:
+ AcpiOsPrintf ("Device\n");
+ break;
+
+ case ACPI_TYPE_THERMAL:
+ AcpiOsPrintf ("Thermal Zone\n");
+ break;
+
+ default:
+ AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
+ Level+4, 0);
+ break;
+ }
+ }
+ }
+ else if (SourceDesc->Reference.Object)
+ {
+ if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Object) ==
+ ACPI_DESC_TYPE_NAMED)
+ {
+ AcpiExDoDebugObject (((ACPI_NAMESPACE_NODE *)
+ SourceDesc->Reference.Object)->Object,
+ Level+4, 0);
+ }
+ else
+ {
+ AcpiExDoDebugObject (SourceDesc->Reference.Object,
+ Level+4, 0);
+ }
+ }
+ break;
+
+ default:
+
+ AcpiOsPrintf ("%p\n", SourceDesc);
+ break;
+ }
+
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "\n"));
+ return_VOID;
+}
+#endif
+
+
diff --git a/executer/exfield.c b/executer/exfield.c
index 5657ea88479a..ad1209da4f48 100644
--- a/executer/exfield.c
+++ b/executer/exfield.c
@@ -382,7 +382,7 @@ AcpiExWriteDataToField (
if (SourceDesc->Buffer.Length < Length)
{
ACPI_ERROR ((AE_INFO,
- "SMBus or IPMI write requires Buffer of length %X, found length %X",
+ "SMBus or IPMI write requires Buffer of length %u, found length %u",
Length, SourceDesc->Buffer.Length));
return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);
diff --git a/executer/exfldio.c b/executer/exfldio.c
index 403cb069446d..0cff9f94d9c2 100644
--- a/executer/exfldio.c
+++ b/executer/exfldio.c
@@ -181,7 +181,7 @@ AcpiExSetupRegion (
if (RgnDesc->Common.Type != ACPI_TYPE_REGION)
{
- ACPI_ERROR ((AE_INFO, "Needed Region, found type %X (%s)",
+ ACPI_ERROR ((AE_INFO, "Needed Region, found type 0x%X (%s)",
RgnDesc->Common.Type,
AcpiUtGetObjectTypeName (RgnDesc)));
@@ -262,7 +262,7 @@ AcpiExSetupRegion (
* byte, and a field with Dword access specified.
*/
ACPI_ERROR ((AE_INFO,
- "Field [%4.4s] access width (%d bytes) too large for region [%4.4s] (length %X)",
+ "Field [%4.4s] access width (%u bytes) too large for region [%4.4s] (length %u)",
AcpiUtGetNodeName (ObjDesc->CommonField.Node),
ObjDesc->CommonField.AccessByteWidth,
AcpiUtGetNodeName (RgnDesc->Region.Node),
@@ -274,7 +274,7 @@ AcpiExSetupRegion (
* exceeds region length, indicate an error
*/
ACPI_ERROR ((AE_INFO,
- "Field [%4.4s] Base+Offset+Width %X+%X+%X is beyond end of region [%4.4s] (length %X)",
+ "Field [%4.4s] Base+Offset+Width %u+%u+%u is beyond end of region [%4.4s] (length %u)",
AcpiUtGetNodeName (ObjDesc->CommonField.Node),
ObjDesc->CommonField.BaseByteOffset,
FieldDatumByteOffset, ObjDesc->CommonField.AccessByteWidth,
@@ -371,14 +371,14 @@ AcpiExAccessRegion (
if (Status == AE_NOT_IMPLEMENTED)
{
ACPI_ERROR ((AE_INFO,
- "Region %s(%X) not implemented",
+ "Region %s(0x%X) not implemented",
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
}
else if (Status == AE_NOT_EXIST)
{
ACPI_ERROR ((AE_INFO,
- "Region %s(%X) has no handler",
+ "Region %s(0x%X) has no handler",
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId));
}
@@ -633,7 +633,7 @@ AcpiExFieldDatumIo (
default:
- ACPI_ERROR ((AE_INFO, "Wrong object type in field I/O %X",
+ ACPI_ERROR ((AE_INFO, "Wrong object type in field I/O %u",
ObjDesc->Common.Type));
Status = AE_AML_INTERNAL;
break;
@@ -743,7 +743,7 @@ AcpiExWriteWithUpdateRule (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown UpdateRule value: %X",
+ "Unknown UpdateRule value: 0x%X",
(ObjDesc->CommonField.FieldFlags & AML_FIELD_UPDATE_RULE_MASK)));
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
@@ -806,7 +806,7 @@ AcpiExExtractFromField (
ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength))
{
ACPI_ERROR ((AE_INFO,
- "Field size %X (bits) is too large for buffer (%X)",
+ "Field size %u (bits) is too large for buffer (%u)",
ObjDesc->CommonField.BitLength, BufferLength));
return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
diff --git a/executer/exmisc.c b/executer/exmisc.c
index 54cb1f0019f2..fb3bec984c73 100644
--- a/executer/exmisc.c
+++ b/executer/exmisc.c
@@ -183,7 +183,7 @@ AcpiExGetObjectReference (
default:
- ACPI_ERROR ((AE_INFO, "Unknown Reference Class %2.2X",
+ ACPI_ERROR ((AE_INFO, "Unknown Reference Class 0x%2.2X",
ObjDesc->Reference.Class));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -201,7 +201,7 @@ AcpiExGetObjectReference (
default:
- ACPI_ERROR ((AE_INFO, "Invalid descriptor type %X",
+ ACPI_ERROR ((AE_INFO, "Invalid descriptor type 0x%X",
ACPI_GET_DESCRIPTOR_TYPE (ObjDesc)));
return_ACPI_STATUS (AE_TYPE);
}
@@ -373,7 +373,7 @@ AcpiExDoConcatenate (
break;
default:
- ACPI_ERROR ((AE_INFO, "Invalid object type: %X",
+ ACPI_ERROR ((AE_INFO, "Invalid object type: 0x%X",
Operand0->Common.Type));
Status = AE_AML_INTERNAL;
}
@@ -475,7 +475,7 @@ AcpiExDoConcatenate (
/* Invalid object type, should not happen here */
- ACPI_ERROR ((AE_INFO, "Invalid object type: %X",
+ ACPI_ERROR ((AE_INFO, "Invalid object type: 0x%X",
Operand0->Common.Type));
Status =AE_AML_INTERNAL;
goto Cleanup;
diff --git a/executer/exmutex.c b/executer/exmutex.c
index d0aa9deda282..172db6392de6 100644
--- a/executer/exmutex.c
+++ b/executer/exmutex.c
@@ -353,7 +353,7 @@ AcpiExAcquireMutex (
if (WalkState->Thread->CurrentSyncLevel > ObjDesc->Mutex.SyncLevel)
{
ACPI_ERROR ((AE_INFO,
- "Cannot acquire Mutex [%4.4s], current SyncLevel is too large (%d)",
+ "Cannot acquire Mutex [%4.4s], current SyncLevel is too large (%u)",
AcpiUtGetNodeName (ObjDesc->Mutex.Node),
WalkState->Thread->CurrentSyncLevel));
return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
@@ -471,6 +471,7 @@ AcpiExReleaseMutex (
{
ACPI_STATUS Status = AE_OK;
UINT8 PreviousSyncLevel;
+ ACPI_THREAD_STATE *OwnerThread;
ACPI_FUNCTION_TRACE (ExReleaseMutex);
@@ -481,9 +482,11 @@ AcpiExReleaseMutex (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ OwnerThread = ObjDesc->Mutex.OwnerThread;
+
/* The mutex must have been previously acquired in order to release it */
- if (!ObjDesc->Mutex.OwnerThread)
+ if (!OwnerThread)
{
ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], not acquired",
AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
@@ -503,14 +506,14 @@ AcpiExReleaseMutex (
* The Mutex is owned, but this thread must be the owner.
* Special case for Global Lock, any thread can release
*/
- if ((ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId) &&
+ if ((OwnerThread->ThreadId != WalkState->Thread->ThreadId) &&
(ObjDesc != AcpiGbl_GlobalLockMutex))
{
ACPI_ERROR ((AE_INFO,
"Thread %p cannot release Mutex [%4.4s] acquired by thread %p",
ACPI_CAST_PTR (void, WalkState->Thread->ThreadId),
AcpiUtGetNodeName (ObjDesc->Mutex.Node),
- ACPI_CAST_PTR (void, ObjDesc->Mutex.OwnerThread->ThreadId)));
+ ACPI_CAST_PTR (void, OwnerThread->ThreadId)));
return_ACPI_STATUS (AE_AML_NOT_OWNER);
}
@@ -521,10 +524,10 @@ AcpiExReleaseMutex (
* different level can only mean that the mutex ordering rule is being
* violated. This behavior is clarified in ACPI 4.0 specification.
*/
- if (ObjDesc->Mutex.SyncLevel != WalkState->Thread->CurrentSyncLevel)
+ if (ObjDesc->Mutex.SyncLevel != OwnerThread->CurrentSyncLevel)
{
ACPI_ERROR ((AE_INFO,
- "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %d current %d",
+ "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %u current %u",
AcpiUtGetNodeName (ObjDesc->Mutex.Node),
ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel));
return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
@@ -536,7 +539,7 @@ AcpiExReleaseMutex (
* acquired, but are not released in reverse order.
*/
PreviousSyncLevel =
- WalkState->Thread->AcquiredMutexList->Mutex.OriginalSyncLevel;
+ OwnerThread->AcquiredMutexList->Mutex.OriginalSyncLevel;
Status = AcpiExReleaseMutexObject (ObjDesc);
if (ACPI_FAILURE (Status))
@@ -548,7 +551,7 @@ AcpiExReleaseMutex (
{
/* Restore the previous SyncLevel */
- WalkState->Thread->CurrentSyncLevel = PreviousSyncLevel;
+ OwnerThread->CurrentSyncLevel = PreviousSyncLevel;
}
return_ACPI_STATUS (Status);
}
diff --git a/executer/exnames.c b/executer/exnames.c
index a0ee8a5dbd65..9a2b6e48f45e 100644
--- a/executer/exnames.c
+++ b/executer/exnames.c
@@ -189,7 +189,7 @@ AcpiExAllocateNameString (
if (!NameString)
{
ACPI_ERROR ((AE_INFO,
- "Could not allocate size %d", SizeNeeded));
+ "Could not allocate size %u", SizeNeeded));
return_PTR (NULL);
}
@@ -325,7 +325,7 @@ AcpiExNameSegment (
*/
Status = AE_AML_BAD_NAME;
ACPI_ERROR ((AE_INFO,
- "Bad character %02x in name, at %p",
+ "Bad character 0x%02x in name, at %p",
*AmlAddress, AmlAddress));
}
diff --git a/executer/exoparg1.c b/executer/exoparg1.c
index b7ee459685d9..1bff09b09cc1 100644
--- a/executer/exoparg1.c
+++ b/executer/exoparg1.c
@@ -193,7 +193,7 @@ AcpiExOpcode_0A_0T_1R (
default: /* Unknown opcode */
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
break;
@@ -286,7 +286,7 @@ AcpiExOpcode_1A_0T_0R (
default: /* Unknown opcode */
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
break;
@@ -332,7 +332,7 @@ AcpiExOpcode_1A_1T_0R (
default: /* Unknown opcode */
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
@@ -514,7 +514,7 @@ AcpiExOpcode_1A_1T_1R (
if (Digit > 0)
{
ACPI_ERROR ((AE_INFO,
- "Integer too large to convert to BCD: %8.8X%8.8X",
+ "Integer too large to convert to BCD: 0x%8.8X%8.8X",
ACPI_FORMAT_UINT64 (Operand[0]->Integer.Value)));
Status = AE_AML_NUMERIC_OVERFLOW;
goto Cleanup;
@@ -664,7 +664,7 @@ AcpiExOpcode_1A_1T_1R (
default: /* Unknown opcode */
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
@@ -1116,7 +1116,7 @@ AcpiExOpcode_1A_0T_1R (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Index TargetType %X in reference object %p",
+ "Unknown Index TargetType 0x%X in reference object %p",
Operand[0]->Reference.TargetType, Operand[0]));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
@@ -1143,7 +1143,7 @@ AcpiExOpcode_1A_0T_1R (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown class in reference(%p) - %2.2X",
+ "Unknown class in reference(%p) - 0x%2.2X",
Operand[0], Operand[0]->Reference.Class));
Status = AE_TYPE;
@@ -1155,7 +1155,7 @@ AcpiExOpcode_1A_0T_1R (
default:
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
diff --git a/executer/exoparg2.c b/executer/exoparg2.c
index 81eda0e191b0..d71c91020434 100644
--- a/executer/exoparg2.c
+++ b/executer/exoparg2.c
@@ -246,7 +246,7 @@ AcpiExOpcode_2A_0T_0R (
default:
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
}
@@ -319,7 +319,7 @@ AcpiExOpcode_2A_2T_1R (
default:
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
@@ -555,7 +555,7 @@ AcpiExOpcode_2A_1T_1R (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Index (%X%8.8X) is beyond end of object",
+ "Index (0x%8.8X%8.8X) is beyond end of object",
ACPI_FORMAT_UINT64 (Index)));
goto Cleanup;
}
@@ -579,7 +579,7 @@ AcpiExOpcode_2A_1T_1R (
default:
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
break;
@@ -702,7 +702,7 @@ AcpiExOpcode_2A_0T_1R (
default:
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
diff --git a/executer/exoparg3.c b/executer/exoparg3.c
index 923337cd2737..2bdd56e7dc55 100644
--- a/executer/exoparg3.c
+++ b/executer/exoparg3.c
@@ -206,7 +206,7 @@ AcpiExOpcode_3A_0T_0R (
default:
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
@@ -345,7 +345,7 @@ AcpiExOpcode_3A_1T_1R (
default:
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
diff --git a/executer/exoparg6.c b/executer/exoparg6.c
index 5b35710c9a1e..0c540ed28140 100644
--- a/executer/exoparg6.c
+++ b/executer/exoparg6.c
@@ -337,7 +337,7 @@ AcpiExOpcode_6A_0T_1R (
if (Index >= Operand[0]->Package.Count)
{
ACPI_ERROR ((AE_INFO,
- "Index (%X%8.8X) beyond package end (%X)",
+ "Index (0x%8.8X%8.8X) beyond package end (0x%X)",
ACPI_FORMAT_UINT64 (Index), Operand[0]->Package.Count));
Status = AE_AML_PACKAGE_LIMIT;
goto Cleanup;
@@ -411,7 +411,7 @@ AcpiExOpcode_6A_0T_1R (
default:
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
WalkState->Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
diff --git a/executer/exprep.c b/executer/exprep.c
index d6b144bf848f..6cc371945157 100644
--- a/executer/exprep.c
+++ b/executer/exprep.c
@@ -362,7 +362,7 @@ AcpiExDecodeFieldAccess (
/* Invalid field access type */
ACPI_ERROR ((AE_INFO,
- "Unknown field access type %X",
+ "Unknown field access type 0x%X",
Access));
return_UINT32 (0);
}
@@ -533,7 +533,7 @@ AcpiExPrepFieldValue (
if (Type != ACPI_TYPE_REGION)
{
ACPI_ERROR ((AE_INFO,
- "Needed Region, found type %X (%s)",
+ "Needed Region, found type 0x%X (%s)",
Type, AcpiUtGetTypeName (Type)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
diff --git a/executer/exregion.c b/executer/exregion.c
index f551f1768770..efe83ebc83c3 100644
--- a/executer/exregion.c
+++ b/executer/exregion.c
@@ -188,7 +188,7 @@ AcpiExSystemMemorySpaceHandler (
break;
default:
- ACPI_ERROR ((AE_INFO, "Invalid SystemMemory width %d",
+ ACPI_ERROR ((AE_INFO, "Invalid SystemMemory width %u",
BitWidth));
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
@@ -265,7 +265,7 @@ AcpiExSystemMemorySpaceHandler (
if (!MemInfo->MappedLogicalAddress)
{
ACPI_ERROR ((AE_INFO,
- "Could not map memory at %8.8X%8.8X, size %X",
+ "Could not map memory at 0x%8.8X%8.8X, size %u",
ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength));
MemInfo->MappedLength = 0;
return_ACPI_STATUS (AE_NO_MEMORY);
diff --git a/executer/exresnte.c b/executer/exresnte.c
index a4922c0b7172..59eef550c135 100644
--- a/executer/exresnte.c
+++ b/executer/exresnte.c
@@ -344,7 +344,7 @@ AcpiExResolveNodeToValue (
/* No named references are allowed here */
ACPI_ERROR ((AE_INFO,
- "Unsupported Reference type %X",
+ "Unsupported Reference type 0x%X",
SourceDesc->Reference.Class));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -357,7 +357,7 @@ AcpiExResolveNodeToValue (
/* Default case is for unknown types */
ACPI_ERROR ((AE_INFO,
- "Node %p - Unknown object type %X",
+ "Node %p - Unknown object type 0x%X",
Node, EntryType));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
diff --git a/executer/exresolv.c b/executer/exresolv.c
index f78c119aedcb..f965293c788d 100644
--- a/executer/exresolv.c
+++ b/executer/exresolv.c
@@ -326,7 +326,7 @@ AcpiExResolveObjectToValue (
/* Invalid reference object */
ACPI_ERROR ((AE_INFO,
- "Unknown TargetType %X in Index/Reference object %p",
+ "Unknown TargetType 0x%X in Index/Reference object %p",
StackDesc->Reference.TargetType, StackDesc));
Status = AE_AML_INTERNAL;
break;
@@ -367,7 +367,7 @@ AcpiExResolveObjectToValue (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Reference type %X in %p", RefType, StackDesc));
+ "Unknown Reference type 0x%X in %p", RefType, StackDesc));
Status = AE_AML_INTERNAL;
break;
}
@@ -503,7 +503,7 @@ AcpiExResolveMultiple (
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
{
ACPI_ERROR ((AE_INFO,
- "Not a NS node %p [%s]",
+ "Not a namespace node %p [%s]",
Node, AcpiUtGetDescriptorName (Node)));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -605,7 +605,7 @@ AcpiExResolveMultiple (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Reference Class %2.2X", ObjDesc->Reference.Class));
+ "Unknown Reference Class 0x%2.2X", ObjDesc->Reference.Class));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
}
diff --git a/executer/exresop.c b/executer/exresop.c
index ed60d2a42af6..b9700d6dad40 100644
--- a/executer/exresop.c
+++ b/executer/exresop.c
@@ -243,7 +243,7 @@ AcpiExResolveOperands (
ArgTypes = OpInfo->RuntimeArgs;
if (ArgTypes == ARGI_INVALID_OPCODE)
{
- ACPI_ERROR ((AE_INFO, "Unknown AML opcode %X",
+ ACPI_ERROR ((AE_INFO, "Unknown AML opcode 0x%X",
Opcode));
return_ACPI_STATUS (AE_AML_INTERNAL);
@@ -309,7 +309,7 @@ AcpiExResolveOperands (
if (!AcpiUtValidObjectType (ObjectType))
{
ACPI_ERROR ((AE_INFO,
- "Bad operand object type [%X]", ObjectType));
+ "Bad operand object type [0x%X]", ObjectType));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
@@ -342,7 +342,7 @@ AcpiExResolveOperands (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Reference Class %2.2X in %p",
+ "Unknown Reference Class 0x%2.2X in %p",
ObjDesc->Reference.Class, ObjDesc));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -773,7 +773,7 @@ AcpiExResolveOperands (
/* Unknown type */
ACPI_ERROR ((AE_INFO,
- "Internal - Unknown ARGI (required operand) type %X",
+ "Internal - Unknown ARGI (required operand) type 0x%X",
ThisArgType));
return_ACPI_STATUS (AE_BAD_PARAMETER);
diff --git a/executer/exstore.c b/executer/exstore.c
index 5ff117586799..3e55fe5b1896 100644
--- a/executer/exstore.c
+++ b/executer/exstore.c
@@ -1,4 +1,3 @@
-
/******************************************************************************
*
* Module Name: exstore - AML Interpreter object store support
@@ -129,12 +128,6 @@
/* Local prototypes */
-static void
-AcpiExDoDebugObject (
- ACPI_OPERAND_OBJECT *SourceDesc,
- UINT32 Level,
- UINT32 Index);
-
static ACPI_STATUS
AcpiExStoreObjectToIndex (
ACPI_OPERAND_OBJECT *ValDesc,
@@ -144,218 +137,6 @@ AcpiExStoreObjectToIndex (
/*******************************************************************************
*
- * FUNCTION: AcpiExDoDebugObject
- *
- * PARAMETERS: SourceDesc - Value to be stored
- * Level - Indentation level (used for packages)
- * Index - Current package element, zero if not pkg
- *
- * RETURN: None
- *
- * DESCRIPTION: Handles stores to the Debug Object.
- *
- ******************************************************************************/
-
-static void
-AcpiExDoDebugObject (
- ACPI_OPERAND_OBJECT *SourceDesc,
- UINT32 Level,
- UINT32 Index)
-{
- UINT32 i;
-
-
- ACPI_FUNCTION_TRACE_PTR (ExDoDebugObject, SourceDesc);
-
-
- /* Print line header as long as we are not in the middle of an object display */
-
- if (!((Level > 0) && Index == 0))
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %*s",
- Level, " "));
- }
-
- /* Display index for package output only */
-
- if (Index > 0)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT,
- "(%.2u) ", Index -1));
- }
-
- if (!SourceDesc)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[Null Object]\n"));
- return_VOID;
- }
-
- if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc) == ACPI_DESC_TYPE_OPERAND)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%s ",
- AcpiUtGetObjectTypeName (SourceDesc)));
-
- if (!AcpiUtValidInternalObject (SourceDesc))
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT,
- "%p, Invalid Internal Object!\n", SourceDesc));
- return_VOID;
- }
- }
- else if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc) == ACPI_DESC_TYPE_NAMED)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%s: %p\n",
- AcpiUtGetTypeName (((ACPI_NAMESPACE_NODE *) SourceDesc)->Type),
- SourceDesc));
- return_VOID;
- }
- else
- {
- return_VOID;
- }
-
- /* SourceDesc is of type ACPI_DESC_TYPE_OPERAND */
-
- switch (SourceDesc->Common.Type)
- {
- case ACPI_TYPE_INTEGER:
-
- /* Output correct integer width */
-
- if (AcpiGbl_IntegerByteWidth == 4)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%8.8X\n",
- (UINT32) SourceDesc->Integer.Value));
- }
- else
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%8.8X%8.8X\n",
- ACPI_FORMAT_UINT64 (SourceDesc->Integer.Value)));
- }
- break;
-
- case ACPI_TYPE_BUFFER:
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X]\n",
- (UINT32) SourceDesc->Buffer.Length));
- ACPI_DUMP_BUFFER (SourceDesc->Buffer.Pointer,
- (SourceDesc->Buffer.Length < 256) ? SourceDesc->Buffer.Length : 256);
- break;
-
- case ACPI_TYPE_STRING:
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X] \"%s\"\n",
- SourceDesc->String.Length, SourceDesc->String.Pointer));
- break;
-
- case ACPI_TYPE_PACKAGE:
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[Contains 0x%.2X Elements]\n",
- SourceDesc->Package.Count));
-
- /* Output the entire contents of the package */
-
- for (i = 0; i < SourceDesc->Package.Count; i++)
- {
- AcpiExDoDebugObject (SourceDesc->Package.Elements[i],
- Level+4, i+1);
- }
- break;
-
- case ACPI_TYPE_LOCAL_REFERENCE:
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[%s] ",
- AcpiUtGetReferenceName (SourceDesc)));
-
- /* Decode the reference */
-
- switch (SourceDesc->Reference.Class)
- {
- case ACPI_REFCLASS_INDEX:
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%X\n",
- SourceDesc->Reference.Value));
- break;
-
- case ACPI_REFCLASS_TABLE:
-
- /* Case for DdbHandle */
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Table Index 0x%X\n",
- SourceDesc->Reference.Value));
- return;
-
- default:
- break;
- }
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, " "));
-
- /* Check for valid node first, then valid object */
-
- if (SourceDesc->Reference.Node)
- {
- if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Node) !=
- ACPI_DESC_TYPE_NAMED)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT,
- " %p - Not a valid namespace node\n",
- SourceDesc->Reference.Node));
- }
- else
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Node %p [%4.4s] ",
- SourceDesc->Reference.Node, (SourceDesc->Reference.Node)->Name.Ascii));
-
- switch ((SourceDesc->Reference.Node)->Type)
- {
- /* These types have no attached object */
-
- case ACPI_TYPE_DEVICE:
- AcpiOsPrintf ("Device\n");
- break;
-
- case ACPI_TYPE_THERMAL:
- AcpiOsPrintf ("Thermal Zone\n");
- break;
-
- default:
- AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
- Level+4, 0);
- break;
- }
- }
- }
- else if (SourceDesc->Reference.Object)
- {
- if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Object) ==
- ACPI_DESC_TYPE_NAMED)
- {
- AcpiExDoDebugObject (((ACPI_NAMESPACE_NODE *)
- SourceDesc->Reference.Object)->Object,
- Level+4, 0);
- }
- else
- {
- AcpiExDoDebugObject (SourceDesc->Reference.Object, Level+4, 0);
- }
- }
- break;
-
- default:
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%p\n",
- SourceDesc));
- break;
- }
-
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_EXEC, "\n"));
- return_VOID;
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiExStore
*
* PARAMETERS: *SourceDesc - Value to be stored
@@ -487,13 +268,13 @@ AcpiExStore (
"**** Write to Debug Object: Object %p %s ****:\n\n",
SourceDesc, AcpiUtGetObjectTypeName (SourceDesc)));
- AcpiExDoDebugObject (SourceDesc, 0, 0);
+ ACPI_DEBUG_OBJECT (SourceDesc, 0, 0);
break;
default:
- ACPI_ERROR ((AE_INFO, "Unknown Reference Class %2.2X",
+ ACPI_ERROR ((AE_INFO, "Unknown Reference Class 0x%2.2X",
RefDesc->Reference.Class));
ACPI_DUMP_ENTRY (RefDesc, ACPI_LV_INFO);
diff --git a/executer/exsystem.c b/executer/exsystem.c
index 9f4583fc1383..f43ef215527f 100644
--- a/executer/exsystem.c
+++ b/executer/exsystem.c
@@ -265,7 +265,7 @@ AcpiExSystemDoStall (
* (ACPI specifies 100 usec as max, but this gives some slack in
* order to support existing BIOSs)
*/
- ACPI_ERROR ((AE_INFO, "Time parameter is too large (%d)",
+ ACPI_ERROR ((AE_INFO, "Time parameter is too large (%u)",
HowLong));
Status = AE_AML_OPERAND_VALUE;
}
diff --git a/hardware/hwregs.c b/hardware/hwregs.c
index 60ca92cc8143..cee244450d79 100644
--- a/hardware/hwregs.c
+++ b/hardware/hwregs.c
@@ -412,7 +412,7 @@ AcpiHwGetBitRegisterInfo (
if (RegisterId > ACPI_BITREG_MAX)
{
- ACPI_ERROR ((AE_INFO, "Invalid BitRegister ID: %X", RegisterId));
+ ACPI_ERROR ((AE_INFO, "Invalid BitRegister ID: 0x%X", RegisterId));
return (NULL);
}
@@ -539,7 +539,7 @@ AcpiHwRegisterRead (
default:
- ACPI_ERROR ((AE_INFO, "Unknown Register ID: %X",
+ ACPI_ERROR ((AE_INFO, "Unknown Register ID: 0x%X",
RegisterId));
Status = AE_BAD_PARAMETER;
break;
@@ -682,7 +682,7 @@ AcpiHwRegisterWrite (
default:
- ACPI_ERROR ((AE_INFO, "Unknown Register ID: %X",
+ ACPI_ERROR ((AE_INFO, "Unknown Register ID: 0x%X",
RegisterId));
Status = AE_BAD_PARAMETER;
break;
diff --git a/hardware/hwsleep.c b/hardware/hwsleep.c
index ad6ad1e796f0..d9e38061b7c3 100644
--- a/hardware/hwsleep.c
+++ b/hardware/hwsleep.c
@@ -319,7 +319,7 @@ AcpiEnterSleepState (
if ((AcpiGbl_SleepTypeA > ACPI_SLEEP_TYPE_MAX) ||
(AcpiGbl_SleepTypeB > ACPI_SLEEP_TYPE_MAX))
{
- ACPI_ERROR ((AE_INFO, "Sleep values out of range: A=%X B=%X",
+ ACPI_ERROR ((AE_INFO, "Sleep values out of range: A=0x%X B=0x%X",
AcpiGbl_SleepTypeA, AcpiGbl_SleepTypeB));
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
}
diff --git a/hardware/hwvalid.c b/hardware/hwvalid.c
index 905dc7950f04..23b508b0a21f 100644
--- a/hardware/hwvalid.c
+++ b/hardware/hwvalid.c
@@ -237,7 +237,7 @@ AcpiHwValidateIoRequest (
if (LastAddress > ACPI_UINT16_MAX)
{
ACPI_ERROR ((AE_INFO,
- "Illegal I/O port address/length above 64K: 0x%p/%X",
+ "Illegal I/O port address/length above 64K: %p/0x%X",
ACPI_CAST_PTR (void, Address), ByteWidth));
return_ACPI_STATUS (AE_LIMIT);
}
diff --git a/include/acdisasm.h b/include/acdisasm.h
index 1fe077b059a1..ab32086e2f28 100644
--- a/include/acdisasm.h
+++ b/include/acdisasm.h
@@ -286,6 +286,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt10[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoMchi[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMsct0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
diff --git a/include/acglobal.h b/include/acglobal.h
index 4469ee334e3b..0df0c2719ecf 100644
--- a/include/acglobal.h
+++ b/include/acglobal.h
@@ -186,6 +186,11 @@ UINT8 ACPI_INIT_GLOBAL (AcpiGbl_LeaveWakeGpesDisabled, TRUE);
*/
UINT8 ACPI_INIT_GLOBAL (AcpiGbl_UseDefaultRegisterWidths, TRUE);
+/*
+ * Optionally enable output from the AML Debug Object.
+ */
+UINT8 ACPI_INIT_GLOBAL (AcpiGbl_EnableAmlDebugObject, FALSE);
+
/* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */
diff --git a/include/acinterp.h b/include/acinterp.h
index de7dbf8030eb..67142c8911b5 100644
--- a/include/acinterp.h
+++ b/include/acinterp.h
@@ -203,6 +203,16 @@ AcpiExConvertToTargetType (
/*
+ * exdebug - AML debug object
+ */
+void
+AcpiExDoDebugObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ UINT32 Level,
+ UINT32 Index);
+
+
+/*
* exfield - ACPI AML (p-code) execution - field manipulation
*/
ACPI_STATUS
diff --git a/include/acoutput.h b/include/acoutput.h
index 8018fed53842..8fca0de33953 100644
--- a/include/acoutput.h
+++ b/include/acoutput.h
@@ -281,6 +281,7 @@
#define ACPI_WARNING(plist) AcpiWarning plist
#define ACPI_EXCEPTION(plist) AcpiException plist
#define ACPI_ERROR(plist) AcpiError plist
+#define ACPI_DEBUG_OBJECT(obj,l,i) AcpiExDoDebugObject(obj,l,i)
#else
@@ -290,6 +291,7 @@
#define ACPI_WARNING(plist)
#define ACPI_EXCEPTION(plist)
#define ACPI_ERROR(plist)
+#define ACPI_DEBUG_OBJECT(obj,l,i)
#endif /* ACPI_NO_ERROR_MESSAGES */
diff --git a/include/acpixf.h b/include/acpixf.h
index c67b8b9f4587..220350afc807 100644
--- a/include/acpixf.h
+++ b/include/acpixf.h
@@ -120,7 +120,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20100121
+#define ACPI_CA_VERSION 0x20100304
#include "actypes.h"
#include "actbl.h"
@@ -145,6 +145,7 @@ extern UINT8 AcpiGbl_LeaveWakeGpesDisabled;
extern UINT8 AcpiGbl_UseDefaultRegisterWidths;
extern ACPI_NAME AcpiGbl_TraceMethodName;
extern UINT32 AcpiGbl_TraceFlags;
+extern UINT8 AcpiGbl_EnableAmlDebugObject;
/*
diff --git a/include/actbl2.h b/include/actbl2.h
index c96715d3c05e..7f6ecf84a93c 100644
--- a/include/actbl2.h
+++ b/include/actbl2.h
@@ -143,6 +143,7 @@
#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
+#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
@@ -864,6 +865,35 @@ typedef struct acpi_mcfg_allocation
/*******************************************************************************
*
+ * MCHI - Management Controller Host Interface Table
+ * Version 1
+ *
+ * Conforms to "Management Component Transport Protocol (MCTP) Host
+ * Interface Specification", Revision 1.0.0a, October 13, 2009
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_mchi
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 InterfaceType;
+ UINT8 Protocol;
+ UINT64 ProtocolData;
+ UINT8 InterruptType;
+ UINT8 Gpe;
+ UINT8 PciDeviceFlag;
+ UINT32 GlobalInterrupt;
+ ACPI_GENERIC_ADDRESS ControlRegister;
+ UINT8 PciSegment;
+ UINT8 PciBus;
+ UINT8 PciDevice;
+ UINT8 PciFunction;
+
+} ACPI_TABLE_MCHI;
+
+
+/*******************************************************************************
+ *
* SPCR - Serial Port Console Redirection table
* Version 1
*
diff --git a/namespace/nsaccess.c b/namespace/nsaccess.c
index 86f412a9c897..7a8dc6d1a77e 100644
--- a/namespace/nsaccess.c
+++ b/namespace/nsaccess.c
@@ -306,7 +306,7 @@ AcpiNsRootInitialize (
default:
- ACPI_ERROR ((AE_INFO, "Unsupported initial type value %X",
+ ACPI_ERROR ((AE_INFO, "Unsupported initial type value 0x%X",
InitVal->Type));
AcpiUtRemoveReference (ObjDesc);
ObjDesc = NULL;
diff --git a/namespace/nsdump.c b/namespace/nsdump.c
index a0dd59e3d203..0b0af613f24d 100644
--- a/namespace/nsdump.c
+++ b/namespace/nsdump.c
@@ -314,7 +314,7 @@ AcpiNsDumpOneObject (
if (Type > ACPI_TYPE_LOCAL_MAX)
{
- ACPI_WARNING ((AE_INFO, "Invalid ACPI Object Type %08X", Type));
+ ACPI_WARNING ((AE_INFO, "Invalid ACPI Object Type 0x%08X", Type));
}
AcpiOsPrintf ("%4.4s", AcpiUtGetNodeName (ThisNode));
diff --git a/namespace/nsnames.c b/namespace/nsnames.c
index 9423d561b71a..7eb3e549bf93 100644
--- a/namespace/nsnames.c
+++ b/namespace/nsnames.c
@@ -191,7 +191,7 @@ AcpiNsBuildExternalPath (
if (Index != 0)
{
ACPI_ERROR ((AE_INFO,
- "Could not construct external pathname; index=%X, size=%X, Path=%s",
+ "Could not construct external pathname; index=%u, size=%u, Path=%s",
(UINT32) Index, (UINT32) Size, &NameBuffer[Size]));
return (AE_BAD_PARAMETER);
diff --git a/namespace/nssearch.c b/namespace/nssearch.c
index b17f60f7bd90..fa15b9c5bb0f 100644
--- a/namespace/nssearch.c
+++ b/namespace/nssearch.c
@@ -397,7 +397,7 @@ AcpiNsSearchAndEnter (
if (!Node || !TargetName || !ReturnNode)
{
ACPI_ERROR ((AE_INFO,
- "Null parameter: Node %p Name %X ReturnNode %p",
+ "Null parameter: Node %p Name 0x%X ReturnNode %p",
Node, TargetName, ReturnNode));
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
diff --git a/namespace/nsutils.c b/namespace/nsutils.c
index ee40473aaf3e..98ec9ff3c4b6 100644
--- a/namespace/nsutils.c
+++ b/namespace/nsutils.c
@@ -389,7 +389,7 @@ AcpiNsLocal (
{
/* Type code out of range */
- ACPI_WARNING ((AE_INFO, "Invalid Object Type %X", Type));
+ ACPI_WARNING ((AE_INFO, "Invalid Object Type 0x%X", Type));
return_UINT32 (ACPI_NS_NORMAL);
}
@@ -965,7 +965,7 @@ AcpiNsOpensScope (
{
/* type code out of range */
- ACPI_WARNING ((AE_INFO, "Invalid Object Type %X", Type));
+ ACPI_WARNING ((AE_INFO, "Invalid Object Type 0x%X", Type));
return_UINT32 (ACPI_NS_NORMAL);
}
diff --git a/os_specific/service_layers/oswinxf.c b/os_specific/service_layers/oswinxf.c
index c932c2ca6c96..3e441968e099 100644
--- a/os_specific/service_layers/oswinxf.c
+++ b/os_specific/service_layers/oswinxf.c
@@ -727,7 +727,7 @@ AcpiOsCreateSemaphore (
if (i >= ACPI_OS_MAX_SEMAPHORES)
{
ACPI_EXCEPTION ((AE_INFO, AE_LIMIT,
- "Reached max semaphores (%d), could not create", ACPI_OS_MAX_SEMAPHORES));
+ "Reached max semaphores (%u), could not create", ACPI_OS_MAX_SEMAPHORES));
return AE_LIMIT;
}
@@ -862,7 +862,7 @@ AcpiOsWaitSemaphore (
if (AcpiGbl_Semaphores[Index].CurrentUnits == 0)
{
- ACPI_ERROR ((AE_INFO, "%s - No unit received. Timeout %X, OSstatus 0x%X",
+ ACPI_ERROR ((AE_INFO, "%s - No unit received. Timeout 0x%X, OS_Status 0x%X",
AcpiUtGetMutexName (Index), Timeout, WaitStatus));
return AE_OK;
@@ -923,7 +923,7 @@ AcpiOsSignalSemaphore (
AcpiGbl_Semaphores[Index].MaxUnits)
{
ACPI_ERROR ((AE_INFO,
- "Oversignalled semaphore[%d]! Current %d Max %d",
+ "Oversignalled semaphore[%u]! Current %u Max %u",
Index, AcpiGbl_Semaphores[Index].CurrentUnits,
AcpiGbl_Semaphores[Index].MaxUnits));
@@ -1409,3 +1409,78 @@ AcpiOsSignal (
return (AE_OK);
}
+
+/******************************************************************************
+ *
+ * FUNCTION: Local cache interfaces
+ *
+ * DESCRIPTION: Implements cache interfaces via malloc/free for testing
+ * purposes only.
+ *
+ *****************************************************************************/
+
+#ifndef ACPI_USE_LOCAL_CACHE
+
+ACPI_STATUS
+AcpiOsCreateCache (
+ char *CacheName,
+ UINT16 ObjectSize,
+ UINT16 MaxDepth,
+ ACPI_CACHE_T **ReturnCache)
+{
+ ACPI_MEMORY_LIST *NewCache;
+
+
+ NewCache = malloc (sizeof (ACPI_MEMORY_LIST));
+ if (!NewCache)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ memset (NewCache, 0, sizeof (ACPI_MEMORY_LIST));
+ NewCache->LinkOffset = 8;
+ NewCache->ListName = CacheName;
+ NewCache->ObjectSize = ObjectSize;
+ NewCache->MaxDepth = MaxDepth;
+
+ *ReturnCache = (ACPI_CACHE_T) NewCache;
+ return (AE_OK);
+}
+
+ACPI_STATUS
+AcpiOsDeleteCache (
+ ACPI_CACHE_T *Cache)
+{
+ free (Cache);
+ return (AE_OK);
+}
+
+ACPI_STATUS
+AcpiOsPurgeCache (
+ ACPI_CACHE_T *Cache)
+{
+ return (AE_OK);
+}
+
+void *
+AcpiOsAcquireObject (
+ ACPI_CACHE_T *Cache)
+{
+ void *NewObject;
+
+ NewObject = malloc (((ACPI_MEMORY_LIST *) Cache)->ObjectSize);
+ memset (NewObject, 0, ((ACPI_MEMORY_LIST *) Cache)->ObjectSize);
+
+ return (NewObject);
+}
+
+ACPI_STATUS
+AcpiOsReleaseObject (
+ ACPI_CACHE_T *Cache,
+ void *Object)
+{
+ free (Object);
+ return (AE_OK);
+}
+
+#endif
diff --git a/parser/psargs.c b/parser/psargs.c
index 78127e5d4d33..35cc45188a04 100644
--- a/parser/psargs.c
+++ b/parser/psargs.c
@@ -577,7 +577,7 @@ AcpiPsGetNextSimpleArg (
default:
- ACPI_ERROR ((AE_INFO, "Invalid ArgType %X", ArgType));
+ ACPI_ERROR ((AE_INFO, "Invalid ArgType 0x%X", ArgType));
return_VOID;
}
@@ -883,7 +883,7 @@ AcpiPsGetNextArg (
default:
- ACPI_ERROR ((AE_INFO, "Invalid ArgType: %X", ArgType));
+ ACPI_ERROR ((AE_INFO, "Invalid ArgType: 0x%X", ArgType));
Status = AE_AML_OPERAND_TYPE;
break;
}
diff --git a/parser/psloop.c b/parser/psloop.c
index 67f79261f3f8..e3e2d0ca6bf2 100644
--- a/parser/psloop.c
+++ b/parser/psloop.c
@@ -228,7 +228,7 @@ AcpiPsGetAmlOpcode (
/* The opcode is unrecognized. Just skip unknown opcodes */
ACPI_ERROR ((AE_INFO,
- "Found unknown opcode %X at AML address %p offset %X, ignoring",
+ "Found unknown opcode 0x%X at AML address %p offset 0x%X, ignoring",
WalkState->Opcode, WalkState->ParserState.Aml, WalkState->AmlOffset));
ACPI_DUMP_BUFFER (WalkState->ParserState.Aml, 128);
@@ -1149,7 +1149,6 @@ AcpiPsParseLoop (
{
ACPI_EXCEPTION ((AE_INFO, Status,
"Invoked method did not return a value"));
-
}
ACPI_EXCEPTION ((AE_INFO, Status, "GetPredicate Failed"));
diff --git a/resources/rscreate.c b/resources/rscreate.c
index c2929aa43044..5f78b9e5ee2c 100644
--- a/resources/rscreate.c
+++ b/resources/rscreate.c
@@ -301,7 +301,7 @@ AcpiRsCreatePciRoutingTable (
if ((*TopObjectList)->Common.Type != ACPI_TYPE_PACKAGE)
{
ACPI_ERROR ((AE_INFO,
- "(PRT[%X]) Need sub-package, found %s",
+ "(PRT[%u]) Need sub-package, found %s",
Index, AcpiUtGetObjectTypeName (*TopObjectList)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
@@ -311,7 +311,7 @@ AcpiRsCreatePciRoutingTable (
if ((*TopObjectList)->Package.Count != 4)
{
ACPI_ERROR ((AE_INFO,
- "(PRT[%X]) Need package of length 4, found length %d",
+ "(PRT[%u]) Need package of length 4, found length %u",
Index, (*TopObjectList)->Package.Count));
return_ACPI_STATUS (AE_AML_PACKAGE_LIMIT);
}
@@ -328,7 +328,7 @@ AcpiRsCreatePciRoutingTable (
ObjDesc = SubObjectList[0];
if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
- ACPI_ERROR ((AE_INFO, "(PRT[%X].Address) Need Integer, found %s",
+ ACPI_ERROR ((AE_INFO, "(PRT[%u].Address) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
return_ACPI_STATUS (AE_BAD_DATA);
}
@@ -340,7 +340,7 @@ AcpiRsCreatePciRoutingTable (
ObjDesc = SubObjectList[1];
if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
- ACPI_ERROR ((AE_INFO, "(PRT[%X].Pin) Need Integer, found %s",
+ ACPI_ERROR ((AE_INFO, "(PRT[%u].Pin) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
return_ACPI_STATUS (AE_BAD_DATA);
}
@@ -378,7 +378,7 @@ AcpiRsCreatePciRoutingTable (
if (ObjDesc->Reference.Class != ACPI_REFCLASS_NAME)
{
ACPI_ERROR ((AE_INFO,
- "(PRT[%X].Source) Need name, found Reference Class %X",
+ "(PRT[%u].Source) Need name, found Reference Class 0x%X",
Index, ObjDesc->Reference.Class));
return_ACPI_STATUS (AE_BAD_DATA);
}
@@ -426,7 +426,7 @@ AcpiRsCreatePciRoutingTable (
default:
ACPI_ERROR ((AE_INFO,
- "(PRT[%X].Source) Need Ref/String/Integer, found %s",
+ "(PRT[%u].Source) Need Ref/String/Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
return_ACPI_STATUS (AE_BAD_DATA);
}
@@ -442,7 +442,7 @@ AcpiRsCreatePciRoutingTable (
if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
ACPI_ERROR ((AE_INFO,
- "(PRT[%X].SourceIndex) Need Integer, found %s",
+ "(PRT[%u].SourceIndex) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
return_ACPI_STATUS (AE_BAD_DATA);
}
diff --git a/resources/rslist.c b/resources/rslist.c
index 8d31a9151975..75f50487a3fc 100644
--- a/resources/rslist.c
+++ b/resources/rslist.c
@@ -174,7 +174,7 @@ AcpiRsConvertAmlToResources (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Could not convert AML resource (Type %X)", *Aml));
+ "Could not convert AML resource (Type 0x%X)", *Aml));
return_ACPI_STATUS (Status);
}
@@ -232,7 +232,7 @@ AcpiRsConvertResourcesToAml (
if (Resource->Type > ACPI_RESOURCE_TYPE_MAX)
{
ACPI_ERROR ((AE_INFO,
- "Invalid descriptor type (%X) in resource list",
+ "Invalid descriptor type (0x%X) in resource list",
Resource->Type));
return_ACPI_STATUS (AE_BAD_DATA);
}
@@ -245,7 +245,7 @@ AcpiRsConvertResourcesToAml (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Could not convert resource (type %X) to AML",
+ "Could not convert resource (type 0x%X) to AML",
Resource->Type));
return_ACPI_STATUS (Status);
}
diff --git a/resources/rsmisc.c b/resources/rsmisc.c
index ecea3e0c1aff..191c7a91c9ca 100644
--- a/resources/rsmisc.c
+++ b/resources/rsmisc.c
@@ -171,7 +171,7 @@ AcpiRsConvertAmlToResource (
/* Each internal resource struct is expected to be 32-bit aligned */
ACPI_WARNING ((AE_INFO,
- "Misaligned resource pointer (get): %p Type %2.2X Len %X",
+ "Misaligned resource pointer (get): %p Type 0x%2.2X Length %u",
Resource, Resource->Type, Resource->Length));
}
@@ -659,7 +659,7 @@ Exit:
* "IRQ Format"), so 0x00 and 0x09 are illegal.
*/
ACPI_ERROR ((AE_INFO,
- "Invalid interrupt polarity/trigger in resource list, %X",
+ "Invalid interrupt polarity/trigger in resource list, 0x%X",
Aml->Irq.Flags));
return_ACPI_STATUS (AE_BAD_DATA);
}
diff --git a/tables/tbfadt.c b/tables/tbfadt.c
index b6d32f3cc14c..9ae4669d94ae 100644
--- a/tables/tbfadt.c
+++ b/tables/tbfadt.c
@@ -388,7 +388,7 @@ AcpiTbCreateLocalFadt (
{
ACPI_WARNING ((AE_INFO,
"FADT (revision %u) is longer than ACPI 2.0 version, "
- "truncating length 0x%X to 0x%X",
+ "truncating length %u to %u",
Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT)));
}
@@ -521,7 +521,7 @@ AcpiTbConvertFadt (
(Address64->Address != (UINT64) Address32))
{
ACPI_ERROR ((AE_INFO,
- "32/64X address mismatch in %s: %8.8X/%8.8X%8.8X, using 32",
+ "32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32",
FadtInfoTable[i].Name, Address32,
ACPI_FORMAT_UINT64 (Address64->Address)));
}
@@ -582,7 +582,7 @@ AcpiTbValidateFadt (
{
ACPI_WARNING ((AE_INFO,
"32/64X FACS address mismatch in FADT - "
- "%8.8X/%8.8X%8.8X, using 32",
+ "0x%8.8X/0x%8.8X%8.8X, using 32",
AcpiGbl_FADT.Facs, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XFacs)));
AcpiGbl_FADT.XFacs = (UINT64) AcpiGbl_FADT.Facs;
@@ -593,7 +593,7 @@ AcpiTbValidateFadt (
{
ACPI_WARNING ((AE_INFO,
"32/64X DSDT address mismatch in FADT - "
- "%8.8X/%8.8X%8.8X, using 32",
+ "0x%8.8X/0x%8.8X%8.8X, using 32",
AcpiGbl_FADT.Dsdt, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XDsdt)));
AcpiGbl_FADT.XDsdt = (UINT64) AcpiGbl_FADT.Dsdt;
@@ -621,7 +621,7 @@ AcpiTbValidateFadt (
(Address64->BitWidth != ACPI_MUL_8 (Length)))
{
ACPI_WARNING ((AE_INFO,
- "32/64X length mismatch in %s: %d/%d",
+ "32/64X length mismatch in %s: %u/%u",
Name, ACPI_MUL_8 (Length), Address64->BitWidth));
}
@@ -635,7 +635,7 @@ AcpiTbValidateFadt (
{
ACPI_ERROR ((AE_INFO,
"Required field %s has zero address and/or length:"
- " %8.8X%8.8X/%X",
+ " 0x%8.8X%8.8X/0x%X",
Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
}
}
@@ -651,7 +651,7 @@ AcpiTbValidateFadt (
{
ACPI_WARNING ((AE_INFO,
"Optional field %s has zero address or length: "
- "%8.8X%8.8X/%X",
+ "0x%8.8X%8.8X/0x%X",
Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
}
}
@@ -702,7 +702,7 @@ AcpiTbSetupFadtRegisters (
(FadtInfoTable[i].DefaultLength != Target64->BitWidth))
{
ACPI_WARNING ((AE_INFO,
- "Invalid length for %s: %d, using default %d",
+ "Invalid length for %s: %u, using default %u",
FadtInfoTable[i].Name, Target64->BitWidth,
FadtInfoTable[i].DefaultLength));
diff --git a/tables/tbutils.c b/tables/tbutils.c
index 0959ab25a5fc..a496556f43e3 100644
--- a/tables/tbutils.c
+++ b/tables/tbutils.c
@@ -349,7 +349,7 @@ AcpiTbVerifyChecksum (
if (Checksum)
{
ACPI_WARNING ((AE_INFO,
- "Incorrect checksum in table [%4.4s] - %2.2X, should be %2.2X",
+ "Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X",
Table->Signature, Table->Checksum,
(UINT8) (Table->Checksum - Checksum)));
@@ -552,7 +552,7 @@ AcpiTbGetRootTableEntry (
/* Will truncate 64-bit address to 32 bits, issue warning */
ACPI_WARNING ((AE_INFO,
- "64-bit Physical Address in XSDT is too large (%8.8X%8.8X),"
+ "64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X),"
" truncating",
ACPI_FORMAT_UINT64 (Address64)));
}
diff --git a/tables/tbxfroot.c b/tables/tbxfroot.c
index 4f0ab81084a1..6f120063b72e 100644
--- a/tables/tbxfroot.c
+++ b/tables/tbxfroot.c
@@ -227,7 +227,7 @@ AcpiFindRootPointer (
if (!TablePtr)
{
ACPI_ERROR ((AE_INFO,
- "Could not map memory at %8.8X for length %X",
+ "Could not map memory at 0x%8.8X for length %u",
ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -254,7 +254,7 @@ AcpiFindRootPointer (
if (!TablePtr)
{
ACPI_ERROR ((AE_INFO,
- "Could not map memory at %8.8X for length %X",
+ "Could not map memory at 0x%8.8X for length %u",
PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
return_ACPI_STATUS (AE_NO_MEMORY);
@@ -284,7 +284,7 @@ AcpiFindRootPointer (
if (!TablePtr)
{
ACPI_ERROR ((AE_INFO,
- "Could not map memory at %8.8X for length %X",
+ "Could not map memory at 0x%8.8X for length %u",
ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
return_ACPI_STATUS (AE_NO_MEMORY);
diff --git a/tools/acpiexec/Makefile b/tools/acpiexec/Makefile
index 2022bbbf3bb2..f21adcbe88f6 100644
--- a/tools/acpiexec/Makefile
+++ b/tools/acpiexec/Makefile
@@ -49,6 +49,7 @@ SRCS= aetables.c aehandlers.c aeexec.c aemain.c \
../../executer/exconfig.c \
../../executer/exconvrt.c \
../../executer/excreate.c \
+ ../../executer/exdebug.c \
../../executer/exdump.c \
../../executer/exfield.c \
../../executer/exfldio.c \
diff --git a/tools/acpiexec/aehandlers.c b/tools/acpiexec/aehandlers.c
index 28450cec74b6..53424f61e5cb 100644
--- a/tools/acpiexec/aehandlers.c
+++ b/tools/acpiexec/aehandlers.c
@@ -922,7 +922,7 @@ AeRegionHandler (
((UINT64)(RegionElement->Address) + RegionElement->Length))
{
ACPI_WARNING ((AE_INFO,
- "Request on [%4.4s] is beyond region limit Req-%X+%X, Base=%X, Len-%X",
+ "Request on [%4.4s] is beyond region limit Req-0x%X+0x%X, Base=0x%X, Len-0x%X",
(RegionObject->Region.Node)->Name.Ascii, (UINT32) Address,
ByteWidth, (UINT32)(RegionElement->Address),
RegionElement->Length));
diff --git a/tools/acpisrc/astable.c b/tools/acpisrc/astable.c
index 2a9eee6b673d..51c7f3d00c75 100644
--- a/tools/acpisrc/astable.c
+++ b/tools/acpisrc/astable.c
@@ -523,6 +523,7 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
{"ACPI_TABLE_IVRS", SRC_TYPE_STRUCT},
{"ACPI_TABLE_MADT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_MCFG", SRC_TYPE_STRUCT},
+ {"ACPI_TABLE_MCHI", SRC_TYPE_STRUCT},
{"ACPI_TABLE_MSCT", SRC_TYPE_STRUCT},
{"ACPI_TABLE_RSDP", SRC_TYPE_STRUCT},
{"ACPI_TABLE_RSDT", SRC_TYPE_STRUCT},
diff --git a/tools/examples/examples.c b/tools/examples/examples.c
index dc88bae62cb6..53623d93446b 100644
--- a/tools/examples/examples.c
+++ b/tools/examples/examples.c
@@ -393,7 +393,7 @@ NotifyHandler (
void *Context)
{
- ACPI_INFO ((AE_INFO, "Received a notify %X", Value));
+ ACPI_INFO ((AE_INFO, "Received a notify 0x%X", Value));
}
@@ -482,7 +482,7 @@ ExecuteOSI (void)
AcpiOsPrintf ("Invalid return type from _OSI, %.2X\n", Object->Type);
}
- ACPI_INFO ((AE_INFO, "_OSI returned %.8X", (UINT32) Object->Integer.Value));
+ ACPI_INFO ((AE_INFO, "_OSI returned 0x%8.8X", (UINT32) Object->Integer.Value));
AcpiOsFree (Object);
return;
}
diff --git a/utilities/utalloc.c b/utilities/utalloc.c
index f72959a4d82a..f2478b2962e2 100644
--- a/utilities/utalloc.c
+++ b/utilities/utalloc.c
@@ -438,7 +438,7 @@ AcpiUtAllocate (
/* Report allocation error */
ACPI_WARNING ((Module, Line,
- "Could not allocate size %X", (UINT32) Size));
+ "Could not allocate size %u", (UINT32) Size));
return_PTR (NULL);
}
diff --git a/utilities/utdelete.c b/utilities/utdelete.c
index 31bf40b4e745..7ef61f8b065e 100644
--- a/utilities/utdelete.c
+++ b/utilities/utdelete.c
@@ -539,7 +539,7 @@ AcpiUtUpdateRefCount (
default:
- ACPI_ERROR ((AE_INFO, "Unknown action (%X)", Action));
+ ACPI_ERROR ((AE_INFO, "Unknown action (0x%X)", Action));
break;
}
@@ -550,7 +550,7 @@ AcpiUtUpdateRefCount (
if (Count > ACPI_MAX_REFERENCE_COUNT)
{
ACPI_WARNING ((AE_INFO,
- "Large Reference Count (%X) in object %p", Count, Object));
+ "Large Reference Count (0x%X) in object %p", Count, Object));
}
}
diff --git a/utilities/uteval.c b/utilities/uteval.c
index c959d44bb594..bb7110bf18e4 100644
--- a/utilities/uteval.c
+++ b/utilities/uteval.c
@@ -381,7 +381,7 @@ AcpiUtEvaluateObject (
PrefixNode, Path, AE_TYPE);
ACPI_ERROR ((AE_INFO,
- "Type returned from %s was incorrect: %s, expected Btypes: %X",
+ "Type returned from %s was incorrect: %s, expected Btypes: 0x%X",
Path, AcpiUtGetObjectTypeName (Info->ReturnObject),
ExpectedReturnBtypes));
diff --git a/utilities/utmisc.c b/utilities/utmisc.c
index 37b15e2c4c7b..8357aceb318d 100644
--- a/utilities/utmisc.c
+++ b/utilities/utmisc.c
@@ -308,7 +308,7 @@ AcpiUtAllocateOwnerId (
if (*OwnerId)
{
- ACPI_ERROR ((AE_INFO, "Owner ID [%2.2X] already exists", *OwnerId));
+ ACPI_ERROR ((AE_INFO, "Owner ID [0x%2.2X] already exists", *OwnerId));
return_ACPI_STATUS (AE_ALREADY_EXISTS);
}
@@ -427,7 +427,7 @@ AcpiUtReleaseOwnerId (
if (OwnerId == 0)
{
- ACPI_ERROR ((AE_INFO, "Invalid OwnerId: %2.2X", OwnerId));
+ ACPI_ERROR ((AE_INFO, "Invalid OwnerId: 0x%2.2X", OwnerId));
return_VOID;
}
@@ -457,7 +457,7 @@ AcpiUtReleaseOwnerId (
else
{
ACPI_ERROR ((AE_INFO,
- "Release of non-allocated OwnerId: %2.2X", OwnerId + 1));
+ "Release of non-allocated OwnerId: 0x%2.2X", OwnerId + 1));
}
(void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);
diff --git a/utilities/utmutex.c b/utilities/utmutex.c
index 9e0ed3b713c7..ec29616eb2d7 100644
--- a/utilities/utmutex.c
+++ b/utilities/utmutex.c
@@ -374,7 +374,7 @@ AcpiUtAcquireMutex (
else
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "Thread %p could not acquire Mutex [%X]",
+ "Thread %p could not acquire Mutex [0x%X]",
ACPI_CAST_PTR (void, ThisThreadId), MutexId));
}
@@ -419,7 +419,7 @@ AcpiUtReleaseMutex (
if (AcpiGbl_MutexInfo[MutexId].ThreadId == ACPI_MUTEX_NOT_ACQUIRED)
{
ACPI_ERROR ((AE_INFO,
- "Mutex [%X] is not acquired, cannot release", MutexId));
+ "Mutex [0x%X] is not acquired, cannot release", MutexId));
return (AE_NOT_ACQUIRED);
}
diff --git a/utilities/utobject.c b/utilities/utobject.c
index fabed520c798..0a9f1e7f6f0d 100644
--- a/utilities/utobject.c
+++ b/utilities/utobject.c
@@ -354,7 +354,7 @@ AcpiUtCreateBufferObject (
Buffer = ACPI_ALLOCATE_ZEROED (BufferSize);
if (!Buffer)
{
- ACPI_ERROR ((AE_INFO, "Could not allocate size %X",
+ ACPI_ERROR ((AE_INFO, "Could not allocate size %u",
(UINT32) BufferSize));
AcpiUtRemoveReference (BufferDesc);
return_PTR (NULL);
@@ -413,7 +413,7 @@ AcpiUtCreateStringObject (
String = ACPI_ALLOCATE_ZEROED (StringSize + 1);
if (!String)
{
- ACPI_ERROR ((AE_INFO, "Could not allocate size %X",
+ ACPI_ERROR ((AE_INFO, "Could not allocate size %u",
(UINT32) StringSize));
AcpiUtRemoveReference (StringDesc);
return_PTR (NULL);
@@ -671,7 +671,7 @@ AcpiUtGetSimpleObjectSize (
* required eventually.
*/
ACPI_ERROR ((AE_INFO, "Cannot convert to external object - "
- "unsupported Reference Class [%s] %X in object %p",
+ "unsupported Reference Class [%s] 0x%X in object %p",
AcpiUtGetReferenceName (InternalObject),
InternalObject->Reference.Class, InternalObject));
Status = AE_TYPE;
@@ -683,7 +683,7 @@ AcpiUtGetSimpleObjectSize (
default:
ACPI_ERROR ((AE_INFO, "Cannot convert to external object - "
- "unsupported type [%s] %X in object %p",
+ "unsupported type [%s] 0x%X in object %p",
AcpiUtGetObjectTypeName (InternalObject),
InternalObject->Common.Type, InternalObject));
Status = AE_TYPE;
diff --git a/utilities/uttrack.c b/utilities/uttrack.c
index 500ed458248c..37fdba1c446c 100644
--- a/utilities/uttrack.c
+++ b/utilities/uttrack.c
@@ -282,7 +282,7 @@ AcpiUtAllocateZeroedAndTrack (
/* Report allocation error */
ACPI_ERROR ((Module, Line,
- "Could not allocate size %X", (UINT32) Size));
+ "Could not allocate size %u", (UINT32) Size));
return (NULL);
}
@@ -715,7 +715,7 @@ AcpiUtDumpAllocations (
else
{
ACPI_ERROR ((AE_INFO,
- "%d(%X) Outstanding allocations",
+ "%d(0x%X) Outstanding allocations",
NumOutstanding, NumOutstanding));
}