summaryrefslogtreecommitdiff
path: root/source/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler')
-rw-r--r--source/compiler/aslanalyze.c14
-rw-r--r--source/compiler/aslcodegen.c16
-rw-r--r--source/compiler/aslcompiler.l2
-rw-r--r--source/compiler/asldefine.h2
-rw-r--r--source/compiler/aslerror.c2
-rw-r--r--source/compiler/aslload.c11
-rw-r--r--source/compiler/aslmessages.c2
-rw-r--r--source/compiler/aslmethod.c8
-rw-r--r--source/compiler/asloffset.c10
-rw-r--r--source/compiler/asloperands.c4
-rw-r--r--source/compiler/aslopt.c10
-rw-r--r--source/compiler/aslpredef.c6
-rw-r--r--source/compiler/asltransform.c2
-rw-r--r--source/compiler/aslutils.c4
-rw-r--r--source/compiler/aslxref.c14
-rw-r--r--source/compiler/dtcompile.c4
-rw-r--r--source/compiler/dttemplate.c22
17 files changed, 73 insertions, 60 deletions
diff --git a/source/compiler/aslanalyze.c b/source/compiler/aslanalyze.c
index 0ea8dc47ffb8..58da5e2eec7c 100644
--- a/source/compiler/aslanalyze.c
+++ b/source/compiler/aslanalyze.c
@@ -563,14 +563,14 @@ ApCheckForGpeNameConflict (
{
ACPI_PARSE_OBJECT *NextOp;
UINT32 GpeNumber;
- char Name[ACPI_NAME_SIZE + 1];
- char Target[ACPI_NAME_SIZE];
+ char Name[ACPI_NAMESEG_SIZE + 1];
+ char Target[ACPI_NAMESEG_SIZE];
/* Need a null-terminated string version of NameSeg */
ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
- Name[ACPI_NAME_SIZE] = 0;
+ Name[ACPI_NAMESEG_SIZE] = 0;
/*
* For a GPE method:
@@ -622,7 +622,7 @@ ApCheckForGpeNameConflict (
if ((NextOp->Asl.ParseOpcode == PARSEOP_METHOD) ||
(NextOp->Asl.ParseOpcode == PARSEOP_NAME))
{
- if (ACPI_COMPARE_NAME (Target, NextOp->Asl.NameSeg))
+ if (ACPI_COMPARE_NAMESEG (Target, NextOp->Asl.NameSeg))
{
/* Found both _Exy and _Lxy in the same scope, error */
@@ -666,7 +666,7 @@ ApCheckRegMethod (
/* We are only interested in _REG methods */
- if (!ACPI_COMPARE_NAME (METHOD_NAME__REG, &Op->Asl.NameSeg))
+ if (!ACPI_COMPARE_NAMESEG (METHOD_NAME__REG, &Op->Asl.NameSeg))
{
return;
}
@@ -772,7 +772,7 @@ ApDeviceSubtreeWalk (
/* These are what we are looking for */
- if (ACPI_COMPARE_NAME (Name, Op->Asl.NameSeg))
+ if (ACPI_COMPARE_NAMESEG (Name, Op->Asl.NameSeg))
{
return (AE_CTRL_TRUE);
}
@@ -831,7 +831,7 @@ ApFindNameInScope (
if ((Next->Asl.ParseOpcode == PARSEOP_METHOD) ||
(Next->Asl.ParseOpcode == PARSEOP_NAME))
{
- if (ACPI_COMPARE_NAME (Name, Next->Asl.NameSeg))
+ if (ACPI_COMPARE_NAMESEG (Name, Next->Asl.NameSeg))
{
return (TRUE);
}
diff --git a/source/compiler/aslcodegen.c b/source/compiler/aslcodegen.c
index 21459178539c..8edcb668af4a 100644
--- a/source/compiler/aslcodegen.c
+++ b/source/compiler/aslcodegen.c
@@ -523,6 +523,8 @@ CgWriteAmlOpcode (
*
* DESCRIPTION: Write a table header corresponding to the DEFINITIONBLOCK
*
+ * NOTE: Input strings should be validated before this function is invoked.
+ *
******************************************************************************/
static void
@@ -534,6 +536,8 @@ CgWriteTableHeader (
ACPI_COMMENT_NODE *Current;
+ memset (&AslGbl_TableHeader, 0, sizeof (ACPI_TABLE_HEADER));
+
/* AML filename */
Child = Op->Asl.Child;
@@ -552,11 +556,11 @@ CgWriteTableHeader (
*/
if (AcpiGbl_CaptureComments)
{
- strncpy(AcpiGbl_TableSig, Child->Asl.Value.String, ACPI_NAME_SIZE);
+ ACPI_COPY_NAMESEG (AcpiGbl_TableSig, Child->Asl.Value.String);
Child->Asl.Value.String = ACPI_SIG_XXXX;
}
- strncpy (AslGbl_TableHeader.Signature, Child->Asl.Value.String, ACPI_NAME_SIZE);
+ ACPI_COPY_NAMESEG (AslGbl_TableHeader.Signature, Child->Asl.Value.String);
/* Revision */
@@ -573,12 +577,14 @@ CgWriteTableHeader (
/* OEMID */
Child = Child->Asl.Next;
- strncpy (AslGbl_TableHeader.OemId, Child->Asl.Value.String, ACPI_OEM_ID_SIZE);
+ memcpy (AslGbl_TableHeader.OemId, Child->Asl.Value.String,
+ strlen (Child->Asl.Value.String));
/* OEM TableID */
Child = Child->Asl.Next;
- strncpy (AslGbl_TableHeader.OemTableId, Child->Asl.Value.String, ACPI_OEM_TABLE_ID_SIZE);
+ memcpy (AslGbl_TableHeader.OemTableId, Child->Asl.Value.String,
+ strlen (Child->Asl.Value.String));
/* OEM Revision */
@@ -587,7 +593,7 @@ CgWriteTableHeader (
/* Compiler ID */
- ACPI_MOVE_NAME (AslGbl_TableHeader.AslCompilerId, ASL_CREATOR_ID);
+ ACPI_COPY_NAMESEG (AslGbl_TableHeader.AslCompilerId, ASL_CREATOR_ID);
/* Compiler version */
diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l
index 72fbbef380c4..26c221e58875 100644
--- a/source/compiler/aslcompiler.l
+++ b/source/compiler/aslcompiler.l
@@ -813,7 +813,7 @@ NamePathTail [.]{NameSeg}
{NameSeg} { char *s;
count (0);
- s=UtLocalCacheCalloc (ACPI_NAME_SIZE + 1);
+ s=UtLocalCacheCalloc (ACPI_NAMESEG_SIZE + 1);
if (strcmp (AslCompilertext, "\\"))
{
/*
diff --git a/source/compiler/asldefine.h b/source/compiler/asldefine.h
index a13acec0bee6..8089d0b95a0b 100644
--- a/source/compiler/asldefine.h
+++ b/source/compiler/asldefine.h
@@ -162,7 +162,7 @@
#define ASL_CREATOR_ID "INTL"
#define ASL_DEFINE "__IASL__"
#define ASL_PREFIX "iASL: "
-#define ASL_COMPLIANCE "Supports ACPI Specification Revision 6.2A"
+#define ASL_COMPLIANCE "Supports ACPI Specification Revision 6.3"
/* Configuration constants */
diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c
index 5d3a7764d255..a2f9fcef1766 100644
--- a/source/compiler/aslerror.c
+++ b/source/compiler/aslerror.c
@@ -1239,7 +1239,7 @@ AslElevateException (
return (AE_LIMIT);
}
- AslGbl_ElevatedMessages[AslGbl_ExpectedMessagesIndex] = MessageId;
+ AslGbl_ElevatedMessages[AslGbl_ElevatedMessagesIndex] = MessageId;
AslGbl_ElevatedMessagesIndex++;
return (AE_OK);
}
diff --git a/source/compiler/aslload.c b/source/compiler/aslload.c
index c910358d7efb..dfbdf7cefc4c 100644
--- a/source/compiler/aslload.c
+++ b/source/compiler/aslload.c
@@ -492,7 +492,7 @@ LdNamespace1Begin (
case AML_FIELD_OP:
Status = LdLoadFieldElements (Op, WalkState);
- return (Status);
+ break;
case AML_INT_CONNECTION_OP:
@@ -556,7 +556,8 @@ LdNamespace1Begin (
* We only want references to named objects:
* Store (2, WXYZ) -> Attempt to resolve the name
*/
- if (OpInfo->Class == AML_CLASS_NAMED_OBJECT)
+ if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) &&
+ (OpInfo->Type != AML_TYPE_NAMED_FIELD))
{
return (AE_OK);
}
@@ -702,7 +703,7 @@ LdNamespace1Begin (
/* However, this is an error -- operand to Scope must exist */
- if (strlen (Op->Asl.ExternalName) == ACPI_NAME_SIZE)
+ if (strlen (Op->Asl.ExternalName) == ACPI_NAMESEG_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
Op->Asl.ExternalName);
@@ -731,7 +732,7 @@ LdNamespace1Begin (
* 10/2015.
*/
if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
- (ACPI_COMPARE_NAME (AslGbl_TableSignature, "DSDT")))
+ (ACPI_COMPARE_NAMESEG (AslGbl_TableSignature, "DSDT")))
{
/* However, allowed if the reference is within a method */
@@ -1095,7 +1096,7 @@ LdNamespace2Begin (
{
/* Standalone NameSeg vs. NamePath */
- if (strlen (Arg->Asl.ExternalName) == ACPI_NAME_SIZE)
+ if (strlen (Arg->Asl.ExternalName) == ACPI_NAMESEG_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
Arg->Asl.ExternalName);
diff --git a/source/compiler/aslmessages.c b/source/compiler/aslmessages.c
index 07e9848233bc..0f31c655af78 100644
--- a/source/compiler/aslmessages.c
+++ b/source/compiler/aslmessages.c
@@ -342,7 +342,7 @@ const char *AslCompilerMsgs [] =
/* ASL_MSG_RANGE */ "Constant out of range",
/* ASL_MSG_BUFFER_ALLOCATION */ "Could not allocate line buffer",
/* ASL_MSG_MISSING_DEPENDENCY */ "Missing dependency",
-/* ASL_MSG_ILLEGAL_FORWARD_REF */ "Illegal forward reference",
+/* ASL_MSG_ILLEGAL_FORWARD_REF */ "Forward references are not supported by the ASL language",
/* ASL_MSG_ILLEGAL_METHOD_REF */ "Object is declared in a different method",
/* ASL_MSG_LOCAL_NOT_USED */ "Method Local is set but never used",
/* ASL_MSG_ARG_AS_LOCAL_NOT_USED */ "Method Argument (as a local) is set but never used",
diff --git a/source/compiler/aslmethod.c b/source/compiler/aslmethod.c
index 4563317dd65c..98884bc37ef8 100644
--- a/source/compiler/aslmethod.c
+++ b/source/compiler/aslmethod.c
@@ -228,7 +228,7 @@ MtMethodAnalysisWalkBegin (
* 1) _PS0 - One of these must exist: _PS1, _PS2, _PS3
* 2) _PS1/_PS2/_PS3: A _PS0 must exist
*/
- if (ACPI_COMPARE_NAME (METHOD_NAME__PS0, Op->Asl.NameSeg))
+ if (ACPI_COMPARE_NAMESEG (METHOD_NAME__PS0, Op->Asl.NameSeg))
{
/* For _PS0, one of _PS1/_PS2/_PS3 must exist */
@@ -241,9 +241,9 @@ MtMethodAnalysisWalkBegin (
}
}
else if (
- ACPI_COMPARE_NAME (METHOD_NAME__PS1, Op->Asl.NameSeg) ||
- ACPI_COMPARE_NAME (METHOD_NAME__PS2, Op->Asl.NameSeg) ||
- ACPI_COMPARE_NAME (METHOD_NAME__PS3, Op->Asl.NameSeg))
+ ACPI_COMPARE_NAMESEG (METHOD_NAME__PS1, Op->Asl.NameSeg) ||
+ ACPI_COMPARE_NAMESEG (METHOD_NAME__PS2, Op->Asl.NameSeg) ||
+ ACPI_COMPARE_NAMESEG (METHOD_NAME__PS3, Op->Asl.NameSeg))
{
/* For _PS1/_PS2/_PS3, a _PS0 must exist */
diff --git a/source/compiler/asloffset.c b/source/compiler/asloffset.c
index 4a99c39a3a7b..dd8e1b079103 100644
--- a/source/compiler/asloffset.c
+++ b/source/compiler/asloffset.c
@@ -258,7 +258,7 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg and the actual data */
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
- (Op->Asl.FinalAmlLength - ACPI_NAME_SIZE);
+ (Op->Asl.FinalAmlLength - ACPI_NAMESEG_SIZE);
DataOffset = AslGbl_CurrentAmlOffset + Length +
Op->Asl.FinalAmlLength;
@@ -323,7 +323,7 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg and the actual data */
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
- (NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE);
+ (NextOp->Asl.FinalAmlLength - ACPI_NAMESEG_SIZE);
DataOffset = AslGbl_CurrentAmlOffset + Length +
(NextOp->Asl.FinalAmlLength + 1);
@@ -370,7 +370,7 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg and the actual data (flags byte) */
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
- (NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE);
+ (NextOp->Asl.FinalAmlLength - ACPI_NAMESEG_SIZE);
DataOffset = AslGbl_CurrentAmlOffset + Length +
NextOp->Asl.FinalAmlLength;
@@ -394,7 +394,7 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg and the actual data (PBlock address) */
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
- (NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE);
+ (NextOp->Asl.FinalAmlLength - ACPI_NAMESEG_SIZE);
DataOffset = AslGbl_CurrentAmlOffset + Length +
(NextOp->Asl.FinalAmlLength + 1);
@@ -419,7 +419,7 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg */
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
- (NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE);
+ (NextOp->Asl.FinalAmlLength - ACPI_NAMESEG_SIZE);
LsEmitOffsetTableEntry (FileId, Node, NamepathOffset, 0,
Op->Asl.ParseOpName, 0, (UINT8) 0, Op->Asl.AmlOpcode);
diff --git a/source/compiler/asloperands.c b/source/compiler/asloperands.c
index 172f347063bc..67e16fd58b19 100644
--- a/source/compiler/asloperands.c
+++ b/source/compiler/asloperands.c
@@ -1087,13 +1087,13 @@ OpnDoDefinitionBlock (
if (Child->Asl.Value.String)
{
AslGbl_TableSignature = Child->Asl.Value.String;
- if (strlen (AslGbl_TableSignature) != ACPI_NAME_SIZE)
+ if (strlen (AslGbl_TableSignature) != ACPI_NAMESEG_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child,
"Length must be exactly 4 characters");
}
- for (i = 0; i < ACPI_NAME_SIZE; i++)
+ for (i = 0; i < ACPI_NAMESEG_SIZE; i++)
{
if (!isalnum ((int) AslGbl_TableSignature[i]))
{
diff --git a/source/compiler/aslopt.c b/source/compiler/aslopt.c
index 1b0c4d338a6c..6d2045f8229d 100644
--- a/source/compiler/aslopt.c
+++ b/source/compiler/aslopt.c
@@ -241,7 +241,7 @@ OptSearchToRoot (
* not match, and we cannot use this optimization.
*/
Path = &(((char *) TargetPath->Pointer)[
- TargetPath->Length - ACPI_NAME_SIZE]);
+ TargetPath->Length - ACPI_NAMESEG_SIZE]);
ScopeInfo.Scope.Node = CurrentNode;
/* Lookup the NameSeg using SEARCH_PARENT (search-to-root) */
@@ -275,7 +275,7 @@ OptSearchToRoot (
/* We must allocate a new string for the name (TargetPath gets deleted) */
- *NewPath = UtLocalCacheCalloc (ACPI_NAME_SIZE + 1);
+ *NewPath = UtLocalCacheCalloc (ACPI_NAMESEG_SIZE + 1);
strcpy (*NewPath, Path);
if (strncmp (*NewPath, "_T_", 3))
@@ -343,7 +343,7 @@ OptBuildShortestPath (
* can possibly have in common. (To optimize, we have to have at least 1)
*
* Note: The external NamePath string lengths are always a multiple of 5
- * (ACPI_NAME_SIZE + separator)
+ * (ACPI_NAMESEG_SIZE + separator)
*/
MaxCommonSegments = TargetPath->Length / ACPI_PATH_SEGMENT_LENGTH;
if (CurrentPath->Length < TargetPath->Length)
@@ -363,7 +363,7 @@ OptBuildShortestPath (
Index = (NumCommonSegments * ACPI_PATH_SEGMENT_LENGTH) + 1;
- if (!ACPI_COMPARE_NAME (
+ if (!ACPI_COMPARE_NAMESEG (
&(ACPI_CAST_PTR (char, TargetPath->Pointer)) [Index],
&(ACPI_CAST_PTR (char, CurrentPath->Pointer)) [Index]))
{
@@ -713,7 +713,7 @@ OptOptimizeNamePath (
* to be any possibility that it can be optimized to a shorter string
*/
AmlNameStringLength = strlen (AmlNameString);
- if (AmlNameStringLength <= ACPI_NAME_SIZE)
+ if (AmlNameStringLength <= ACPI_NAMESEG_SIZE)
{
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS,
"NAMESEG %4.4s\n", AmlNameString));
diff --git a/source/compiler/aslpredef.c b/source/compiler/aslpredef.c
index ab29105ab6f2..1f850239c08e 100644
--- a/source/compiler/aslpredef.c
+++ b/source/compiler/aslpredef.c
@@ -578,7 +578,7 @@ ApCheckForPredefinedName (
ThisName = AcpiGbl_PredefinedMethods;
for (i = 0; ThisName->Info.Name[0]; i++)
{
- if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name))
+ if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name))
{
/* Return index into predefined array */
return (i);
@@ -592,7 +592,7 @@ ApCheckForPredefinedName (
ThisName = AcpiGbl_ResourceNames;
while (ThisName->Info.Name[0])
{
- if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name))
+ if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name))
{
return (ACPI_PREDEFINED_NAME);
}
@@ -603,7 +603,7 @@ ApCheckForPredefinedName (
ThisName = AcpiGbl_ScopeNames;
while (ThisName->Info.Name[0])
{
- if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name))
+ if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name))
{
return (ACPI_PREDEFINED_NAME);
}
diff --git a/source/compiler/asltransform.c b/source/compiler/asltransform.c
index e9f0d049b939..5237c638d743 100644
--- a/source/compiler/asltransform.c
+++ b/source/compiler/asltransform.c
@@ -553,7 +553,7 @@ TrDoDefinitionBlock (
* to be at the root of the namespace; Therefore, namepath
* optimization can only be performed on the DSDT.
*/
- if (!ACPI_COMPARE_NAME (Next->Asl.Value.String, ACPI_SIG_DSDT))
+ if (!ACPI_COMPARE_NAMESEG (Next->Asl.Value.String, ACPI_SIG_DSDT))
{
AslGbl_ReferenceOptimizationFlag = FALSE;
}
diff --git a/source/compiler/aslutils.c b/source/compiler/aslutils.c
index 1fc98bb524b9..6b0d5eff31d7 100644
--- a/source/compiler/aslutils.c
+++ b/source/compiler/aslutils.c
@@ -752,7 +752,7 @@ UtPadNameWithUnderscores (
UINT32 i;
- for (i = 0; (i < ACPI_NAME_SIZE); i++)
+ for (i = 0; (i < ACPI_NAMESEG_SIZE); i++)
{
if (*NameSeg)
{
@@ -823,7 +823,7 @@ UtAttachNameseg (
UtPadNameWithUnderscores (Name, PaddedNameSeg);
}
- ACPI_MOVE_NAME (Op->Asl.NameSeg, PaddedNameSeg);
+ ACPI_COPY_NAMESEG (Op->Asl.NameSeg, PaddedNameSeg);
}
diff --git a/source/compiler/aslxref.c b/source/compiler/aslxref.c
index b3067feb7c4e..99f6c4a07c0b 100644
--- a/source/compiler/aslxref.c
+++ b/source/compiler/aslxref.c
@@ -613,7 +613,8 @@ XfNamespaceLocateBegin (
(Op->Asl.ParseOpcode != PARSEOP_NAMESTRING) &&
(Op->Asl.ParseOpcode != PARSEOP_NAMESEG) &&
(Op->Asl.ParseOpcode != PARSEOP_METHODCALL) &&
- (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL))
+ (Op->Asl.ParseOpcode != PARSEOP_EXTERNAL) &&
+ (OpInfo->Type != AML_TYPE_NAMED_FIELD))
{
return_ACPI_STATUS (AE_OK);
}
@@ -637,7 +638,8 @@ XfNamespaceLocateBegin (
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) ||
(Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
(Op->Asl.ParseOpcode == PARSEOP_METHODCALL) ||
- (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
+ (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) ||
+ (OpInfo->Type == AML_TYPE_NAMED_FIELD))
{
/*
* These are name references, do not push the scope stack
@@ -674,6 +676,10 @@ XfNamespaceLocateBegin (
Path = NextOp->Asl.Value.String;
}
+ else if (OpInfo->Type == AML_TYPE_NAMED_FIELD)
+ {
+ Path = Op->Asl.Child->Asl.Value.String;
+ }
else
{
Path = Op->Asl.Value.String;
@@ -702,7 +708,7 @@ XfNamespaceLocateBegin (
* We didn't find the name reference by path -- we can qualify this
* a little better before we print an error message
*/
- if (strlen (Path) == ACPI_NAME_SIZE)
+ if (strlen (Path) == ACPI_NAMESEG_SIZE)
{
/* A simple, one-segment ACPI name */
@@ -764,7 +770,7 @@ XfNamespaceLocateBegin (
* doesn't exist or just can't be reached. However, we
* can differentiate between a NameSeg vs. NamePath.
*/
- if (strlen (Op->Asl.ExternalName) == ACPI_NAME_SIZE)
+ if (strlen (Op->Asl.ExternalName) == ACPI_NAMESEG_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
Op->Asl.ExternalName);
diff --git a/source/compiler/dtcompile.c b/source/compiler/dtcompile.c
index 88a7a8b0550f..95fcb2d460d8 100644
--- a/source/compiler/dtcompile.c
+++ b/source/compiler/dtcompile.c
@@ -418,7 +418,7 @@ DtCompileDataTable (
* Currently, these are the FACS and RSDP. Also check for an OEMx table,
* these tables have user-defined contents.
*/
- if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS))
+ if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_FACS))
{
Status = DtCompileFacs (FieldList);
if (ACPI_FAILURE (Status))
@@ -434,7 +434,7 @@ DtCompileDataTable (
Status = DtCompileRsdp (FieldList);
return (Status);
}
- else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_S3PT))
+ else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_S3PT))
{
Status = DtCompileS3pt (FieldList);
if (ACPI_FAILURE (Status))
diff --git a/source/compiler/dttemplate.c b/source/compiler/dttemplate.c
index 8e3124a36520..4cc6c0403252 100644
--- a/source/compiler/dttemplate.c
+++ b/source/compiler/dttemplate.c
@@ -204,11 +204,11 @@ AcpiUtIsSpecialTable (
char *Signature)
{
- if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT) ||
- ACPI_COMPARE_NAME (Signature, ACPI_SIG_OSDT) ||
- ACPI_COMPARE_NAME (Signature, ACPI_SIG_SSDT) ||
- ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS) ||
- ACPI_COMPARE_NAME (Signature, ACPI_RSDP_NAME))
+ if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_DSDT) ||
+ ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_OSDT) ||
+ ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_SSDT) ||
+ ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_FACS) ||
+ ACPI_COMPARE_NAMESEG (Signature, ACPI_RSDP_NAME))
{
return (TRUE);
}
@@ -346,7 +346,7 @@ DtCreateOneTemplateFile (
* 2) Signature must be a recognized ACPI table
* 3) There must be a template associated with the signature
*/
- if (strlen (Signature) != ACPI_NAME_SIZE)
+ if (strlen (Signature) != ACPI_NAMESEG_SIZE)
{
fprintf (stderr,
"%s: Invalid ACPI table signature "
@@ -567,7 +567,7 @@ DtCreateOneTemplate (
AcpiOsPrintf (" (AML byte code table)\n");
AcpiOsPrintf (" */\n");
- if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT))
+ if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_DSDT))
{
Actual = DtEmitDefinitionBlock (
File, DisasmFilename, ACPI_SIG_DSDT, 1);
@@ -590,7 +590,7 @@ DtCreateOneTemplate (
}
}
}
- else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_SSDT))
+ else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_SSDT))
{
Actual = DtEmitDefinitionBlock (
File, DisasmFilename, ACPI_SIG_SSDT, 1);
@@ -600,7 +600,7 @@ DtCreateOneTemplate (
goto Cleanup;
}
}
- else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_OSDT))
+ else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_OSDT))
{
Actual = DtEmitDefinitionBlock (
File, DisasmFilename, ACPI_SIG_OSDT, 1);
@@ -610,12 +610,12 @@ DtCreateOneTemplate (
goto Cleanup;
}
}
- else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS))
+ else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_FACS))
{
AcpiDmDumpDataTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER,
TemplateFacs));
}
- else if (ACPI_COMPARE_NAME (Signature, ACPI_RSDP_NAME))
+ else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_RSDP_NAME))
{
AcpiDmDumpDataTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER,
TemplateRsdp));