Message ID | 20190329170223.26516-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | ACPICA: Update to version 20190329 | expand |
On 2019-03-29 10:02 a.m., Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > changes in this release of ACPICA are detailed at the following > link on the ACPICA developer mailing list: > > https://lists.acpica.org/pipermail/devel/2019-March/001878.html > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpica/source/common/acfileio.c | 2 +- > src/acpica/source/common/adisasm.c | 2 +- > src/acpica/source/common/adwalk.c | 2 +- > src/acpica/source/common/ahpredef.c | 2 +- > src/acpica/source/common/ahtable.c | 2 +- > src/acpica/source/common/dmrestag.c | 24 ++++++++++++------- > src/acpica/source/common/dmtable.c | 6 ++--- > src/acpica/source/common/dmtables.c | 2 +- > src/acpica/source/compiler/aslanalyze.c | 14 +++++------ > src/acpica/source/compiler/aslcodegen.c | 16 +++++++++---- > src/acpica/source/compiler/aslcompiler.l | 2 +- > src/acpica/source/compiler/asldefine.h | 2 +- > src/acpica/source/compiler/aslerror.c | 2 +- > src/acpica/source/compiler/aslload.c | 11 +++++---- > src/acpica/source/compiler/aslmessages.c | 2 +- > src/acpica/source/compiler/aslmethod.c | 8 +++---- > src/acpica/source/compiler/asloffset.c | 10 ++++---- > src/acpica/source/compiler/asloperands.c | 4 ++-- > src/acpica/source/compiler/aslopt.c | 10 ++++---- > src/acpica/source/compiler/aslpredef.c | 6 ++--- > src/acpica/source/compiler/asltransform.c | 2 +- > src/acpica/source/compiler/aslutils.c | 4 ++-- > src/acpica/source/compiler/aslxref.c | 14 +++++++---- > src/acpica/source/compiler/dtcompile.c | 4 ++-- > src/acpica/source/compiler/dttemplate.c | 22 ++++++++--------- > .../source/components/debugger/dbexec.c | 2 +- > .../source/components/debugger/dbnames.c | 2 +- > .../source/components/disassembler/dmbuffer.c | 8 +++---- > .../source/components/disassembler/dmnames.c | 6 ++--- > .../source/components/dispatcher/dsfield.c | 2 +- > .../source/components/dispatcher/dsinit.c | 2 +- > .../source/components/events/evgpeinit.c | 4 ++-- > .../source/components/executer/exnames.c | 6 ++--- > .../source/components/namespace/nsaccess.c | 2 +- > .../source/components/namespace/nsdump.c | 2 +- > .../source/components/namespace/nsinit.c | 4 ++-- > .../source/components/namespace/nsnames.c | 8 +++---- > .../source/components/namespace/nsobject.c | 5 ++++ > .../source/components/namespace/nsparse.c | 2 +- > .../source/components/namespace/nsrepair.c | 2 +- > .../source/components/namespace/nsrepair2.c | 4 ++-- > .../source/components/namespace/nsutils.c | 12 +++++----- > .../source/components/namespace/nsxfname.c | 4 ++-- > src/acpica/source/components/parser/psargs.c | 8 +++---- > .../source/components/resources/rsxface.c | 8 +++---- > src/acpica/source/components/tables/tbdata.c | 2 +- > src/acpica/source/components/tables/tbfind.c | 6 ++--- > .../source/components/tables/tbinstal.c | 2 +- > src/acpica/source/components/tables/tbprint.c | 10 ++++---- > src/acpica/source/components/tables/tbutils.c | 2 +- > src/acpica/source/components/tables/tbxface.c | 4 ++-- > .../source/components/tables/tbxfload.c | 10 ++++---- > .../source/components/utilities/utascii.c | 2 +- > .../source/components/utilities/utdecode.c | 24 +++++++++---------- > .../source/components/utilities/utmisc.c | 8 +++---- > .../source/components/utilities/utpredef.c | 4 ++-- > .../source/components/utilities/utstring.c | 6 ++--- > src/acpica/source/include/aclocal.h | 4 ++-- > src/acpica/source/include/acpixf.h | 2 +- > src/acpica/source/include/actbl.h | 4 ++-- > src/acpica/source/include/actypes.h | 12 +++++----- > src/acpica/source/include/platform/aclinux.h | 5 ++++ > src/acpica/source/tools/acpiexec/aecommon.h | 4 ++++ > .../source/tools/acpiexec/aeexception.c | 2 +- > 64 files changed, 208 insertions(+), 173 deletions(-) > > diff --git a/src/acpica/source/common/acfileio.c b/src/acpica/source/common/acfileio.c > index 18992b20..74f28577 100644 > --- a/src/acpica/source/common/acfileio.c > +++ b/src/acpica/source/common/acfileio.c > @@ -585,7 +585,7 @@ AcValidateTableHeader ( > * These fields must be ASCII: OemId, OemTableId, AslCompilerId. > * We allow a NULL terminator in OemId and OemTableId. > */ > - for (i = 0; i < ACPI_NAME_SIZE; i++) > + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) > { > if (!ACPI_IS_ASCII ((UINT8) TableHeader.AslCompilerId[i])) > { > diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c > index 6fbfaf5d..518468b7 100644 > --- a/src/acpica/source/common/adisasm.c > +++ b/src/acpica/source/common/adisasm.c > @@ -459,7 +459,7 @@ AdDisassembleOneTable ( > */ > if (AcpiGbl_CaptureComments) > { > - strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAME_SIZE); > + strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAMESEG_SIZE); > } > #endif > > diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c > index 9f51b64e..d9bd4d9e 100644 > --- a/src/acpica/source/common/adwalk.c > +++ b/src/acpica/source/common/adwalk.c > @@ -814,7 +814,7 @@ AcpiDmLoadDescendingOp ( > > while (AcpiGbl_PreDefinedNames[PreDefineIndex].Name) > { > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, > AcpiGbl_PreDefinedNames[PreDefineIndex].Name)) > { > PreDefined = TRUE; > diff --git a/src/acpica/source/common/ahpredef.c b/src/acpica/source/common/ahpredef.c > index 58b2d662..a76148dc 100644 > --- a/src/acpica/source/common/ahpredef.c > +++ b/src/acpica/source/common/ahpredef.c > @@ -490,7 +490,7 @@ AcpiAhMatchPredefinedName ( > > for (Info = AslPredefinedInfo; Info->Name; Info++) > { > - if (ACPI_COMPARE_NAME (Nameseg, Info->Name)) > + if (ACPI_COMPARE_NAMESEG (Nameseg, Info->Name)) > { > return (Info); > } > diff --git a/src/acpica/source/common/ahtable.c b/src/acpica/source/common/ahtable.c > index 96b5f9f6..599c53a8 100644 > --- a/src/acpica/source/common/ahtable.c > +++ b/src/acpica/source/common/ahtable.c > @@ -183,7 +183,7 @@ AcpiAhGetTableInfo ( > > for (Info = AcpiGbl_SupportedTables; Info->Signature; Info++) > { > - if (ACPI_COMPARE_NAME (Signature, Info->Signature)) > + if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature)) > { > return (Info); > } > diff --git a/src/acpica/source/common/dmrestag.c b/src/acpica/source/common/dmrestag.c > index c33b0497..8ab92d71 100644 > --- a/src/acpica/source/common/dmrestag.c > +++ b/src/acpica/source/common/dmrestag.c > @@ -747,6 +747,7 @@ AcpiGetTagPathname ( > UINT8 ResourceTableIndex; > ACPI_SIZE RequiredSize; > char *Pathname; > + char *PathnameEnd; > AML_RESOURCE *Aml; > ACPI_PARSE_OBJECT *Op; > char *InternalPath; > @@ -809,19 +810,26 @@ AcpiGetTagPathname ( > RequiredSize, FALSE); > > /* > - * Create the full path to the resource and tag by: remove the buffer name, > - * append the resource descriptor name, append a dot, append the tag name. > + * Create the full path to the resource and tag by: > + * 1) Remove the buffer nameseg from the end of the pathname > + * 2) Append the resource descriptor nameseg > + * 3) Append a dot > + * 4) Append the field tag nameseg > * > - * TBD: Always using the full path is a bit brute force, the path can be > + * Always using the full path is a bit brute force, the path can be > * often be optimized with carats (if the original buffer namepath is a > * single nameseg). This doesn't really matter, because these paths do not > * end up in the final compiled AML, it's just an appearance issue for the > * disassembled code. > */ > - Pathname[strlen (Pathname) - ACPI_NAME_SIZE] = 0; > - strncat (Pathname, ResourceNode->Name.Ascii, ACPI_NAME_SIZE); > - strcat (Pathname, "."); > - strncat (Pathname, Tag, ACPI_NAME_SIZE); > + PathnameEnd = Pathname + (RequiredSize - ACPI_NAMESEG_SIZE - 1); > + ACPI_COPY_NAMESEG (PathnameEnd, ResourceNode->Name.Ascii); > + > + PathnameEnd += ACPI_NAMESEG_SIZE; > + *PathnameEnd = '.'; > + > + PathnameEnd++; > + ACPI_COPY_NAMESEG (PathnameEnd, Tag); > > /* Internalize the namepath to AML format */ > > @@ -863,7 +871,7 @@ static void > AcpiDmUpdateResourceName ( > ACPI_NAMESPACE_NODE *ResourceNode) > { > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > > > /* Ignore if a unique name has already been assigned */ > diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c > index e51ff424..6b67662b 100644 > --- a/src/acpica/source/common/dmtable.c > +++ b/src/acpica/source/common/dmtable.c > @@ -602,7 +602,7 @@ AcpiDmGetTableData ( > > for (Info = AcpiDmTableData; Info->Signature; Info++) > { > - if (ACPI_COMPARE_NAME (Signature, Info->Signature)) > + if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature)) > { > return (Info); > } > @@ -657,7 +657,7 @@ AcpiDmDumpDataTable ( > * Handle tables that don't use the common ACPI table header structure. > * Currently, these are the FACS, RSDP, and S3PT. > */ > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS)) > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) > { > Length = Table->Length; > Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs); > @@ -670,7 +670,7 @@ AcpiDmDumpDataTable ( > { > Length = AcpiDmDumpRsdp (Table); > } > - else if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT)) > + else if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT)) > { > Length = AcpiDmDumpS3pt (Table); > } > diff --git a/src/acpica/source/common/dmtables.c b/src/acpica/source/common/dmtables.c > index 1a8da3af..f9579509 100644 > --- a/src/acpica/source/common/dmtables.c > +++ b/src/acpica/source/common/dmtables.c > @@ -281,7 +281,7 @@ AdCreateTableHeader ( > > /* Revision of DSDT controls the ACPI integer width */ > > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT)) > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT)) > { > AcpiOsPrintf (" **** 32-bit table (V1), no 64-bit math support"); > } > diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c > index 0ea8dc47..58da5e2e 100644 > --- a/src/acpica/source/compiler/aslanalyze.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslcodegen.c b/src/acpica/source/compiler/aslcodegen.c > index 21459178..8edcb668 100644 > --- a/src/acpica/source/compiler/aslcodegen.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l > index 72fbbef3..26c221e5 100644 > --- a/src/acpica/source/compiler/aslcompiler.l > +++ b/src/acpica/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/src/acpica/source/compiler/asldefine.h b/src/acpica/source/compiler/asldefine.h > index a13acec0..8089d0b9 100644 > --- a/src/acpica/source/compiler/asldefine.h > +++ b/src/acpica/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/src/acpica/source/compiler/aslerror.c b/src/acpica/source/compiler/aslerror.c > index 5d3a7764..a2f9fcef 100644 > --- a/src/acpica/source/compiler/aslerror.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c > index c910358d..dfbdf7ce 100644 > --- a/src/acpica/source/compiler/aslload.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c > index 07e98482..0f31c655 100644 > --- a/src/acpica/source/compiler/aslmessages.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c > index 4563317d..98884bc3 100644 > --- a/src/acpica/source/compiler/aslmethod.c > +++ b/src/acpica/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/src/acpica/source/compiler/asloffset.c b/src/acpica/source/compiler/asloffset.c > index 4a99c39a..dd8e1b07 100644 > --- a/src/acpica/source/compiler/asloffset.c > +++ b/src/acpica/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/src/acpica/source/compiler/asloperands.c b/src/acpica/source/compiler/asloperands.c > index 172f3470..67e16fd5 100644 > --- a/src/acpica/source/compiler/asloperands.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslopt.c b/src/acpica/source/compiler/aslopt.c > index 1b0c4d33..6d2045f8 100644 > --- a/src/acpica/source/compiler/aslopt.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslpredef.c b/src/acpica/source/compiler/aslpredef.c > index ab29105a..1f850239 100644 > --- a/src/acpica/source/compiler/aslpredef.c > +++ b/src/acpica/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/src/acpica/source/compiler/asltransform.c b/src/acpica/source/compiler/asltransform.c > index e9f0d049..5237c638 100644 > --- a/src/acpica/source/compiler/asltransform.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c > index 1fc98bb5..6b0d5eff 100644 > --- a/src/acpica/source/compiler/aslutils.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslxref.c b/src/acpica/source/compiler/aslxref.c > index b3067feb..99f6c4a0 100644 > --- a/src/acpica/source/compiler/aslxref.c > +++ b/src/acpica/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/src/acpica/source/compiler/dtcompile.c b/src/acpica/source/compiler/dtcompile.c > index 88a7a8b0..95fcb2d4 100644 > --- a/src/acpica/source/compiler/dtcompile.c > +++ b/src/acpica/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/src/acpica/source/compiler/dttemplate.c b/src/acpica/source/compiler/dttemplate.c > index 8e3124a3..4cc6c040 100644 > --- a/src/acpica/source/compiler/dttemplate.c > +++ b/src/acpica/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)); > diff --git a/src/acpica/source/components/debugger/dbexec.c b/src/acpica/source/components/debugger/dbexec.c > index 49d1180f..8897fa6d 100644 > --- a/src/acpica/source/components/debugger/dbexec.c > +++ b/src/acpica/source/components/debugger/dbexec.c > @@ -658,7 +658,7 @@ AcpiDbExecute ( > > /* Dump a _PLD buffer if present */ > > - if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, > + if (ACPI_COMPARE_NAMESEG ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, > AcpiGbl_DbMethodInfo.Method)->Name.Ascii), > METHOD_NAME__PLD)) > { > diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c > index 3c01e808..2c9af4be 100644 > --- a/src/acpica/source/components/debugger/dbnames.c > +++ b/src/acpica/source/components/debugger/dbnames.c > @@ -557,7 +557,7 @@ AcpiDbFindNameInNamespace ( > char *AcpiNamePtr = AcpiName; > > > - if (strlen (NameArg) > ACPI_NAME_SIZE) > + if (strlen (NameArg) > ACPI_NAMESEG_SIZE) > { > AcpiOsPrintf ("Name must be no longer than 4 characters\n"); > return (AE_OK); > diff --git a/src/acpica/source/components/disassembler/dmbuffer.c b/src/acpica/source/components/disassembler/dmbuffer.c > index a58ff2f5..f61c8378 100644 > --- a/src/acpica/source/components/disassembler/dmbuffer.c > +++ b/src/acpica/source/components/disassembler/dmbuffer.c > @@ -736,7 +736,7 @@ AcpiDmIsPldBuffer ( > { > Node = ParentOp->Common.Node; > > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD)) > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__PLD)) > { > /* Ignore the Size argument in the disassembly of this buffer op */ > > @@ -770,7 +770,7 @@ AcpiDmIsPldBuffer ( > { > Node = ParentOp->Common.Node; > > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD)) > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__PLD)) > { > /* Ignore the Size argument in the disassembly of this buffer op */ > > @@ -1100,7 +1100,7 @@ AcpiDmCheckForHardwareId ( > > /* Check for _HID - has one argument */ > > - if (ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID)) > + if (ACPI_COMPARE_NAMESEG (&Name, METHOD_NAME__HID)) > { > AcpiDmGetHardwareIdType (NextOp); > return; > @@ -1108,7 +1108,7 @@ AcpiDmCheckForHardwareId ( > > /* Exit if not _CID */ > > - if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__CID)) > + if (!ACPI_COMPARE_NAMESEG (&Name, METHOD_NAME__CID)) > { > return; > } > diff --git a/src/acpica/source/components/disassembler/dmnames.c b/src/acpica/source/components/disassembler/dmnames.c > index bbff3e0a..d07af72f 100644 > --- a/src/acpica/source/components/disassembler/dmnames.c > +++ b/src/acpica/source/components/disassembler/dmnames.c > @@ -199,8 +199,8 @@ AcpiDmDumpName ( > > /* Remove all trailing underscores from the name */ > > - Length = ACPI_NAME_SIZE; > - for (i = (ACPI_NAME_SIZE - 1); i != 0; i--) > + Length = ACPI_NAMESEG_SIZE; > + for (i = (ACPI_NAMESEG_SIZE - 1); i != 0; i--) > { > if (NewName[i] == '_') > { > @@ -378,7 +378,7 @@ AcpiDmNamestring ( > AcpiOsPrintf ("."); > } > > - Name += ACPI_NAME_SIZE; > + Name += ACPI_NAMESEG_SIZE; > } > } > > diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c > index cc0a271e..3aff4db1 100644 > --- a/src/acpica/source/components/dispatcher/dsfield.c > +++ b/src/acpica/source/components/dispatcher/dsfield.c > @@ -685,7 +685,7 @@ AcpiDsCreateField ( > Info.RegionNode = RegionNode; > > Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next); > - if (Info.RegionNode->Type == ACPI_ADR_SPACE_PLATFORM_COMM && > + if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM && > !(RegionNode->Object->Field.InternalPccBuffer > = ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length))) > { > diff --git a/src/acpica/source/components/dispatcher/dsinit.c b/src/acpica/source/components/dispatcher/dsinit.c > index 334187a3..e7045f46 100644 > --- a/src/acpica/source/components/dispatcher/dsinit.c > +++ b/src/acpica/source/components/dispatcher/dsinit.c > @@ -359,7 +359,7 @@ AcpiDsInitializeObjects ( > > /* DSDT is always the first AML table */ > > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT)) > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT)) > { > ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, > "\nInitializing Namespace objects:\n")); > diff --git a/src/acpica/source/components/events/evgpeinit.c b/src/acpica/source/components/events/evgpeinit.c > index 4aec9b80..b7e02a06 100644 > --- a/src/acpica/source/components/events/evgpeinit.c > +++ b/src/acpica/source/components/events/evgpeinit.c > @@ -447,7 +447,7 @@ AcpiEvMatchGpeMethod ( > ACPI_STATUS Status; > UINT32 GpeNumber; > UINT8 TempGpeNumber; > - char Name[ACPI_NAME_SIZE + 1]; > + char Name[ACPI_NAMESEG_SIZE + 1]; > UINT8 Type; > > > @@ -468,7 +468,7 @@ AcpiEvMatchGpeMethod ( > * 1) Extract the method name and null terminate it > */ > ACPI_MOVE_32_TO_32 (Name, &MethodNode->Name.Integer); > - Name[ACPI_NAME_SIZE] = 0; > + Name[ACPI_NAMESEG_SIZE] = 0; > > /* 2) Name must begin with an underscore */ > > diff --git a/src/acpica/source/components/executer/exnames.c b/src/acpica/source/components/executer/exnames.c > index f652dfab..70a01467 100644 > --- a/src/acpica/source/components/executer/exnames.c > +++ b/src/acpica/source/components/executer/exnames.c > @@ -207,11 +207,11 @@ AcpiExAllocateNameString ( > { > /* Special case for root */ > > - SizeNeeded = 1 + (ACPI_NAME_SIZE * NumNameSegs) + 2 + 1; > + SizeNeeded = 1 + (ACPI_NAMESEG_SIZE * NumNameSegs) + 2 + 1; > } > else > { > - SizeNeeded = PrefixCount + (ACPI_NAME_SIZE * NumNameSegs) + 2 + 1; > + SizeNeeded = PrefixCount + (ACPI_NAMESEG_SIZE * NumNameSegs) + 2 + 1; > } > > /* > @@ -310,7 +310,7 @@ AcpiExNameSegment ( > } > > for (Index = 0; > - (Index < ACPI_NAME_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0)); > + (Index < ACPI_NAMESEG_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0)); > Index++) > { > CharBuf[Index] = *AmlAddress++; > diff --git a/src/acpica/source/components/namespace/nsaccess.c b/src/acpica/source/components/namespace/nsaccess.c > index d8e3b841..94dba130 100644 > --- a/src/acpica/source/components/namespace/nsaccess.c > +++ b/src/acpica/source/components/namespace/nsaccess.c > @@ -851,7 +851,7 @@ AcpiNsLookup ( > > /* Point to next name segment and make this node current */ > > - Path += ACPI_NAME_SIZE; > + Path += ACPI_NAMESEG_SIZE; > CurrentNode = ThisNode; > } > > diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c > index 11cb03e3..6ea04525 100644 > --- a/src/acpica/source/components/namespace/nsdump.c > +++ b/src/acpica/source/components/namespace/nsdump.c > @@ -236,7 +236,7 @@ AcpiNsPrintPathname ( > AcpiOsPrintf ("?"); > } > > - Pathname += ACPI_NAME_SIZE; > + Pathname += ACPI_NAMESEG_SIZE; > NumSegments--; > if (NumSegments) > { > diff --git a/src/acpica/source/components/namespace/nsinit.c b/src/acpica/source/components/namespace/nsinit.c > index ccdef3c9..4dd28fd4 100644 > --- a/src/acpica/source/components/namespace/nsinit.c > +++ b/src/acpica/source/components/namespace/nsinit.c > @@ -662,7 +662,7 @@ AcpiNsFindIniMethods ( > > /* We are only looking for methods named _INI */ > > - if (!ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__INI)) > + if (!ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__INI)) > { > return (AE_OK); > } > @@ -839,7 +839,7 @@ AcpiNsInitOneDevice ( > * Note: We know there is an _INI within this subtree, but it may not be > * under this particular device, it may be lower in the branch. > */ > - if (!ACPI_COMPARE_NAME (DeviceNode->Name.Ascii, "_SB_") || > + if (!ACPI_COMPARE_NAMESEG (DeviceNode->Name.Ascii, "_SB_") || > DeviceNode->Parent != AcpiGbl_RootNode) > { > ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname ( > diff --git a/src/acpica/source/components/namespace/nsnames.c b/src/acpica/source/components/namespace/nsnames.c > index 0bab2f23..7633e2ef 100644 > --- a/src/acpica/source/components/namespace/nsnames.c > +++ b/src/acpica/source/components/namespace/nsnames.c > @@ -273,8 +273,8 @@ AcpiNsHandleToName ( > /* Just copy the ACPI name from the Node and zero terminate it */ > > NodeName = AcpiUtGetNodeName (Node); > - ACPI_MOVE_NAME (Buffer->Pointer, NodeName); > - ((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0; > + ACPI_COPY_NAMESEG (Buffer->Pointer, NodeName); > + ((char *) Buffer->Pointer) [ACPI_NAMESEG_SIZE] = 0; > > ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%4.4s\n", (char *) Buffer->Pointer)); > return_ACPI_STATUS (AE_OK); > @@ -374,7 +374,7 @@ AcpiNsBuildNormalizedPath ( > BOOLEAN NoTrailing) > { > UINT32 Length = 0, i; > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > BOOLEAN DoNoTrailing; > char c, *Left, *Right; > ACPI_NAMESPACE_NODE *NextNode; > @@ -657,7 +657,7 @@ AcpiNsNormalizePathname ( > { > /* Do one nameseg at a time */ > > - for (i = 0; (i < ACPI_NAME_SIZE) && *InputPath; i++) > + for (i = 0; (i < ACPI_NAMESEG_SIZE) && *InputPath; i++) > { > if ((i == 0) || (*InputPath != '_')) /* First char is allowed to be underscore */ > { > diff --git a/src/acpica/source/components/namespace/nsobject.c b/src/acpica/source/components/namespace/nsobject.c > index 3655b065..9c8865f0 100644 > --- a/src/acpica/source/components/namespace/nsobject.c > +++ b/src/acpica/source/components/namespace/nsobject.c > @@ -352,6 +352,11 @@ AcpiNsDetachObject ( > } > } > > + if (ObjDesc->Common.Type == ACPI_TYPE_REGION) > + { > + AcpiUtRemoveAddressRange(ObjDesc->Region.SpaceId, Node); > + } > + > /* Clear the Node entry in all cases */ > > Node->Object = NULL; > diff --git a/src/acpica/source/components/namespace/nsparse.c b/src/acpica/source/components/namespace/nsparse.c > index e559223a..43d261e4 100644 > --- a/src/acpica/source/components/namespace/nsparse.c > +++ b/src/acpica/source/components/namespace/nsparse.c > @@ -365,7 +365,7 @@ AcpiNsOneCompleteParse ( > > /* Found OSDT table, enable the namespace override feature */ > > - if (ACPI_COMPARE_NAME(Table->Signature, ACPI_SIG_OSDT) && > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_OSDT) && > PassNumber == ACPI_IMODE_LOAD_PASS1) > { > WalkState->NamespaceOverride = TRUE; > diff --git a/src/acpica/source/components/namespace/nsrepair.c b/src/acpica/source/components/namespace/nsrepair.c > index 6c9e2b2e..885d50bf 100644 > --- a/src/acpica/source/components/namespace/nsrepair.c > +++ b/src/acpica/source/components/namespace/nsrepair.c > @@ -470,7 +470,7 @@ AcpiNsMatchSimpleRepair ( > ThisName = AcpiObjectRepairInfo; > while (ThisName->ObjectConverter) > { > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, ThisName->Name)) > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, ThisName->Name)) > { > /* Check if we can actually repair this name/type combination */ > > diff --git a/src/acpica/source/components/namespace/nsrepair2.c b/src/acpica/source/components/namespace/nsrepair2.c > index 9c6ee4f7..a0b10747 100644 > --- a/src/acpica/source/components/namespace/nsrepair2.c > +++ b/src/acpica/source/components/namespace/nsrepair2.c > @@ -169,7 +169,7 @@ ACPI_STATUS (*ACPI_REPAIR_FUNCTION) ( > > typedef struct acpi_repair_info > { > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > ACPI_REPAIR_FUNCTION RepairFunction; > > } ACPI_REPAIR_INFO; > @@ -358,7 +358,7 @@ AcpiNsMatchComplexRepair ( > ThisName = AcpiNsRepairableNames; > while (ThisName->RepairFunction) > { > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, ThisName->Name)) > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, ThisName->Name)) > { > return (ThisName); > } > diff --git a/src/acpica/source/components/namespace/nsutils.c b/src/acpica/source/components/namespace/nsutils.c > index 4a9f0313..85732ff8 100644 > --- a/src/acpica/source/components/namespace/nsutils.c > +++ b/src/acpica/source/components/namespace/nsutils.c > @@ -351,7 +351,7 @@ AcpiNsGetInternalNameLength ( > } > } > > - Info->Length = (ACPI_NAME_SIZE * Info->NumSegments) + > + Info->Length = (ACPI_NAMESEG_SIZE * Info->NumSegments) + > 4 + Info->NumCarats; > > Info->NextExternalChar = NextExternalChar; > @@ -443,7 +443,7 @@ AcpiNsBuildInternalName ( > > for (; NumSegments; NumSegments--) > { > - for (i = 0; i < ACPI_NAME_SIZE; i++) > + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) > { > if (ACPI_IS_PATH_SEPARATOR (*ExternalName) || > (*ExternalName == 0)) > @@ -472,7 +472,7 @@ AcpiNsBuildInternalName ( > /* Move on the next segment */ > > ExternalName++; > - Result += ACPI_NAME_SIZE; > + Result += ACPI_NAMESEG_SIZE; > } > > /* Terminate the string */ > @@ -721,12 +721,12 @@ AcpiNsExternalizeName ( > > /* Copy and validate the 4-char name segment */ > > - ACPI_MOVE_NAME (&(*ConvertedName)[j], > + ACPI_COPY_NAMESEG (&(*ConvertedName)[j], > &InternalName[NamesIndex]); > AcpiUtRepairName (&(*ConvertedName)[j]); > > - j += ACPI_NAME_SIZE; > - NamesIndex += ACPI_NAME_SIZE; > + j += ACPI_NAMESEG_SIZE; > + NamesIndex += ACPI_NAMESEG_SIZE; > } > } > > diff --git a/src/acpica/source/components/namespace/nsxfname.c b/src/acpica/source/components/namespace/nsxfname.c > index a946b541..7332a92f 100644 > --- a/src/acpica/source/components/namespace/nsxfname.c > +++ b/src/acpica/source/components/namespace/nsxfname.c > @@ -691,8 +691,8 @@ AcpiInstallMethod ( > > /* Table must be a DSDT or SSDT */ > > - if (!ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) && > - !ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT)) > + if (!ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT) && > + !ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_SSDT)) > { > return (AE_BAD_HEADER); > } > diff --git a/src/acpica/source/components/parser/psargs.c b/src/acpica/source/components/parser/psargs.c > index 3f4ffeed..c9faa95b 100644 > --- a/src/acpica/source/components/parser/psargs.c > +++ b/src/acpica/source/components/parser/psargs.c > @@ -314,21 +314,21 @@ AcpiPsGetNextNamestring ( > > /* Two name segments */ > > - End += 1 + (2 * ACPI_NAME_SIZE); > + End += 1 + (2 * ACPI_NAMESEG_SIZE); > break; > > case AML_MULTI_NAME_PREFIX: > > /* Multiple name segments, 4 chars each, count in next byte */ > > - End += 2 + (*(End + 1) * ACPI_NAME_SIZE); > + End += 2 + (*(End + 1) * ACPI_NAMESEG_SIZE); > break; > > default: > > /* Single name segment */ > > - End += ACPI_NAME_SIZE; > + End += ACPI_NAMESEG_SIZE; > break; > } > > @@ -708,7 +708,7 @@ AcpiPsGetNextField ( > > ACPI_MOVE_32_TO_32 (&Name, ParserState->Aml); > AcpiPsSetName (Field, Name); > - ParserState->Aml += ACPI_NAME_SIZE; > + ParserState->Aml += ACPI_NAMESEG_SIZE; > > > ASL_CV_CAPTURE_COMMENTS_ONLY (ParserState); > diff --git a/src/acpica/source/components/resources/rsxface.c b/src/acpica/source/components/resources/rsxface.c > index 1a624dc2..2e8130b3 100644 > --- a/src/acpica/source/components/resources/rsxface.c > +++ b/src/acpica/source/components/resources/rsxface.c > @@ -825,10 +825,10 @@ AcpiWalkResources ( > /* Parameter validation */ > > if (!DeviceHandle || !UserFunction || !Name || > - (!ACPI_COMPARE_NAME (Name, METHOD_NAME__CRS) && > - !ACPI_COMPARE_NAME (Name, METHOD_NAME__PRS) && > - !ACPI_COMPARE_NAME (Name, METHOD_NAME__AEI) && > - !ACPI_COMPARE_NAME (Name, METHOD_NAME__DMA))) > + (!ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__CRS) && > + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__PRS) && > + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__AEI) && > + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__DMA))) > { > return_ACPI_STATUS (AE_BAD_PARAMETER); > } > diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c > index 1fc20a38..9d86fdbc 100644 > --- a/src/acpica/source/components/tables/tbdata.c > +++ b/src/acpica/source/components/tables/tbdata.c > @@ -676,7 +676,7 @@ AcpiTbVerifyTempTable ( > /* If a particular signature is expected (DSDT/FACS), it must match */ > > if (Signature && > - !ACPI_COMPARE_NAME (&TableDesc->Signature, Signature)) > + !ACPI_COMPARE_NAMESEG (&TableDesc->Signature, Signature)) > { > ACPI_BIOS_ERROR ((AE_INFO, > "Invalid signature 0x%X for ACPI table, expected [%s]", > diff --git a/src/acpica/source/components/tables/tbfind.c b/src/acpica/source/components/tables/tbfind.c > index 4ec53043..3119ddb1 100644 > --- a/src/acpica/source/components/tables/tbfind.c > +++ b/src/acpica/source/components/tables/tbfind.c > @@ -207,7 +207,7 @@ AcpiTbFindTable ( > /* Normalize the input strings */ > > memset (&Header, 0, sizeof (ACPI_TABLE_HEADER)); > - ACPI_MOVE_NAME (Header.Signature, Signature); > + ACPI_COPY_NAMESEG (Header.Signature, Signature); > strncpy (Header.OemId, OemId, ACPI_OEM_ID_SIZE); > strncpy (Header.OemTableId, OemTableId, ACPI_OEM_TABLE_ID_SIZE); > > @@ -217,7 +217,7 @@ AcpiTbFindTable ( > for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) > { > if (memcmp (&(AcpiGbl_RootTableList.Tables[i].Signature), > - Header.Signature, ACPI_NAME_SIZE)) > + Header.Signature, ACPI_NAMESEG_SIZE)) > { > /* Not the requested table */ > > @@ -245,7 +245,7 @@ AcpiTbFindTable ( > /* Check for table match on all IDs */ > > if (!memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->Signature, > - Header.Signature, ACPI_NAME_SIZE) && > + Header.Signature, ACPI_NAMESEG_SIZE) && > (!OemId[0] || > !memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemId, > Header.OemId, ACPI_OEM_ID_SIZE)) && > diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c > index fbb85ce7..c1d47022 100644 > --- a/src/acpica/source/components/tables/tbinstal.c > +++ b/src/acpica/source/components/tables/tbinstal.c > @@ -274,7 +274,7 @@ AcpiTbInstallStandardTable ( > */ > if (!Reload && > AcpiGbl_DisableSsdtTableInstall && > - ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) > + ACPI_COMPARE_NAMESEG (&NewTableDesc.Signature, ACPI_SIG_SSDT)) > { > ACPI_INFO (( > "Ignoring installation of %4.4s at %8.8X%8.8X", > diff --git a/src/acpica/source/components/tables/tbprint.c b/src/acpica/source/components/tables/tbprint.c > index ffa4856b..0ff6a6ce 100644 > --- a/src/acpica/source/components/tables/tbprint.c > +++ b/src/acpica/source/components/tables/tbprint.c > @@ -225,10 +225,10 @@ AcpiTbCleanupTableHeader ( > > memcpy (OutHeader, Header, sizeof (ACPI_TABLE_HEADER)); > > - AcpiTbFixString (OutHeader->Signature, ACPI_NAME_SIZE); > + AcpiTbFixString (OutHeader->Signature, ACPI_NAMESEG_SIZE); > AcpiTbFixString (OutHeader->OemId, ACPI_OEM_ID_SIZE); > AcpiTbFixString (OutHeader->OemTableId, ACPI_OEM_TABLE_ID_SIZE); > - AcpiTbFixString (OutHeader->AslCompilerId, ACPI_NAME_SIZE); > + AcpiTbFixString (OutHeader->AslCompilerId, ACPI_NAMESEG_SIZE); > } > > > @@ -253,7 +253,7 @@ AcpiTbPrintTableHeader ( > ACPI_TABLE_HEADER LocalHeader; > > > - if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_FACS)) > + if (ACPI_COMPARE_NAMESEG (Header->Signature, ACPI_SIG_FACS)) > { > /* FACS only has signature and length fields */ > > @@ -320,8 +320,8 @@ AcpiTbVerifyChecksum ( > * They are the odd tables, have no standard ACPI header and no checksum > */ > > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT) || > - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS)) > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) || > + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) > { > return (AE_OK); > } > diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c > index 9bb3fe89..badee3c5 100644 > --- a/src/acpica/source/components/tables/tbutils.c > +++ b/src/acpica/source/components/tables/tbutils.c > @@ -503,7 +503,7 @@ AcpiTbParseRootTable ( > ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex); > > if (ACPI_SUCCESS (Status) && > - ACPI_COMPARE_NAME ( > + ACPI_COMPARE_NAMESEG ( > &AcpiGbl_RootTableList.Tables[TableIndex].Signature, > ACPI_SIG_FADT)) > { > diff --git a/src/acpica/source/components/tables/tbxface.c b/src/acpica/source/components/tables/tbxface.c > index 097e535d..ae5991aa 100644 > --- a/src/acpica/source/components/tables/tbxface.c > +++ b/src/acpica/source/components/tables/tbxface.c > @@ -401,7 +401,7 @@ AcpiGetTableHeader ( > > for (i = 0, j = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) > { > - if (!ACPI_COMPARE_NAME ( > + if (!ACPI_COMPARE_NAMESEG ( > &(AcpiGbl_RootTableList.Tables[i].Signature), Signature)) > { > continue; > @@ -504,7 +504,7 @@ AcpiGetTable ( > { > TableDesc = &AcpiGbl_RootTableList.Tables[i]; > > - if (!ACPI_COMPARE_NAME (&TableDesc->Signature, Signature)) > + if (!ACPI_COMPARE_NAMESEG (&TableDesc->Signature, Signature)) > { > continue; > } > diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c > index bda55ea2..217d54bf 100644 > --- a/src/acpica/source/components/tables/tbxfload.c > +++ b/src/acpica/source/components/tables/tbxfload.c > @@ -275,7 +275,7 @@ AcpiTbLoadNamespace ( > Table = &AcpiGbl_RootTableList.Tables[AcpiGbl_DsdtIndex]; > > if (!AcpiGbl_RootTableList.CurrentTableCount || > - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_DSDT) || > + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_DSDT) || > ACPI_FAILURE (AcpiTbValidateTable (Table))) > { > Status = AE_NO_ACPI_TABLES; > @@ -334,9 +334,9 @@ AcpiTbLoadNamespace ( > Table = &AcpiGbl_RootTableList.Tables[i]; > > if (!Table->Address || > - (!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) && > - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) && > - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) || > + (!ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_SSDT) && > + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_PSDT) && > + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_OSDT)) || > ACPI_FAILURE (AcpiTbValidateTable (Table))) > { > continue; > @@ -556,7 +556,7 @@ AcpiUnloadParentTable ( > * only these types can contain AML and thus are the only types > * that can create namespace objects. > */ > - if (ACPI_COMPARE_NAME ( > + if (ACPI_COMPARE_NAMESEG ( > AcpiGbl_RootTableList.Tables[i].Signature.Ascii, > ACPI_SIG_DSDT)) > { > diff --git a/src/acpica/source/components/utilities/utascii.c b/src/acpica/source/components/utilities/utascii.c > index 08dcb920..c7aaff40 100644 > --- a/src/acpica/source/components/utilities/utascii.c > +++ b/src/acpica/source/components/utilities/utascii.c > @@ -176,7 +176,7 @@ AcpiUtValidNameseg ( > > /* Validate each character in the signature */ > > - for (i = 0; i < ACPI_NAME_SIZE; i++) > + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) > { > if (!AcpiUtValidNameChar (Name[i], i)) > { > diff --git a/src/acpica/source/components/utilities/utdecode.c b/src/acpica/source/components/utilities/utdecode.c > index 443a6dd7..3daff815 100644 > --- a/src/acpica/source/components/utilities/utdecode.c > +++ b/src/acpica/source/components/utilities/utdecode.c > @@ -214,17 +214,17 @@ const UINT8 AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] = > > const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = > { > - "SystemMemory", /* 0x00 */ > - "SystemIO", /* 0x01 */ > - "PCI_Config", /* 0x02 */ > - "EmbeddedControl", /* 0x03 */ > - "SMBus", /* 0x04 */ > - "SystemCMOS", /* 0x05 */ > - "PCIBARTarget", /* 0x06 */ > - "IPMI", /* 0x07 */ > - "GeneralPurposeIo", /* 0x08 */ > - "GenericSerialBus", /* 0x09 */ > - "PCC" /* 0x0A */ > + "SystemMemory", /* 0x00 */ > + "SystemIO", /* 0x01 */ > + "PCI_Config", /* 0x02 */ > + "EmbeddedControl", /* 0x03 */ > + "SMBus", /* 0x04 */ > + "SystemCMOS", /* 0x05 */ > + "PCIBARTarget", /* 0x06 */ > + "IPMI", /* 0x07 */ > + "GeneralPurposeIo", /* 0x08 */ > + "GenericSerialBus", /* 0x09 */ > + "PlatformCommChannel"/* 0x0A */ > }; > > > @@ -416,7 +416,7 @@ AcpiUtGetNodeName ( > ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) Object; > > > - /* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */ > + /* Must return a string of exactly 4 characters == ACPI_NAMESEG_SIZE */ > > if (!Object) > { > diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c > index acc048d6..466e3fa2 100644 > --- a/src/acpica/source/components/utilities/utmisc.c > +++ b/src/acpica/source/components/utilities/utmisc.c > @@ -214,10 +214,10 @@ AcpiUtIsAmlTable ( > > /* These are the only tables that contain executable AML */ > > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) || > - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_PSDT) || > - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT) || > - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_OSDT) || > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT) || > + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_PSDT) || > + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_SSDT) || > + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_OSDT) || > ACPI_IS_OEM_SIG (Table->Signature)) > { > return (TRUE); > diff --git a/src/acpica/source/components/utilities/utpredef.c b/src/acpica/source/components/utilities/utpredef.c > index e1cdd704..8d9c5b0b 100644 > --- a/src/acpica/source/components/utilities/utpredef.c > +++ b/src/acpica/source/components/utilities/utpredef.c > @@ -237,7 +237,7 @@ AcpiUtMatchPredefinedMethod ( > ThisName = AcpiGbl_PredefinedMethods; > while (ThisName->Info.Name[0]) > { > - if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name)) > + if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name)) > { > return (ThisName); > } > @@ -374,7 +374,7 @@ AcpiUtMatchResourceName ( > 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 (ThisName); > } > diff --git a/src/acpica/source/components/utilities/utstring.c b/src/acpica/source/components/utilities/utstring.c > index 893a9574..f0ee49a0 100644 > --- a/src/acpica/source/components/utilities/utstring.c > +++ b/src/acpica/source/components/utilities/utstring.c > @@ -303,16 +303,16 @@ AcpiUtRepairName ( > * Special case for the root node. This can happen if we get an > * error during the execution of module-level code. > */ > - if (ACPI_COMPARE_NAME (Name, ACPI_ROOT_PATHNAME)) > + if (ACPI_COMPARE_NAMESEG (Name, ACPI_ROOT_PATHNAME)) > { > return; > } > > - ACPI_MOVE_NAME (&OriginalName, Name); > + ACPI_COPY_NAMESEG (&OriginalName, Name); > > /* Check each character in the name */ > > - for (i = 0; i < ACPI_NAME_SIZE; i++) > + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) > { > if (AcpiUtValidNameChar (Name[i], i)) > { > diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h > index b5c4aa02..e1ed0053 100644 > --- a/src/acpica/source/include/aclocal.h > +++ b/src/acpica/source/include/aclocal.h > @@ -480,7 +480,7 @@ ACPI_STATUS (*ACPI_INTERNAL_METHOD) ( > */ > typedef struct acpi_name_info > { > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > UINT16 ArgumentList; > UINT8 ExpectedBtypes; > > @@ -568,7 +568,7 @@ typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER) ( > > typedef struct acpi_simple_repair_info > { > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > UINT32 UnexpectedBtypes; > UINT32 PackageIndex; > ACPI_OBJECT_CONVERTER ObjectConverter; > diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h > index ad653f0e..d3e4e7b5 100644 > --- a/src/acpica/source/include/acpixf.h > +++ b/src/acpica/source/include/acpixf.h > @@ -154,7 +154,7 @@ > > /* Current ACPICA subsystem version in YYYYMMDD format */ > > -#define ACPI_CA_VERSION 0x20190215 > +#define ACPI_CA_VERSION 0x20190329 > > #include "acconfig.h" > #include "actypes.h" > diff --git a/src/acpica/source/include/actbl.h b/src/acpica/source/include/actbl.h > index 97134e5e..d6b9e8ff 100644 > --- a/src/acpica/source/include/actbl.h > +++ b/src/acpica/source/include/actbl.h > @@ -213,14 +213,14 @@ > > typedef struct acpi_table_header > { > - char Signature[ACPI_NAME_SIZE]; /* ASCII table signature */ > + char Signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */ > UINT32 Length; /* Length of table in bytes, including this header */ > UINT8 Revision; /* ACPI Specification minor version number */ > UINT8 Checksum; /* To make sum of entire table == 0 */ > char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ > char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ > UINT32 OemRevision; /* OEM revision number */ > - char AslCompilerId[ACPI_NAME_SIZE]; /* ASCII ASL compiler vendor ID */ > + char AslCompilerId[ACPI_NAMESEG_SIZE]; /* ASCII ASL compiler vendor ID */ > UINT32 AslCompilerRevision; /* ASL compiler version */ > > } ACPI_TABLE_HEADER; > diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h > index 2a65ee8f..e7a2d578 100644 > --- a/src/acpica/source/include/actypes.h > +++ b/src/acpica/source/include/actypes.h > @@ -520,7 +520,7 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS; > > /* Names within the namespace are 4 bytes long */ > > -#define ACPI_NAME_SIZE 4 > +#define ACPI_NAMESEG_SIZE 4 /* Fixed by ACPI spec */ > #define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ > #define ACPI_PATH_SEPARATOR '.' > > @@ -666,11 +666,11 @@ typedef UINT64 ACPI_INTEGER; > /* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */ > > #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED > -#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) > -#define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) > +#define ACPI_COMPARE_NAMESEG(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) > +#define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) > #else > -#define ACPI_COMPARE_NAME(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) > -#define ACPI_MOVE_NAME(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) > +#define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE)) > +#define ACPI_COPY_NAMESEG(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE)) > #endif > > /* Support for the special RSDP signature (8 characters) */ > @@ -680,7 +680,7 @@ typedef UINT64 ACPI_INTEGER; > > /* Support for OEMx signature (x can be any character) */ > #define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\ > - strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE) > + strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE) > > /* > * Algorithm to obtain access bit width. > diff --git a/src/acpica/source/include/platform/aclinux.h b/src/acpica/source/include/platform/aclinux.h > index 990d17c7..f6522e32 100644 > --- a/src/acpica/source/include/platform/aclinux.h > +++ b/src/acpica/source/include/platform/aclinux.h > @@ -221,6 +221,11 @@ > #define ACPI_NO_ERROR_MESSAGES > #undef ACPI_DEBUG_OUTPUT > > +/* Use a specific bugging default separate from ACPICA */ > + > +#undef ACPI_DEBUG_DEFAULT > +#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) > + > /* External interface for __KERNEL__, stub is needed */ > > #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \ > diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h > index eb244841..602356de 100644 > --- a/src/acpica/source/tools/acpiexec/aecommon.h > +++ b/src/acpica/source/tools/acpiexec/aecommon.h > @@ -287,6 +287,10 @@ void > AeMiscellaneousTests ( > void); > > +void > +AeLateTest ( > + void); > + > /* aeregion */ > > ACPI_STATUS > diff --git a/src/acpica/source/tools/acpiexec/aeexception.c b/src/acpica/source/tools/acpiexec/aeexception.c > index 2a25d181..77ba166b 100644 > --- a/src/acpica/source/tools/acpiexec/aeexception.c > +++ b/src/acpica/source/tools/acpiexec/aeexception.c > @@ -206,7 +206,7 @@ AeExceptionHandler ( > > if (Name) > { > - if (ACPI_COMPARE_NAME (&Name, ACPI_ROOT_PATHNAME)) > + if (ACPI_COMPARE_NAMESEG (&Name, ACPI_ROOT_PATHNAME)) > { > AcpiOsPrintf (AE_PREFIX > "Evaluating executable code at [%s]\n", ACPI_NAMESPACE_ROOT); > Acked-by: Alex Hung <alex.hung@canonical.com>
On 3/30/19 1:02 AM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > changes in this release of ACPICA are detailed at the following > link on the ACPICA developer mailing list: > > https://lists.acpica.org/pipermail/devel/2019-March/001878.html > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/acpica/source/common/acfileio.c | 2 +- > src/acpica/source/common/adisasm.c | 2 +- > src/acpica/source/common/adwalk.c | 2 +- > src/acpica/source/common/ahpredef.c | 2 +- > src/acpica/source/common/ahtable.c | 2 +- > src/acpica/source/common/dmrestag.c | 24 ++++++++++++------- > src/acpica/source/common/dmtable.c | 6 ++--- > src/acpica/source/common/dmtables.c | 2 +- > src/acpica/source/compiler/aslanalyze.c | 14 +++++------ > src/acpica/source/compiler/aslcodegen.c | 16 +++++++++---- > src/acpica/source/compiler/aslcompiler.l | 2 +- > src/acpica/source/compiler/asldefine.h | 2 +- > src/acpica/source/compiler/aslerror.c | 2 +- > src/acpica/source/compiler/aslload.c | 11 +++++---- > src/acpica/source/compiler/aslmessages.c | 2 +- > src/acpica/source/compiler/aslmethod.c | 8 +++---- > src/acpica/source/compiler/asloffset.c | 10 ++++---- > src/acpica/source/compiler/asloperands.c | 4 ++-- > src/acpica/source/compiler/aslopt.c | 10 ++++---- > src/acpica/source/compiler/aslpredef.c | 6 ++--- > src/acpica/source/compiler/asltransform.c | 2 +- > src/acpica/source/compiler/aslutils.c | 4 ++-- > src/acpica/source/compiler/aslxref.c | 14 +++++++---- > src/acpica/source/compiler/dtcompile.c | 4 ++-- > src/acpica/source/compiler/dttemplate.c | 22 ++++++++--------- > .../source/components/debugger/dbexec.c | 2 +- > .../source/components/debugger/dbnames.c | 2 +- > .../source/components/disassembler/dmbuffer.c | 8 +++---- > .../source/components/disassembler/dmnames.c | 6 ++--- > .../source/components/dispatcher/dsfield.c | 2 +- > .../source/components/dispatcher/dsinit.c | 2 +- > .../source/components/events/evgpeinit.c | 4 ++-- > .../source/components/executer/exnames.c | 6 ++--- > .../source/components/namespace/nsaccess.c | 2 +- > .../source/components/namespace/nsdump.c | 2 +- > .../source/components/namespace/nsinit.c | 4 ++-- > .../source/components/namespace/nsnames.c | 8 +++---- > .../source/components/namespace/nsobject.c | 5 ++++ > .../source/components/namespace/nsparse.c | 2 +- > .../source/components/namespace/nsrepair.c | 2 +- > .../source/components/namespace/nsrepair2.c | 4 ++-- > .../source/components/namespace/nsutils.c | 12 +++++----- > .../source/components/namespace/nsxfname.c | 4 ++-- > src/acpica/source/components/parser/psargs.c | 8 +++---- > .../source/components/resources/rsxface.c | 8 +++---- > src/acpica/source/components/tables/tbdata.c | 2 +- > src/acpica/source/components/tables/tbfind.c | 6 ++--- > .../source/components/tables/tbinstal.c | 2 +- > src/acpica/source/components/tables/tbprint.c | 10 ++++---- > src/acpica/source/components/tables/tbutils.c | 2 +- > src/acpica/source/components/tables/tbxface.c | 4 ++-- > .../source/components/tables/tbxfload.c | 10 ++++---- > .../source/components/utilities/utascii.c | 2 +- > .../source/components/utilities/utdecode.c | 24 +++++++++---------- > .../source/components/utilities/utmisc.c | 8 +++---- > .../source/components/utilities/utpredef.c | 4 ++-- > .../source/components/utilities/utstring.c | 6 ++--- > src/acpica/source/include/aclocal.h | 4 ++-- > src/acpica/source/include/acpixf.h | 2 +- > src/acpica/source/include/actbl.h | 4 ++-- > src/acpica/source/include/actypes.h | 12 +++++----- > src/acpica/source/include/platform/aclinux.h | 5 ++++ > src/acpica/source/tools/acpiexec/aecommon.h | 4 ++++ > .../source/tools/acpiexec/aeexception.c | 2 +- > 64 files changed, 208 insertions(+), 173 deletions(-) > > diff --git a/src/acpica/source/common/acfileio.c b/src/acpica/source/common/acfileio.c > index 18992b20..74f28577 100644 > --- a/src/acpica/source/common/acfileio.c > +++ b/src/acpica/source/common/acfileio.c > @@ -585,7 +585,7 @@ AcValidateTableHeader ( > * These fields must be ASCII: OemId, OemTableId, AslCompilerId. > * We allow a NULL terminator in OemId and OemTableId. > */ > - for (i = 0; i < ACPI_NAME_SIZE; i++) > + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) > { > if (!ACPI_IS_ASCII ((UINT8) TableHeader.AslCompilerId[i])) > { > diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c > index 6fbfaf5d..518468b7 100644 > --- a/src/acpica/source/common/adisasm.c > +++ b/src/acpica/source/common/adisasm.c > @@ -459,7 +459,7 @@ AdDisassembleOneTable ( > */ > if (AcpiGbl_CaptureComments) > { > - strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAME_SIZE); > + strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAMESEG_SIZE); > } > #endif > > diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c > index 9f51b64e..d9bd4d9e 100644 > --- a/src/acpica/source/common/adwalk.c > +++ b/src/acpica/source/common/adwalk.c > @@ -814,7 +814,7 @@ AcpiDmLoadDescendingOp ( > > while (AcpiGbl_PreDefinedNames[PreDefineIndex].Name) > { > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, > AcpiGbl_PreDefinedNames[PreDefineIndex].Name)) > { > PreDefined = TRUE; > diff --git a/src/acpica/source/common/ahpredef.c b/src/acpica/source/common/ahpredef.c > index 58b2d662..a76148dc 100644 > --- a/src/acpica/source/common/ahpredef.c > +++ b/src/acpica/source/common/ahpredef.c > @@ -490,7 +490,7 @@ AcpiAhMatchPredefinedName ( > > for (Info = AslPredefinedInfo; Info->Name; Info++) > { > - if (ACPI_COMPARE_NAME (Nameseg, Info->Name)) > + if (ACPI_COMPARE_NAMESEG (Nameseg, Info->Name)) > { > return (Info); > } > diff --git a/src/acpica/source/common/ahtable.c b/src/acpica/source/common/ahtable.c > index 96b5f9f6..599c53a8 100644 > --- a/src/acpica/source/common/ahtable.c > +++ b/src/acpica/source/common/ahtable.c > @@ -183,7 +183,7 @@ AcpiAhGetTableInfo ( > > for (Info = AcpiGbl_SupportedTables; Info->Signature; Info++) > { > - if (ACPI_COMPARE_NAME (Signature, Info->Signature)) > + if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature)) > { > return (Info); > } > diff --git a/src/acpica/source/common/dmrestag.c b/src/acpica/source/common/dmrestag.c > index c33b0497..8ab92d71 100644 > --- a/src/acpica/source/common/dmrestag.c > +++ b/src/acpica/source/common/dmrestag.c > @@ -747,6 +747,7 @@ AcpiGetTagPathname ( > UINT8 ResourceTableIndex; > ACPI_SIZE RequiredSize; > char *Pathname; > + char *PathnameEnd; > AML_RESOURCE *Aml; > ACPI_PARSE_OBJECT *Op; > char *InternalPath; > @@ -809,19 +810,26 @@ AcpiGetTagPathname ( > RequiredSize, FALSE); > > /* > - * Create the full path to the resource and tag by: remove the buffer name, > - * append the resource descriptor name, append a dot, append the tag name. > + * Create the full path to the resource and tag by: > + * 1) Remove the buffer nameseg from the end of the pathname > + * 2) Append the resource descriptor nameseg > + * 3) Append a dot > + * 4) Append the field tag nameseg > * > - * TBD: Always using the full path is a bit brute force, the path can be > + * Always using the full path is a bit brute force, the path can be > * often be optimized with carats (if the original buffer namepath is a > * single nameseg). This doesn't really matter, because these paths do not > * end up in the final compiled AML, it's just an appearance issue for the > * disassembled code. > */ > - Pathname[strlen (Pathname) - ACPI_NAME_SIZE] = 0; > - strncat (Pathname, ResourceNode->Name.Ascii, ACPI_NAME_SIZE); > - strcat (Pathname, "."); > - strncat (Pathname, Tag, ACPI_NAME_SIZE); > + PathnameEnd = Pathname + (RequiredSize - ACPI_NAMESEG_SIZE - 1); > + ACPI_COPY_NAMESEG (PathnameEnd, ResourceNode->Name.Ascii); > + > + PathnameEnd += ACPI_NAMESEG_SIZE; > + *PathnameEnd = '.'; > + > + PathnameEnd++; > + ACPI_COPY_NAMESEG (PathnameEnd, Tag); > > /* Internalize the namepath to AML format */ > > @@ -863,7 +871,7 @@ static void > AcpiDmUpdateResourceName ( > ACPI_NAMESPACE_NODE *ResourceNode) > { > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > > > /* Ignore if a unique name has already been assigned */ > diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c > index e51ff424..6b67662b 100644 > --- a/src/acpica/source/common/dmtable.c > +++ b/src/acpica/source/common/dmtable.c > @@ -602,7 +602,7 @@ AcpiDmGetTableData ( > > for (Info = AcpiDmTableData; Info->Signature; Info++) > { > - if (ACPI_COMPARE_NAME (Signature, Info->Signature)) > + if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature)) > { > return (Info); > } > @@ -657,7 +657,7 @@ AcpiDmDumpDataTable ( > * Handle tables that don't use the common ACPI table header structure. > * Currently, these are the FACS, RSDP, and S3PT. > */ > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS)) > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) > { > Length = Table->Length; > Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs); > @@ -670,7 +670,7 @@ AcpiDmDumpDataTable ( > { > Length = AcpiDmDumpRsdp (Table); > } > - else if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT)) > + else if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT)) > { > Length = AcpiDmDumpS3pt (Table); > } > diff --git a/src/acpica/source/common/dmtables.c b/src/acpica/source/common/dmtables.c > index 1a8da3af..f9579509 100644 > --- a/src/acpica/source/common/dmtables.c > +++ b/src/acpica/source/common/dmtables.c > @@ -281,7 +281,7 @@ AdCreateTableHeader ( > > /* Revision of DSDT controls the ACPI integer width */ > > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT)) > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT)) > { > AcpiOsPrintf (" **** 32-bit table (V1), no 64-bit math support"); > } > diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c > index 0ea8dc47..58da5e2e 100644 > --- a/src/acpica/source/compiler/aslanalyze.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslcodegen.c b/src/acpica/source/compiler/aslcodegen.c > index 21459178..8edcb668 100644 > --- a/src/acpica/source/compiler/aslcodegen.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l > index 72fbbef3..26c221e5 100644 > --- a/src/acpica/source/compiler/aslcompiler.l > +++ b/src/acpica/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/src/acpica/source/compiler/asldefine.h b/src/acpica/source/compiler/asldefine.h > index a13acec0..8089d0b9 100644 > --- a/src/acpica/source/compiler/asldefine.h > +++ b/src/acpica/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/src/acpica/source/compiler/aslerror.c b/src/acpica/source/compiler/aslerror.c > index 5d3a7764..a2f9fcef 100644 > --- a/src/acpica/source/compiler/aslerror.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c > index c910358d..dfbdf7ce 100644 > --- a/src/acpica/source/compiler/aslload.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c > index 07e98482..0f31c655 100644 > --- a/src/acpica/source/compiler/aslmessages.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c > index 4563317d..98884bc3 100644 > --- a/src/acpica/source/compiler/aslmethod.c > +++ b/src/acpica/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/src/acpica/source/compiler/asloffset.c b/src/acpica/source/compiler/asloffset.c > index 4a99c39a..dd8e1b07 100644 > --- a/src/acpica/source/compiler/asloffset.c > +++ b/src/acpica/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/src/acpica/source/compiler/asloperands.c b/src/acpica/source/compiler/asloperands.c > index 172f3470..67e16fd5 100644 > --- a/src/acpica/source/compiler/asloperands.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslopt.c b/src/acpica/source/compiler/aslopt.c > index 1b0c4d33..6d2045f8 100644 > --- a/src/acpica/source/compiler/aslopt.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslpredef.c b/src/acpica/source/compiler/aslpredef.c > index ab29105a..1f850239 100644 > --- a/src/acpica/source/compiler/aslpredef.c > +++ b/src/acpica/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/src/acpica/source/compiler/asltransform.c b/src/acpica/source/compiler/asltransform.c > index e9f0d049..5237c638 100644 > --- a/src/acpica/source/compiler/asltransform.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c > index 1fc98bb5..6b0d5eff 100644 > --- a/src/acpica/source/compiler/aslutils.c > +++ b/src/acpica/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/src/acpica/source/compiler/aslxref.c b/src/acpica/source/compiler/aslxref.c > index b3067feb..99f6c4a0 100644 > --- a/src/acpica/source/compiler/aslxref.c > +++ b/src/acpica/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/src/acpica/source/compiler/dtcompile.c b/src/acpica/source/compiler/dtcompile.c > index 88a7a8b0..95fcb2d4 100644 > --- a/src/acpica/source/compiler/dtcompile.c > +++ b/src/acpica/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/src/acpica/source/compiler/dttemplate.c b/src/acpica/source/compiler/dttemplate.c > index 8e3124a3..4cc6c040 100644 > --- a/src/acpica/source/compiler/dttemplate.c > +++ b/src/acpica/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)); > diff --git a/src/acpica/source/components/debugger/dbexec.c b/src/acpica/source/components/debugger/dbexec.c > index 49d1180f..8897fa6d 100644 > --- a/src/acpica/source/components/debugger/dbexec.c > +++ b/src/acpica/source/components/debugger/dbexec.c > @@ -658,7 +658,7 @@ AcpiDbExecute ( > > /* Dump a _PLD buffer if present */ > > - if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, > + if (ACPI_COMPARE_NAMESEG ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, > AcpiGbl_DbMethodInfo.Method)->Name.Ascii), > METHOD_NAME__PLD)) > { > diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c > index 3c01e808..2c9af4be 100644 > --- a/src/acpica/source/components/debugger/dbnames.c > +++ b/src/acpica/source/components/debugger/dbnames.c > @@ -557,7 +557,7 @@ AcpiDbFindNameInNamespace ( > char *AcpiNamePtr = AcpiName; > > > - if (strlen (NameArg) > ACPI_NAME_SIZE) > + if (strlen (NameArg) > ACPI_NAMESEG_SIZE) > { > AcpiOsPrintf ("Name must be no longer than 4 characters\n"); > return (AE_OK); > diff --git a/src/acpica/source/components/disassembler/dmbuffer.c b/src/acpica/source/components/disassembler/dmbuffer.c > index a58ff2f5..f61c8378 100644 > --- a/src/acpica/source/components/disassembler/dmbuffer.c > +++ b/src/acpica/source/components/disassembler/dmbuffer.c > @@ -736,7 +736,7 @@ AcpiDmIsPldBuffer ( > { > Node = ParentOp->Common.Node; > > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD)) > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__PLD)) > { > /* Ignore the Size argument in the disassembly of this buffer op */ > > @@ -770,7 +770,7 @@ AcpiDmIsPldBuffer ( > { > Node = ParentOp->Common.Node; > > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD)) > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__PLD)) > { > /* Ignore the Size argument in the disassembly of this buffer op */ > > @@ -1100,7 +1100,7 @@ AcpiDmCheckForHardwareId ( > > /* Check for _HID - has one argument */ > > - if (ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID)) > + if (ACPI_COMPARE_NAMESEG (&Name, METHOD_NAME__HID)) > { > AcpiDmGetHardwareIdType (NextOp); > return; > @@ -1108,7 +1108,7 @@ AcpiDmCheckForHardwareId ( > > /* Exit if not _CID */ > > - if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__CID)) > + if (!ACPI_COMPARE_NAMESEG (&Name, METHOD_NAME__CID)) > { > return; > } > diff --git a/src/acpica/source/components/disassembler/dmnames.c b/src/acpica/source/components/disassembler/dmnames.c > index bbff3e0a..d07af72f 100644 > --- a/src/acpica/source/components/disassembler/dmnames.c > +++ b/src/acpica/source/components/disassembler/dmnames.c > @@ -199,8 +199,8 @@ AcpiDmDumpName ( > > /* Remove all trailing underscores from the name */ > > - Length = ACPI_NAME_SIZE; > - for (i = (ACPI_NAME_SIZE - 1); i != 0; i--) > + Length = ACPI_NAMESEG_SIZE; > + for (i = (ACPI_NAMESEG_SIZE - 1); i != 0; i--) > { > if (NewName[i] == '_') > { > @@ -378,7 +378,7 @@ AcpiDmNamestring ( > AcpiOsPrintf ("."); > } > > - Name += ACPI_NAME_SIZE; > + Name += ACPI_NAMESEG_SIZE; > } > } > > diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c > index cc0a271e..3aff4db1 100644 > --- a/src/acpica/source/components/dispatcher/dsfield.c > +++ b/src/acpica/source/components/dispatcher/dsfield.c > @@ -685,7 +685,7 @@ AcpiDsCreateField ( > Info.RegionNode = RegionNode; > > Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next); > - if (Info.RegionNode->Type == ACPI_ADR_SPACE_PLATFORM_COMM && > + if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM && > !(RegionNode->Object->Field.InternalPccBuffer > = ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length))) > { > diff --git a/src/acpica/source/components/dispatcher/dsinit.c b/src/acpica/source/components/dispatcher/dsinit.c > index 334187a3..e7045f46 100644 > --- a/src/acpica/source/components/dispatcher/dsinit.c > +++ b/src/acpica/source/components/dispatcher/dsinit.c > @@ -359,7 +359,7 @@ AcpiDsInitializeObjects ( > > /* DSDT is always the first AML table */ > > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT)) > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT)) > { > ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, > "\nInitializing Namespace objects:\n")); > diff --git a/src/acpica/source/components/events/evgpeinit.c b/src/acpica/source/components/events/evgpeinit.c > index 4aec9b80..b7e02a06 100644 > --- a/src/acpica/source/components/events/evgpeinit.c > +++ b/src/acpica/source/components/events/evgpeinit.c > @@ -447,7 +447,7 @@ AcpiEvMatchGpeMethod ( > ACPI_STATUS Status; > UINT32 GpeNumber; > UINT8 TempGpeNumber; > - char Name[ACPI_NAME_SIZE + 1]; > + char Name[ACPI_NAMESEG_SIZE + 1]; > UINT8 Type; > > > @@ -468,7 +468,7 @@ AcpiEvMatchGpeMethod ( > * 1) Extract the method name and null terminate it > */ > ACPI_MOVE_32_TO_32 (Name, &MethodNode->Name.Integer); > - Name[ACPI_NAME_SIZE] = 0; > + Name[ACPI_NAMESEG_SIZE] = 0; > > /* 2) Name must begin with an underscore */ > > diff --git a/src/acpica/source/components/executer/exnames.c b/src/acpica/source/components/executer/exnames.c > index f652dfab..70a01467 100644 > --- a/src/acpica/source/components/executer/exnames.c > +++ b/src/acpica/source/components/executer/exnames.c > @@ -207,11 +207,11 @@ AcpiExAllocateNameString ( > { > /* Special case for root */ > > - SizeNeeded = 1 + (ACPI_NAME_SIZE * NumNameSegs) + 2 + 1; > + SizeNeeded = 1 + (ACPI_NAMESEG_SIZE * NumNameSegs) + 2 + 1; > } > else > { > - SizeNeeded = PrefixCount + (ACPI_NAME_SIZE * NumNameSegs) + 2 + 1; > + SizeNeeded = PrefixCount + (ACPI_NAMESEG_SIZE * NumNameSegs) + 2 + 1; > } > > /* > @@ -310,7 +310,7 @@ AcpiExNameSegment ( > } > > for (Index = 0; > - (Index < ACPI_NAME_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0)); > + (Index < ACPI_NAMESEG_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0)); > Index++) > { > CharBuf[Index] = *AmlAddress++; > diff --git a/src/acpica/source/components/namespace/nsaccess.c b/src/acpica/source/components/namespace/nsaccess.c > index d8e3b841..94dba130 100644 > --- a/src/acpica/source/components/namespace/nsaccess.c > +++ b/src/acpica/source/components/namespace/nsaccess.c > @@ -851,7 +851,7 @@ AcpiNsLookup ( > > /* Point to next name segment and make this node current */ > > - Path += ACPI_NAME_SIZE; > + Path += ACPI_NAMESEG_SIZE; > CurrentNode = ThisNode; > } > > diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c > index 11cb03e3..6ea04525 100644 > --- a/src/acpica/source/components/namespace/nsdump.c > +++ b/src/acpica/source/components/namespace/nsdump.c > @@ -236,7 +236,7 @@ AcpiNsPrintPathname ( > AcpiOsPrintf ("?"); > } > > - Pathname += ACPI_NAME_SIZE; > + Pathname += ACPI_NAMESEG_SIZE; > NumSegments--; > if (NumSegments) > { > diff --git a/src/acpica/source/components/namespace/nsinit.c b/src/acpica/source/components/namespace/nsinit.c > index ccdef3c9..4dd28fd4 100644 > --- a/src/acpica/source/components/namespace/nsinit.c > +++ b/src/acpica/source/components/namespace/nsinit.c > @@ -662,7 +662,7 @@ AcpiNsFindIniMethods ( > > /* We are only looking for methods named _INI */ > > - if (!ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__INI)) > + if (!ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__INI)) > { > return (AE_OK); > } > @@ -839,7 +839,7 @@ AcpiNsInitOneDevice ( > * Note: We know there is an _INI within this subtree, but it may not be > * under this particular device, it may be lower in the branch. > */ > - if (!ACPI_COMPARE_NAME (DeviceNode->Name.Ascii, "_SB_") || > + if (!ACPI_COMPARE_NAMESEG (DeviceNode->Name.Ascii, "_SB_") || > DeviceNode->Parent != AcpiGbl_RootNode) > { > ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname ( > diff --git a/src/acpica/source/components/namespace/nsnames.c b/src/acpica/source/components/namespace/nsnames.c > index 0bab2f23..7633e2ef 100644 > --- a/src/acpica/source/components/namespace/nsnames.c > +++ b/src/acpica/source/components/namespace/nsnames.c > @@ -273,8 +273,8 @@ AcpiNsHandleToName ( > /* Just copy the ACPI name from the Node and zero terminate it */ > > NodeName = AcpiUtGetNodeName (Node); > - ACPI_MOVE_NAME (Buffer->Pointer, NodeName); > - ((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0; > + ACPI_COPY_NAMESEG (Buffer->Pointer, NodeName); > + ((char *) Buffer->Pointer) [ACPI_NAMESEG_SIZE] = 0; > > ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%4.4s\n", (char *) Buffer->Pointer)); > return_ACPI_STATUS (AE_OK); > @@ -374,7 +374,7 @@ AcpiNsBuildNormalizedPath ( > BOOLEAN NoTrailing) > { > UINT32 Length = 0, i; > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > BOOLEAN DoNoTrailing; > char c, *Left, *Right; > ACPI_NAMESPACE_NODE *NextNode; > @@ -657,7 +657,7 @@ AcpiNsNormalizePathname ( > { > /* Do one nameseg at a time */ > > - for (i = 0; (i < ACPI_NAME_SIZE) && *InputPath; i++) > + for (i = 0; (i < ACPI_NAMESEG_SIZE) && *InputPath; i++) > { > if ((i == 0) || (*InputPath != '_')) /* First char is allowed to be underscore */ > { > diff --git a/src/acpica/source/components/namespace/nsobject.c b/src/acpica/source/components/namespace/nsobject.c > index 3655b065..9c8865f0 100644 > --- a/src/acpica/source/components/namespace/nsobject.c > +++ b/src/acpica/source/components/namespace/nsobject.c > @@ -352,6 +352,11 @@ AcpiNsDetachObject ( > } > } > > + if (ObjDesc->Common.Type == ACPI_TYPE_REGION) > + { > + AcpiUtRemoveAddressRange(ObjDesc->Region.SpaceId, Node); > + } > + > /* Clear the Node entry in all cases */ > > Node->Object = NULL; > diff --git a/src/acpica/source/components/namespace/nsparse.c b/src/acpica/source/components/namespace/nsparse.c > index e559223a..43d261e4 100644 > --- a/src/acpica/source/components/namespace/nsparse.c > +++ b/src/acpica/source/components/namespace/nsparse.c > @@ -365,7 +365,7 @@ AcpiNsOneCompleteParse ( > > /* Found OSDT table, enable the namespace override feature */ > > - if (ACPI_COMPARE_NAME(Table->Signature, ACPI_SIG_OSDT) && > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_OSDT) && > PassNumber == ACPI_IMODE_LOAD_PASS1) > { > WalkState->NamespaceOverride = TRUE; > diff --git a/src/acpica/source/components/namespace/nsrepair.c b/src/acpica/source/components/namespace/nsrepair.c > index 6c9e2b2e..885d50bf 100644 > --- a/src/acpica/source/components/namespace/nsrepair.c > +++ b/src/acpica/source/components/namespace/nsrepair.c > @@ -470,7 +470,7 @@ AcpiNsMatchSimpleRepair ( > ThisName = AcpiObjectRepairInfo; > while (ThisName->ObjectConverter) > { > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, ThisName->Name)) > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, ThisName->Name)) > { > /* Check if we can actually repair this name/type combination */ > > diff --git a/src/acpica/source/components/namespace/nsrepair2.c b/src/acpica/source/components/namespace/nsrepair2.c > index 9c6ee4f7..a0b10747 100644 > --- a/src/acpica/source/components/namespace/nsrepair2.c > +++ b/src/acpica/source/components/namespace/nsrepair2.c > @@ -169,7 +169,7 @@ ACPI_STATUS (*ACPI_REPAIR_FUNCTION) ( > > typedef struct acpi_repair_info > { > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > ACPI_REPAIR_FUNCTION RepairFunction; > > } ACPI_REPAIR_INFO; > @@ -358,7 +358,7 @@ AcpiNsMatchComplexRepair ( > ThisName = AcpiNsRepairableNames; > while (ThisName->RepairFunction) > { > - if (ACPI_COMPARE_NAME (Node->Name.Ascii, ThisName->Name)) > + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, ThisName->Name)) > { > return (ThisName); > } > diff --git a/src/acpica/source/components/namespace/nsutils.c b/src/acpica/source/components/namespace/nsutils.c > index 4a9f0313..85732ff8 100644 > --- a/src/acpica/source/components/namespace/nsutils.c > +++ b/src/acpica/source/components/namespace/nsutils.c > @@ -351,7 +351,7 @@ AcpiNsGetInternalNameLength ( > } > } > > - Info->Length = (ACPI_NAME_SIZE * Info->NumSegments) + > + Info->Length = (ACPI_NAMESEG_SIZE * Info->NumSegments) + > 4 + Info->NumCarats; > > Info->NextExternalChar = NextExternalChar; > @@ -443,7 +443,7 @@ AcpiNsBuildInternalName ( > > for (; NumSegments; NumSegments--) > { > - for (i = 0; i < ACPI_NAME_SIZE; i++) > + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) > { > if (ACPI_IS_PATH_SEPARATOR (*ExternalName) || > (*ExternalName == 0)) > @@ -472,7 +472,7 @@ AcpiNsBuildInternalName ( > /* Move on the next segment */ > > ExternalName++; > - Result += ACPI_NAME_SIZE; > + Result += ACPI_NAMESEG_SIZE; > } > > /* Terminate the string */ > @@ -721,12 +721,12 @@ AcpiNsExternalizeName ( > > /* Copy and validate the 4-char name segment */ > > - ACPI_MOVE_NAME (&(*ConvertedName)[j], > + ACPI_COPY_NAMESEG (&(*ConvertedName)[j], > &InternalName[NamesIndex]); > AcpiUtRepairName (&(*ConvertedName)[j]); > > - j += ACPI_NAME_SIZE; > - NamesIndex += ACPI_NAME_SIZE; > + j += ACPI_NAMESEG_SIZE; > + NamesIndex += ACPI_NAMESEG_SIZE; > } > } > > diff --git a/src/acpica/source/components/namespace/nsxfname.c b/src/acpica/source/components/namespace/nsxfname.c > index a946b541..7332a92f 100644 > --- a/src/acpica/source/components/namespace/nsxfname.c > +++ b/src/acpica/source/components/namespace/nsxfname.c > @@ -691,8 +691,8 @@ AcpiInstallMethod ( > > /* Table must be a DSDT or SSDT */ > > - if (!ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) && > - !ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT)) > + if (!ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT) && > + !ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_SSDT)) > { > return (AE_BAD_HEADER); > } > diff --git a/src/acpica/source/components/parser/psargs.c b/src/acpica/source/components/parser/psargs.c > index 3f4ffeed..c9faa95b 100644 > --- a/src/acpica/source/components/parser/psargs.c > +++ b/src/acpica/source/components/parser/psargs.c > @@ -314,21 +314,21 @@ AcpiPsGetNextNamestring ( > > /* Two name segments */ > > - End += 1 + (2 * ACPI_NAME_SIZE); > + End += 1 + (2 * ACPI_NAMESEG_SIZE); > break; > > case AML_MULTI_NAME_PREFIX: > > /* Multiple name segments, 4 chars each, count in next byte */ > > - End += 2 + (*(End + 1) * ACPI_NAME_SIZE); > + End += 2 + (*(End + 1) * ACPI_NAMESEG_SIZE); > break; > > default: > > /* Single name segment */ > > - End += ACPI_NAME_SIZE; > + End += ACPI_NAMESEG_SIZE; > break; > } > > @@ -708,7 +708,7 @@ AcpiPsGetNextField ( > > ACPI_MOVE_32_TO_32 (&Name, ParserState->Aml); > AcpiPsSetName (Field, Name); > - ParserState->Aml += ACPI_NAME_SIZE; > + ParserState->Aml += ACPI_NAMESEG_SIZE; > > > ASL_CV_CAPTURE_COMMENTS_ONLY (ParserState); > diff --git a/src/acpica/source/components/resources/rsxface.c b/src/acpica/source/components/resources/rsxface.c > index 1a624dc2..2e8130b3 100644 > --- a/src/acpica/source/components/resources/rsxface.c > +++ b/src/acpica/source/components/resources/rsxface.c > @@ -825,10 +825,10 @@ AcpiWalkResources ( > /* Parameter validation */ > > if (!DeviceHandle || !UserFunction || !Name || > - (!ACPI_COMPARE_NAME (Name, METHOD_NAME__CRS) && > - !ACPI_COMPARE_NAME (Name, METHOD_NAME__PRS) && > - !ACPI_COMPARE_NAME (Name, METHOD_NAME__AEI) && > - !ACPI_COMPARE_NAME (Name, METHOD_NAME__DMA))) > + (!ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__CRS) && > + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__PRS) && > + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__AEI) && > + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__DMA))) > { > return_ACPI_STATUS (AE_BAD_PARAMETER); > } > diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c > index 1fc20a38..9d86fdbc 100644 > --- a/src/acpica/source/components/tables/tbdata.c > +++ b/src/acpica/source/components/tables/tbdata.c > @@ -676,7 +676,7 @@ AcpiTbVerifyTempTable ( > /* If a particular signature is expected (DSDT/FACS), it must match */ > > if (Signature && > - !ACPI_COMPARE_NAME (&TableDesc->Signature, Signature)) > + !ACPI_COMPARE_NAMESEG (&TableDesc->Signature, Signature)) > { > ACPI_BIOS_ERROR ((AE_INFO, > "Invalid signature 0x%X for ACPI table, expected [%s]", > diff --git a/src/acpica/source/components/tables/tbfind.c b/src/acpica/source/components/tables/tbfind.c > index 4ec53043..3119ddb1 100644 > --- a/src/acpica/source/components/tables/tbfind.c > +++ b/src/acpica/source/components/tables/tbfind.c > @@ -207,7 +207,7 @@ AcpiTbFindTable ( > /* Normalize the input strings */ > > memset (&Header, 0, sizeof (ACPI_TABLE_HEADER)); > - ACPI_MOVE_NAME (Header.Signature, Signature); > + ACPI_COPY_NAMESEG (Header.Signature, Signature); > strncpy (Header.OemId, OemId, ACPI_OEM_ID_SIZE); > strncpy (Header.OemTableId, OemTableId, ACPI_OEM_TABLE_ID_SIZE); > > @@ -217,7 +217,7 @@ AcpiTbFindTable ( > for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) > { > if (memcmp (&(AcpiGbl_RootTableList.Tables[i].Signature), > - Header.Signature, ACPI_NAME_SIZE)) > + Header.Signature, ACPI_NAMESEG_SIZE)) > { > /* Not the requested table */ > > @@ -245,7 +245,7 @@ AcpiTbFindTable ( > /* Check for table match on all IDs */ > > if (!memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->Signature, > - Header.Signature, ACPI_NAME_SIZE) && > + Header.Signature, ACPI_NAMESEG_SIZE) && > (!OemId[0] || > !memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemId, > Header.OemId, ACPI_OEM_ID_SIZE)) && > diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c > index fbb85ce7..c1d47022 100644 > --- a/src/acpica/source/components/tables/tbinstal.c > +++ b/src/acpica/source/components/tables/tbinstal.c > @@ -274,7 +274,7 @@ AcpiTbInstallStandardTable ( > */ > if (!Reload && > AcpiGbl_DisableSsdtTableInstall && > - ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) > + ACPI_COMPARE_NAMESEG (&NewTableDesc.Signature, ACPI_SIG_SSDT)) > { > ACPI_INFO (( > "Ignoring installation of %4.4s at %8.8X%8.8X", > diff --git a/src/acpica/source/components/tables/tbprint.c b/src/acpica/source/components/tables/tbprint.c > index ffa4856b..0ff6a6ce 100644 > --- a/src/acpica/source/components/tables/tbprint.c > +++ b/src/acpica/source/components/tables/tbprint.c > @@ -225,10 +225,10 @@ AcpiTbCleanupTableHeader ( > > memcpy (OutHeader, Header, sizeof (ACPI_TABLE_HEADER)); > > - AcpiTbFixString (OutHeader->Signature, ACPI_NAME_SIZE); > + AcpiTbFixString (OutHeader->Signature, ACPI_NAMESEG_SIZE); > AcpiTbFixString (OutHeader->OemId, ACPI_OEM_ID_SIZE); > AcpiTbFixString (OutHeader->OemTableId, ACPI_OEM_TABLE_ID_SIZE); > - AcpiTbFixString (OutHeader->AslCompilerId, ACPI_NAME_SIZE); > + AcpiTbFixString (OutHeader->AslCompilerId, ACPI_NAMESEG_SIZE); > } > > > @@ -253,7 +253,7 @@ AcpiTbPrintTableHeader ( > ACPI_TABLE_HEADER LocalHeader; > > > - if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_FACS)) > + if (ACPI_COMPARE_NAMESEG (Header->Signature, ACPI_SIG_FACS)) > { > /* FACS only has signature and length fields */ > > @@ -320,8 +320,8 @@ AcpiTbVerifyChecksum ( > * They are the odd tables, have no standard ACPI header and no checksum > */ > > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT) || > - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS)) > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) || > + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) > { > return (AE_OK); > } > diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c > index 9bb3fe89..badee3c5 100644 > --- a/src/acpica/source/components/tables/tbutils.c > +++ b/src/acpica/source/components/tables/tbutils.c > @@ -503,7 +503,7 @@ AcpiTbParseRootTable ( > ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex); > > if (ACPI_SUCCESS (Status) && > - ACPI_COMPARE_NAME ( > + ACPI_COMPARE_NAMESEG ( > &AcpiGbl_RootTableList.Tables[TableIndex].Signature, > ACPI_SIG_FADT)) > { > diff --git a/src/acpica/source/components/tables/tbxface.c b/src/acpica/source/components/tables/tbxface.c > index 097e535d..ae5991aa 100644 > --- a/src/acpica/source/components/tables/tbxface.c > +++ b/src/acpica/source/components/tables/tbxface.c > @@ -401,7 +401,7 @@ AcpiGetTableHeader ( > > for (i = 0, j = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) > { > - if (!ACPI_COMPARE_NAME ( > + if (!ACPI_COMPARE_NAMESEG ( > &(AcpiGbl_RootTableList.Tables[i].Signature), Signature)) > { > continue; > @@ -504,7 +504,7 @@ AcpiGetTable ( > { > TableDesc = &AcpiGbl_RootTableList.Tables[i]; > > - if (!ACPI_COMPARE_NAME (&TableDesc->Signature, Signature)) > + if (!ACPI_COMPARE_NAMESEG (&TableDesc->Signature, Signature)) > { > continue; > } > diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c > index bda55ea2..217d54bf 100644 > --- a/src/acpica/source/components/tables/tbxfload.c > +++ b/src/acpica/source/components/tables/tbxfload.c > @@ -275,7 +275,7 @@ AcpiTbLoadNamespace ( > Table = &AcpiGbl_RootTableList.Tables[AcpiGbl_DsdtIndex]; > > if (!AcpiGbl_RootTableList.CurrentTableCount || > - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_DSDT) || > + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_DSDT) || > ACPI_FAILURE (AcpiTbValidateTable (Table))) > { > Status = AE_NO_ACPI_TABLES; > @@ -334,9 +334,9 @@ AcpiTbLoadNamespace ( > Table = &AcpiGbl_RootTableList.Tables[i]; > > if (!Table->Address || > - (!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) && > - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) && > - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) || > + (!ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_SSDT) && > + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_PSDT) && > + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_OSDT)) || > ACPI_FAILURE (AcpiTbValidateTable (Table))) > { > continue; > @@ -556,7 +556,7 @@ AcpiUnloadParentTable ( > * only these types can contain AML and thus are the only types > * that can create namespace objects. > */ > - if (ACPI_COMPARE_NAME ( > + if (ACPI_COMPARE_NAMESEG ( > AcpiGbl_RootTableList.Tables[i].Signature.Ascii, > ACPI_SIG_DSDT)) > { > diff --git a/src/acpica/source/components/utilities/utascii.c b/src/acpica/source/components/utilities/utascii.c > index 08dcb920..c7aaff40 100644 > --- a/src/acpica/source/components/utilities/utascii.c > +++ b/src/acpica/source/components/utilities/utascii.c > @@ -176,7 +176,7 @@ AcpiUtValidNameseg ( > > /* Validate each character in the signature */ > > - for (i = 0; i < ACPI_NAME_SIZE; i++) > + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) > { > if (!AcpiUtValidNameChar (Name[i], i)) > { > diff --git a/src/acpica/source/components/utilities/utdecode.c b/src/acpica/source/components/utilities/utdecode.c > index 443a6dd7..3daff815 100644 > --- a/src/acpica/source/components/utilities/utdecode.c > +++ b/src/acpica/source/components/utilities/utdecode.c > @@ -214,17 +214,17 @@ const UINT8 AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] = > > const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = > { > - "SystemMemory", /* 0x00 */ > - "SystemIO", /* 0x01 */ > - "PCI_Config", /* 0x02 */ > - "EmbeddedControl", /* 0x03 */ > - "SMBus", /* 0x04 */ > - "SystemCMOS", /* 0x05 */ > - "PCIBARTarget", /* 0x06 */ > - "IPMI", /* 0x07 */ > - "GeneralPurposeIo", /* 0x08 */ > - "GenericSerialBus", /* 0x09 */ > - "PCC" /* 0x0A */ > + "SystemMemory", /* 0x00 */ > + "SystemIO", /* 0x01 */ > + "PCI_Config", /* 0x02 */ > + "EmbeddedControl", /* 0x03 */ > + "SMBus", /* 0x04 */ > + "SystemCMOS", /* 0x05 */ > + "PCIBARTarget", /* 0x06 */ > + "IPMI", /* 0x07 */ > + "GeneralPurposeIo", /* 0x08 */ > + "GenericSerialBus", /* 0x09 */ > + "PlatformCommChannel"/* 0x0A */ > }; > > > @@ -416,7 +416,7 @@ AcpiUtGetNodeName ( > ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) Object; > > > - /* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */ > + /* Must return a string of exactly 4 characters == ACPI_NAMESEG_SIZE */ > > if (!Object) > { > diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c > index acc048d6..466e3fa2 100644 > --- a/src/acpica/source/components/utilities/utmisc.c > +++ b/src/acpica/source/components/utilities/utmisc.c > @@ -214,10 +214,10 @@ AcpiUtIsAmlTable ( > > /* These are the only tables that contain executable AML */ > > - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) || > - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_PSDT) || > - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT) || > - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_OSDT) || > + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT) || > + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_PSDT) || > + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_SSDT) || > + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_OSDT) || > ACPI_IS_OEM_SIG (Table->Signature)) > { > return (TRUE); > diff --git a/src/acpica/source/components/utilities/utpredef.c b/src/acpica/source/components/utilities/utpredef.c > index e1cdd704..8d9c5b0b 100644 > --- a/src/acpica/source/components/utilities/utpredef.c > +++ b/src/acpica/source/components/utilities/utpredef.c > @@ -237,7 +237,7 @@ AcpiUtMatchPredefinedMethod ( > ThisName = AcpiGbl_PredefinedMethods; > while (ThisName->Info.Name[0]) > { > - if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name)) > + if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name)) > { > return (ThisName); > } > @@ -374,7 +374,7 @@ AcpiUtMatchResourceName ( > 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 (ThisName); > } > diff --git a/src/acpica/source/components/utilities/utstring.c b/src/acpica/source/components/utilities/utstring.c > index 893a9574..f0ee49a0 100644 > --- a/src/acpica/source/components/utilities/utstring.c > +++ b/src/acpica/source/components/utilities/utstring.c > @@ -303,16 +303,16 @@ AcpiUtRepairName ( > * Special case for the root node. This can happen if we get an > * error during the execution of module-level code. > */ > - if (ACPI_COMPARE_NAME (Name, ACPI_ROOT_PATHNAME)) > + if (ACPI_COMPARE_NAMESEG (Name, ACPI_ROOT_PATHNAME)) > { > return; > } > > - ACPI_MOVE_NAME (&OriginalName, Name); > + ACPI_COPY_NAMESEG (&OriginalName, Name); > > /* Check each character in the name */ > > - for (i = 0; i < ACPI_NAME_SIZE; i++) > + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) > { > if (AcpiUtValidNameChar (Name[i], i)) > { > diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h > index b5c4aa02..e1ed0053 100644 > --- a/src/acpica/source/include/aclocal.h > +++ b/src/acpica/source/include/aclocal.h > @@ -480,7 +480,7 @@ ACPI_STATUS (*ACPI_INTERNAL_METHOD) ( > */ > typedef struct acpi_name_info > { > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > UINT16 ArgumentList; > UINT8 ExpectedBtypes; > > @@ -568,7 +568,7 @@ typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER) ( > > typedef struct acpi_simple_repair_info > { > - char Name[ACPI_NAME_SIZE]; > + char Name[ACPI_NAMESEG_SIZE]; > UINT32 UnexpectedBtypes; > UINT32 PackageIndex; > ACPI_OBJECT_CONVERTER ObjectConverter; > diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h > index ad653f0e..d3e4e7b5 100644 > --- a/src/acpica/source/include/acpixf.h > +++ b/src/acpica/source/include/acpixf.h > @@ -154,7 +154,7 @@ > > /* Current ACPICA subsystem version in YYYYMMDD format */ > > -#define ACPI_CA_VERSION 0x20190215 > +#define ACPI_CA_VERSION 0x20190329 > > #include "acconfig.h" > #include "actypes.h" > diff --git a/src/acpica/source/include/actbl.h b/src/acpica/source/include/actbl.h > index 97134e5e..d6b9e8ff 100644 > --- a/src/acpica/source/include/actbl.h > +++ b/src/acpica/source/include/actbl.h > @@ -213,14 +213,14 @@ > > typedef struct acpi_table_header > { > - char Signature[ACPI_NAME_SIZE]; /* ASCII table signature */ > + char Signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */ > UINT32 Length; /* Length of table in bytes, including this header */ > UINT8 Revision; /* ACPI Specification minor version number */ > UINT8 Checksum; /* To make sum of entire table == 0 */ > char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ > char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ > UINT32 OemRevision; /* OEM revision number */ > - char AslCompilerId[ACPI_NAME_SIZE]; /* ASCII ASL compiler vendor ID */ > + char AslCompilerId[ACPI_NAMESEG_SIZE]; /* ASCII ASL compiler vendor ID */ > UINT32 AslCompilerRevision; /* ASL compiler version */ > > } ACPI_TABLE_HEADER; > diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h > index 2a65ee8f..e7a2d578 100644 > --- a/src/acpica/source/include/actypes.h > +++ b/src/acpica/source/include/actypes.h > @@ -520,7 +520,7 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS; > > /* Names within the namespace are 4 bytes long */ > > -#define ACPI_NAME_SIZE 4 > +#define ACPI_NAMESEG_SIZE 4 /* Fixed by ACPI spec */ > #define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ > #define ACPI_PATH_SEPARATOR '.' > > @@ -666,11 +666,11 @@ typedef UINT64 ACPI_INTEGER; > /* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */ > > #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED > -#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) > -#define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) > +#define ACPI_COMPARE_NAMESEG(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) > +#define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) > #else > -#define ACPI_COMPARE_NAME(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) > -#define ACPI_MOVE_NAME(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) > +#define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE)) > +#define ACPI_COPY_NAMESEG(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE)) > #endif > > /* Support for the special RSDP signature (8 characters) */ > @@ -680,7 +680,7 @@ typedef UINT64 ACPI_INTEGER; > > /* Support for OEMx signature (x can be any character) */ > #define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\ > - strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE) > + strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE) > > /* > * Algorithm to obtain access bit width. > diff --git a/src/acpica/source/include/platform/aclinux.h b/src/acpica/source/include/platform/aclinux.h > index 990d17c7..f6522e32 100644 > --- a/src/acpica/source/include/platform/aclinux.h > +++ b/src/acpica/source/include/platform/aclinux.h > @@ -221,6 +221,11 @@ > #define ACPI_NO_ERROR_MESSAGES > #undef ACPI_DEBUG_OUTPUT > > +/* Use a specific bugging default separate from ACPICA */ > + > +#undef ACPI_DEBUG_DEFAULT > +#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) > + > /* External interface for __KERNEL__, stub is needed */ > > #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \ > diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h > index eb244841..602356de 100644 > --- a/src/acpica/source/tools/acpiexec/aecommon.h > +++ b/src/acpica/source/tools/acpiexec/aecommon.h > @@ -287,6 +287,10 @@ void > AeMiscellaneousTests ( > void); > > +void > +AeLateTest ( > + void); > + > /* aeregion */ > > ACPI_STATUS > diff --git a/src/acpica/source/tools/acpiexec/aeexception.c b/src/acpica/source/tools/acpiexec/aeexception.c > index 2a25d181..77ba166b 100644 > --- a/src/acpica/source/tools/acpiexec/aeexception.c > +++ b/src/acpica/source/tools/acpiexec/aeexception.c > @@ -206,7 +206,7 @@ AeExceptionHandler ( > > if (Name) > { > - if (ACPI_COMPARE_NAME (&Name, ACPI_ROOT_PATHNAME)) > + if (ACPI_COMPARE_NAMESEG (&Name, ACPI_ROOT_PATHNAME)) > { > AcpiOsPrintf (AE_PREFIX > "Evaluating executable code at [%s]\n", ACPI_NAMESPACE_ROOT); Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/acpica/source/common/acfileio.c b/src/acpica/source/common/acfileio.c index 18992b20..74f28577 100644 --- a/src/acpica/source/common/acfileio.c +++ b/src/acpica/source/common/acfileio.c @@ -585,7 +585,7 @@ AcValidateTableHeader ( * These fields must be ASCII: OemId, OemTableId, AslCompilerId. * We allow a NULL terminator in OemId and OemTableId. */ - for (i = 0; i < ACPI_NAME_SIZE; i++) + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) { if (!ACPI_IS_ASCII ((UINT8) TableHeader.AslCompilerId[i])) { diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c index 6fbfaf5d..518468b7 100644 --- a/src/acpica/source/common/adisasm.c +++ b/src/acpica/source/common/adisasm.c @@ -459,7 +459,7 @@ AdDisassembleOneTable ( */ if (AcpiGbl_CaptureComments) { - strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAME_SIZE); + strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAMESEG_SIZE); } #endif diff --git a/src/acpica/source/common/adwalk.c b/src/acpica/source/common/adwalk.c index 9f51b64e..d9bd4d9e 100644 --- a/src/acpica/source/common/adwalk.c +++ b/src/acpica/source/common/adwalk.c @@ -814,7 +814,7 @@ AcpiDmLoadDescendingOp ( while (AcpiGbl_PreDefinedNames[PreDefineIndex].Name) { - if (ACPI_COMPARE_NAME (Node->Name.Ascii, + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, AcpiGbl_PreDefinedNames[PreDefineIndex].Name)) { PreDefined = TRUE; diff --git a/src/acpica/source/common/ahpredef.c b/src/acpica/source/common/ahpredef.c index 58b2d662..a76148dc 100644 --- a/src/acpica/source/common/ahpredef.c +++ b/src/acpica/source/common/ahpredef.c @@ -490,7 +490,7 @@ AcpiAhMatchPredefinedName ( for (Info = AslPredefinedInfo; Info->Name; Info++) { - if (ACPI_COMPARE_NAME (Nameseg, Info->Name)) + if (ACPI_COMPARE_NAMESEG (Nameseg, Info->Name)) { return (Info); } diff --git a/src/acpica/source/common/ahtable.c b/src/acpica/source/common/ahtable.c index 96b5f9f6..599c53a8 100644 --- a/src/acpica/source/common/ahtable.c +++ b/src/acpica/source/common/ahtable.c @@ -183,7 +183,7 @@ AcpiAhGetTableInfo ( for (Info = AcpiGbl_SupportedTables; Info->Signature; Info++) { - if (ACPI_COMPARE_NAME (Signature, Info->Signature)) + if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature)) { return (Info); } diff --git a/src/acpica/source/common/dmrestag.c b/src/acpica/source/common/dmrestag.c index c33b0497..8ab92d71 100644 --- a/src/acpica/source/common/dmrestag.c +++ b/src/acpica/source/common/dmrestag.c @@ -747,6 +747,7 @@ AcpiGetTagPathname ( UINT8 ResourceTableIndex; ACPI_SIZE RequiredSize; char *Pathname; + char *PathnameEnd; AML_RESOURCE *Aml; ACPI_PARSE_OBJECT *Op; char *InternalPath; @@ -809,19 +810,26 @@ AcpiGetTagPathname ( RequiredSize, FALSE); /* - * Create the full path to the resource and tag by: remove the buffer name, - * append the resource descriptor name, append a dot, append the tag name. + * Create the full path to the resource and tag by: + * 1) Remove the buffer nameseg from the end of the pathname + * 2) Append the resource descriptor nameseg + * 3) Append a dot + * 4) Append the field tag nameseg * - * TBD: Always using the full path is a bit brute force, the path can be + * Always using the full path is a bit brute force, the path can be * often be optimized with carats (if the original buffer namepath is a * single nameseg). This doesn't really matter, because these paths do not * end up in the final compiled AML, it's just an appearance issue for the * disassembled code. */ - Pathname[strlen (Pathname) - ACPI_NAME_SIZE] = 0; - strncat (Pathname, ResourceNode->Name.Ascii, ACPI_NAME_SIZE); - strcat (Pathname, "."); - strncat (Pathname, Tag, ACPI_NAME_SIZE); + PathnameEnd = Pathname + (RequiredSize - ACPI_NAMESEG_SIZE - 1); + ACPI_COPY_NAMESEG (PathnameEnd, ResourceNode->Name.Ascii); + + PathnameEnd += ACPI_NAMESEG_SIZE; + *PathnameEnd = '.'; + + PathnameEnd++; + ACPI_COPY_NAMESEG (PathnameEnd, Tag); /* Internalize the namepath to AML format */ @@ -863,7 +871,7 @@ static void AcpiDmUpdateResourceName ( ACPI_NAMESPACE_NODE *ResourceNode) { - char Name[ACPI_NAME_SIZE]; + char Name[ACPI_NAMESEG_SIZE]; /* Ignore if a unique name has already been assigned */ diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c index e51ff424..6b67662b 100644 --- a/src/acpica/source/common/dmtable.c +++ b/src/acpica/source/common/dmtable.c @@ -602,7 +602,7 @@ AcpiDmGetTableData ( for (Info = AcpiDmTableData; Info->Signature; Info++) { - if (ACPI_COMPARE_NAME (Signature, Info->Signature)) + if (ACPI_COMPARE_NAMESEG (Signature, Info->Signature)) { return (Info); } @@ -657,7 +657,7 @@ AcpiDmDumpDataTable ( * Handle tables that don't use the common ACPI table header structure. * Currently, these are the FACS, RSDP, and S3PT. */ - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS)) + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) { Length = Table->Length; Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoFacs); @@ -670,7 +670,7 @@ AcpiDmDumpDataTable ( { Length = AcpiDmDumpRsdp (Table); } - else if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT)) + else if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT)) { Length = AcpiDmDumpS3pt (Table); } diff --git a/src/acpica/source/common/dmtables.c b/src/acpica/source/common/dmtables.c index 1a8da3af..f9579509 100644 --- a/src/acpica/source/common/dmtables.c +++ b/src/acpica/source/common/dmtables.c @@ -281,7 +281,7 @@ AdCreateTableHeader ( /* Revision of DSDT controls the ACPI integer width */ - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT)) + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT)) { AcpiOsPrintf (" **** 32-bit table (V1), no 64-bit math support"); } diff --git a/src/acpica/source/compiler/aslanalyze.c b/src/acpica/source/compiler/aslanalyze.c index 0ea8dc47..58da5e2e 100644 --- a/src/acpica/source/compiler/aslanalyze.c +++ b/src/acpica/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/src/acpica/source/compiler/aslcodegen.c b/src/acpica/source/compiler/aslcodegen.c index 21459178..8edcb668 100644 --- a/src/acpica/source/compiler/aslcodegen.c +++ b/src/acpica/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/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l index 72fbbef3..26c221e5 100644 --- a/src/acpica/source/compiler/aslcompiler.l +++ b/src/acpica/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/src/acpica/source/compiler/asldefine.h b/src/acpica/source/compiler/asldefine.h index a13acec0..8089d0b9 100644 --- a/src/acpica/source/compiler/asldefine.h +++ b/src/acpica/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/src/acpica/source/compiler/aslerror.c b/src/acpica/source/compiler/aslerror.c index 5d3a7764..a2f9fcef 100644 --- a/src/acpica/source/compiler/aslerror.c +++ b/src/acpica/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/src/acpica/source/compiler/aslload.c b/src/acpica/source/compiler/aslload.c index c910358d..dfbdf7ce 100644 --- a/src/acpica/source/compiler/aslload.c +++ b/src/acpica/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/src/acpica/source/compiler/aslmessages.c b/src/acpica/source/compiler/aslmessages.c index 07e98482..0f31c655 100644 --- a/src/acpica/source/compiler/aslmessages.c +++ b/src/acpica/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/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c index 4563317d..98884bc3 100644 --- a/src/acpica/source/compiler/aslmethod.c +++ b/src/acpica/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/src/acpica/source/compiler/asloffset.c b/src/acpica/source/compiler/asloffset.c index 4a99c39a..dd8e1b07 100644 --- a/src/acpica/source/compiler/asloffset.c +++ b/src/acpica/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/src/acpica/source/compiler/asloperands.c b/src/acpica/source/compiler/asloperands.c index 172f3470..67e16fd5 100644 --- a/src/acpica/source/compiler/asloperands.c +++ b/src/acpica/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/src/acpica/source/compiler/aslopt.c b/src/acpica/source/compiler/aslopt.c index 1b0c4d33..6d2045f8 100644 --- a/src/acpica/source/compiler/aslopt.c +++ b/src/acpica/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/src/acpica/source/compiler/aslpredef.c b/src/acpica/source/compiler/aslpredef.c index ab29105a..1f850239 100644 --- a/src/acpica/source/compiler/aslpredef.c +++ b/src/acpica/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/src/acpica/source/compiler/asltransform.c b/src/acpica/source/compiler/asltransform.c index e9f0d049..5237c638 100644 --- a/src/acpica/source/compiler/asltransform.c +++ b/src/acpica/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/src/acpica/source/compiler/aslutils.c b/src/acpica/source/compiler/aslutils.c index 1fc98bb5..6b0d5eff 100644 --- a/src/acpica/source/compiler/aslutils.c +++ b/src/acpica/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/src/acpica/source/compiler/aslxref.c b/src/acpica/source/compiler/aslxref.c index b3067feb..99f6c4a0 100644 --- a/src/acpica/source/compiler/aslxref.c +++ b/src/acpica/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/src/acpica/source/compiler/dtcompile.c b/src/acpica/source/compiler/dtcompile.c index 88a7a8b0..95fcb2d4 100644 --- a/src/acpica/source/compiler/dtcompile.c +++ b/src/acpica/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/src/acpica/source/compiler/dttemplate.c b/src/acpica/source/compiler/dttemplate.c index 8e3124a3..4cc6c040 100644 --- a/src/acpica/source/compiler/dttemplate.c +++ b/src/acpica/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)); diff --git a/src/acpica/source/components/debugger/dbexec.c b/src/acpica/source/components/debugger/dbexec.c index 49d1180f..8897fa6d 100644 --- a/src/acpica/source/components/debugger/dbexec.c +++ b/src/acpica/source/components/debugger/dbexec.c @@ -658,7 +658,7 @@ AcpiDbExecute ( /* Dump a _PLD buffer if present */ - if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, + if (ACPI_COMPARE_NAMESEG ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, AcpiGbl_DbMethodInfo.Method)->Name.Ascii), METHOD_NAME__PLD)) { diff --git a/src/acpica/source/components/debugger/dbnames.c b/src/acpica/source/components/debugger/dbnames.c index 3c01e808..2c9af4be 100644 --- a/src/acpica/source/components/debugger/dbnames.c +++ b/src/acpica/source/components/debugger/dbnames.c @@ -557,7 +557,7 @@ AcpiDbFindNameInNamespace ( char *AcpiNamePtr = AcpiName; - if (strlen (NameArg) > ACPI_NAME_SIZE) + if (strlen (NameArg) > ACPI_NAMESEG_SIZE) { AcpiOsPrintf ("Name must be no longer than 4 characters\n"); return (AE_OK); diff --git a/src/acpica/source/components/disassembler/dmbuffer.c b/src/acpica/source/components/disassembler/dmbuffer.c index a58ff2f5..f61c8378 100644 --- a/src/acpica/source/components/disassembler/dmbuffer.c +++ b/src/acpica/source/components/disassembler/dmbuffer.c @@ -736,7 +736,7 @@ AcpiDmIsPldBuffer ( { Node = ParentOp->Common.Node; - if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD)) + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__PLD)) { /* Ignore the Size argument in the disassembly of this buffer op */ @@ -770,7 +770,7 @@ AcpiDmIsPldBuffer ( { Node = ParentOp->Common.Node; - if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD)) + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__PLD)) { /* Ignore the Size argument in the disassembly of this buffer op */ @@ -1100,7 +1100,7 @@ AcpiDmCheckForHardwareId ( /* Check for _HID - has one argument */ - if (ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID)) + if (ACPI_COMPARE_NAMESEG (&Name, METHOD_NAME__HID)) { AcpiDmGetHardwareIdType (NextOp); return; @@ -1108,7 +1108,7 @@ AcpiDmCheckForHardwareId ( /* Exit if not _CID */ - if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__CID)) + if (!ACPI_COMPARE_NAMESEG (&Name, METHOD_NAME__CID)) { return; } diff --git a/src/acpica/source/components/disassembler/dmnames.c b/src/acpica/source/components/disassembler/dmnames.c index bbff3e0a..d07af72f 100644 --- a/src/acpica/source/components/disassembler/dmnames.c +++ b/src/acpica/source/components/disassembler/dmnames.c @@ -199,8 +199,8 @@ AcpiDmDumpName ( /* Remove all trailing underscores from the name */ - Length = ACPI_NAME_SIZE; - for (i = (ACPI_NAME_SIZE - 1); i != 0; i--) + Length = ACPI_NAMESEG_SIZE; + for (i = (ACPI_NAMESEG_SIZE - 1); i != 0; i--) { if (NewName[i] == '_') { @@ -378,7 +378,7 @@ AcpiDmNamestring ( AcpiOsPrintf ("."); } - Name += ACPI_NAME_SIZE; + Name += ACPI_NAMESEG_SIZE; } } diff --git a/src/acpica/source/components/dispatcher/dsfield.c b/src/acpica/source/components/dispatcher/dsfield.c index cc0a271e..3aff4db1 100644 --- a/src/acpica/source/components/dispatcher/dsfield.c +++ b/src/acpica/source/components/dispatcher/dsfield.c @@ -685,7 +685,7 @@ AcpiDsCreateField ( Info.RegionNode = RegionNode; Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next); - if (Info.RegionNode->Type == ACPI_ADR_SPACE_PLATFORM_COMM && + if (Info.RegionNode->Object->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM && !(RegionNode->Object->Field.InternalPccBuffer = ACPI_ALLOCATE_ZEROED(Info.RegionNode->Object->Region.Length))) { diff --git a/src/acpica/source/components/dispatcher/dsinit.c b/src/acpica/source/components/dispatcher/dsinit.c index 334187a3..e7045f46 100644 --- a/src/acpica/source/components/dispatcher/dsinit.c +++ b/src/acpica/source/components/dispatcher/dsinit.c @@ -359,7 +359,7 @@ AcpiDsInitializeObjects ( /* DSDT is always the first AML table */ - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT)) + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT)) { ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "\nInitializing Namespace objects:\n")); diff --git a/src/acpica/source/components/events/evgpeinit.c b/src/acpica/source/components/events/evgpeinit.c index 4aec9b80..b7e02a06 100644 --- a/src/acpica/source/components/events/evgpeinit.c +++ b/src/acpica/source/components/events/evgpeinit.c @@ -447,7 +447,7 @@ AcpiEvMatchGpeMethod ( ACPI_STATUS Status; UINT32 GpeNumber; UINT8 TempGpeNumber; - char Name[ACPI_NAME_SIZE + 1]; + char Name[ACPI_NAMESEG_SIZE + 1]; UINT8 Type; @@ -468,7 +468,7 @@ AcpiEvMatchGpeMethod ( * 1) Extract the method name and null terminate it */ ACPI_MOVE_32_TO_32 (Name, &MethodNode->Name.Integer); - Name[ACPI_NAME_SIZE] = 0; + Name[ACPI_NAMESEG_SIZE] = 0; /* 2) Name must begin with an underscore */ diff --git a/src/acpica/source/components/executer/exnames.c b/src/acpica/source/components/executer/exnames.c index f652dfab..70a01467 100644 --- a/src/acpica/source/components/executer/exnames.c +++ b/src/acpica/source/components/executer/exnames.c @@ -207,11 +207,11 @@ AcpiExAllocateNameString ( { /* Special case for root */ - SizeNeeded = 1 + (ACPI_NAME_SIZE * NumNameSegs) + 2 + 1; + SizeNeeded = 1 + (ACPI_NAMESEG_SIZE * NumNameSegs) + 2 + 1; } else { - SizeNeeded = PrefixCount + (ACPI_NAME_SIZE * NumNameSegs) + 2 + 1; + SizeNeeded = PrefixCount + (ACPI_NAMESEG_SIZE * NumNameSegs) + 2 + 1; } /* @@ -310,7 +310,7 @@ AcpiExNameSegment ( } for (Index = 0; - (Index < ACPI_NAME_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0)); + (Index < ACPI_NAMESEG_SIZE) && (AcpiUtValidNameChar (*AmlAddress, 0)); Index++) { CharBuf[Index] = *AmlAddress++; diff --git a/src/acpica/source/components/namespace/nsaccess.c b/src/acpica/source/components/namespace/nsaccess.c index d8e3b841..94dba130 100644 --- a/src/acpica/source/components/namespace/nsaccess.c +++ b/src/acpica/source/components/namespace/nsaccess.c @@ -851,7 +851,7 @@ AcpiNsLookup ( /* Point to next name segment and make this node current */ - Path += ACPI_NAME_SIZE; + Path += ACPI_NAMESEG_SIZE; CurrentNode = ThisNode; } diff --git a/src/acpica/source/components/namespace/nsdump.c b/src/acpica/source/components/namespace/nsdump.c index 11cb03e3..6ea04525 100644 --- a/src/acpica/source/components/namespace/nsdump.c +++ b/src/acpica/source/components/namespace/nsdump.c @@ -236,7 +236,7 @@ AcpiNsPrintPathname ( AcpiOsPrintf ("?"); } - Pathname += ACPI_NAME_SIZE; + Pathname += ACPI_NAMESEG_SIZE; NumSegments--; if (NumSegments) { diff --git a/src/acpica/source/components/namespace/nsinit.c b/src/acpica/source/components/namespace/nsinit.c index ccdef3c9..4dd28fd4 100644 --- a/src/acpica/source/components/namespace/nsinit.c +++ b/src/acpica/source/components/namespace/nsinit.c @@ -662,7 +662,7 @@ AcpiNsFindIniMethods ( /* We are only looking for methods named _INI */ - if (!ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__INI)) + if (!ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__INI)) { return (AE_OK); } @@ -839,7 +839,7 @@ AcpiNsInitOneDevice ( * Note: We know there is an _INI within this subtree, but it may not be * under this particular device, it may be lower in the branch. */ - if (!ACPI_COMPARE_NAME (DeviceNode->Name.Ascii, "_SB_") || + if (!ACPI_COMPARE_NAMESEG (DeviceNode->Name.Ascii, "_SB_") || DeviceNode->Parent != AcpiGbl_RootNode) { ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname ( diff --git a/src/acpica/source/components/namespace/nsnames.c b/src/acpica/source/components/namespace/nsnames.c index 0bab2f23..7633e2ef 100644 --- a/src/acpica/source/components/namespace/nsnames.c +++ b/src/acpica/source/components/namespace/nsnames.c @@ -273,8 +273,8 @@ AcpiNsHandleToName ( /* Just copy the ACPI name from the Node and zero terminate it */ NodeName = AcpiUtGetNodeName (Node); - ACPI_MOVE_NAME (Buffer->Pointer, NodeName); - ((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0; + ACPI_COPY_NAMESEG (Buffer->Pointer, NodeName); + ((char *) Buffer->Pointer) [ACPI_NAMESEG_SIZE] = 0; ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%4.4s\n", (char *) Buffer->Pointer)); return_ACPI_STATUS (AE_OK); @@ -374,7 +374,7 @@ AcpiNsBuildNormalizedPath ( BOOLEAN NoTrailing) { UINT32 Length = 0, i; - char Name[ACPI_NAME_SIZE]; + char Name[ACPI_NAMESEG_SIZE]; BOOLEAN DoNoTrailing; char c, *Left, *Right; ACPI_NAMESPACE_NODE *NextNode; @@ -657,7 +657,7 @@ AcpiNsNormalizePathname ( { /* Do one nameseg at a time */ - for (i = 0; (i < ACPI_NAME_SIZE) && *InputPath; i++) + for (i = 0; (i < ACPI_NAMESEG_SIZE) && *InputPath; i++) { if ((i == 0) || (*InputPath != '_')) /* First char is allowed to be underscore */ { diff --git a/src/acpica/source/components/namespace/nsobject.c b/src/acpica/source/components/namespace/nsobject.c index 3655b065..9c8865f0 100644 --- a/src/acpica/source/components/namespace/nsobject.c +++ b/src/acpica/source/components/namespace/nsobject.c @@ -352,6 +352,11 @@ AcpiNsDetachObject ( } } + if (ObjDesc->Common.Type == ACPI_TYPE_REGION) + { + AcpiUtRemoveAddressRange(ObjDesc->Region.SpaceId, Node); + } + /* Clear the Node entry in all cases */ Node->Object = NULL; diff --git a/src/acpica/source/components/namespace/nsparse.c b/src/acpica/source/components/namespace/nsparse.c index e559223a..43d261e4 100644 --- a/src/acpica/source/components/namespace/nsparse.c +++ b/src/acpica/source/components/namespace/nsparse.c @@ -365,7 +365,7 @@ AcpiNsOneCompleteParse ( /* Found OSDT table, enable the namespace override feature */ - if (ACPI_COMPARE_NAME(Table->Signature, ACPI_SIG_OSDT) && + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_OSDT) && PassNumber == ACPI_IMODE_LOAD_PASS1) { WalkState->NamespaceOverride = TRUE; diff --git a/src/acpica/source/components/namespace/nsrepair.c b/src/acpica/source/components/namespace/nsrepair.c index 6c9e2b2e..885d50bf 100644 --- a/src/acpica/source/components/namespace/nsrepair.c +++ b/src/acpica/source/components/namespace/nsrepair.c @@ -470,7 +470,7 @@ AcpiNsMatchSimpleRepair ( ThisName = AcpiObjectRepairInfo; while (ThisName->ObjectConverter) { - if (ACPI_COMPARE_NAME (Node->Name.Ascii, ThisName->Name)) + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, ThisName->Name)) { /* Check if we can actually repair this name/type combination */ diff --git a/src/acpica/source/components/namespace/nsrepair2.c b/src/acpica/source/components/namespace/nsrepair2.c index 9c6ee4f7..a0b10747 100644 --- a/src/acpica/source/components/namespace/nsrepair2.c +++ b/src/acpica/source/components/namespace/nsrepair2.c @@ -169,7 +169,7 @@ ACPI_STATUS (*ACPI_REPAIR_FUNCTION) ( typedef struct acpi_repair_info { - char Name[ACPI_NAME_SIZE]; + char Name[ACPI_NAMESEG_SIZE]; ACPI_REPAIR_FUNCTION RepairFunction; } ACPI_REPAIR_INFO; @@ -358,7 +358,7 @@ AcpiNsMatchComplexRepair ( ThisName = AcpiNsRepairableNames; while (ThisName->RepairFunction) { - if (ACPI_COMPARE_NAME (Node->Name.Ascii, ThisName->Name)) + if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, ThisName->Name)) { return (ThisName); } diff --git a/src/acpica/source/components/namespace/nsutils.c b/src/acpica/source/components/namespace/nsutils.c index 4a9f0313..85732ff8 100644 --- a/src/acpica/source/components/namespace/nsutils.c +++ b/src/acpica/source/components/namespace/nsutils.c @@ -351,7 +351,7 @@ AcpiNsGetInternalNameLength ( } } - Info->Length = (ACPI_NAME_SIZE * Info->NumSegments) + + Info->Length = (ACPI_NAMESEG_SIZE * Info->NumSegments) + 4 + Info->NumCarats; Info->NextExternalChar = NextExternalChar; @@ -443,7 +443,7 @@ AcpiNsBuildInternalName ( for (; NumSegments; NumSegments--) { - for (i = 0; i < ACPI_NAME_SIZE; i++) + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) { if (ACPI_IS_PATH_SEPARATOR (*ExternalName) || (*ExternalName == 0)) @@ -472,7 +472,7 @@ AcpiNsBuildInternalName ( /* Move on the next segment */ ExternalName++; - Result += ACPI_NAME_SIZE; + Result += ACPI_NAMESEG_SIZE; } /* Terminate the string */ @@ -721,12 +721,12 @@ AcpiNsExternalizeName ( /* Copy and validate the 4-char name segment */ - ACPI_MOVE_NAME (&(*ConvertedName)[j], + ACPI_COPY_NAMESEG (&(*ConvertedName)[j], &InternalName[NamesIndex]); AcpiUtRepairName (&(*ConvertedName)[j]); - j += ACPI_NAME_SIZE; - NamesIndex += ACPI_NAME_SIZE; + j += ACPI_NAMESEG_SIZE; + NamesIndex += ACPI_NAMESEG_SIZE; } } diff --git a/src/acpica/source/components/namespace/nsxfname.c b/src/acpica/source/components/namespace/nsxfname.c index a946b541..7332a92f 100644 --- a/src/acpica/source/components/namespace/nsxfname.c +++ b/src/acpica/source/components/namespace/nsxfname.c @@ -691,8 +691,8 @@ AcpiInstallMethod ( /* Table must be a DSDT or SSDT */ - if (!ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) && - !ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT)) + if (!ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT) && + !ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_SSDT)) { return (AE_BAD_HEADER); } diff --git a/src/acpica/source/components/parser/psargs.c b/src/acpica/source/components/parser/psargs.c index 3f4ffeed..c9faa95b 100644 --- a/src/acpica/source/components/parser/psargs.c +++ b/src/acpica/source/components/parser/psargs.c @@ -314,21 +314,21 @@ AcpiPsGetNextNamestring ( /* Two name segments */ - End += 1 + (2 * ACPI_NAME_SIZE); + End += 1 + (2 * ACPI_NAMESEG_SIZE); break; case AML_MULTI_NAME_PREFIX: /* Multiple name segments, 4 chars each, count in next byte */ - End += 2 + (*(End + 1) * ACPI_NAME_SIZE); + End += 2 + (*(End + 1) * ACPI_NAMESEG_SIZE); break; default: /* Single name segment */ - End += ACPI_NAME_SIZE; + End += ACPI_NAMESEG_SIZE; break; } @@ -708,7 +708,7 @@ AcpiPsGetNextField ( ACPI_MOVE_32_TO_32 (&Name, ParserState->Aml); AcpiPsSetName (Field, Name); - ParserState->Aml += ACPI_NAME_SIZE; + ParserState->Aml += ACPI_NAMESEG_SIZE; ASL_CV_CAPTURE_COMMENTS_ONLY (ParserState); diff --git a/src/acpica/source/components/resources/rsxface.c b/src/acpica/source/components/resources/rsxface.c index 1a624dc2..2e8130b3 100644 --- a/src/acpica/source/components/resources/rsxface.c +++ b/src/acpica/source/components/resources/rsxface.c @@ -825,10 +825,10 @@ AcpiWalkResources ( /* Parameter validation */ if (!DeviceHandle || !UserFunction || !Name || - (!ACPI_COMPARE_NAME (Name, METHOD_NAME__CRS) && - !ACPI_COMPARE_NAME (Name, METHOD_NAME__PRS) && - !ACPI_COMPARE_NAME (Name, METHOD_NAME__AEI) && - !ACPI_COMPARE_NAME (Name, METHOD_NAME__DMA))) + (!ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__CRS) && + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__PRS) && + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__AEI) && + !ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__DMA))) { return_ACPI_STATUS (AE_BAD_PARAMETER); } diff --git a/src/acpica/source/components/tables/tbdata.c b/src/acpica/source/components/tables/tbdata.c index 1fc20a38..9d86fdbc 100644 --- a/src/acpica/source/components/tables/tbdata.c +++ b/src/acpica/source/components/tables/tbdata.c @@ -676,7 +676,7 @@ AcpiTbVerifyTempTable ( /* If a particular signature is expected (DSDT/FACS), it must match */ if (Signature && - !ACPI_COMPARE_NAME (&TableDesc->Signature, Signature)) + !ACPI_COMPARE_NAMESEG (&TableDesc->Signature, Signature)) { ACPI_BIOS_ERROR ((AE_INFO, "Invalid signature 0x%X for ACPI table, expected [%s]", diff --git a/src/acpica/source/components/tables/tbfind.c b/src/acpica/source/components/tables/tbfind.c index 4ec53043..3119ddb1 100644 --- a/src/acpica/source/components/tables/tbfind.c +++ b/src/acpica/source/components/tables/tbfind.c @@ -207,7 +207,7 @@ AcpiTbFindTable ( /* Normalize the input strings */ memset (&Header, 0, sizeof (ACPI_TABLE_HEADER)); - ACPI_MOVE_NAME (Header.Signature, Signature); + ACPI_COPY_NAMESEG (Header.Signature, Signature); strncpy (Header.OemId, OemId, ACPI_OEM_ID_SIZE); strncpy (Header.OemTableId, OemTableId, ACPI_OEM_TABLE_ID_SIZE); @@ -217,7 +217,7 @@ AcpiTbFindTable ( for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) { if (memcmp (&(AcpiGbl_RootTableList.Tables[i].Signature), - Header.Signature, ACPI_NAME_SIZE)) + Header.Signature, ACPI_NAMESEG_SIZE)) { /* Not the requested table */ @@ -245,7 +245,7 @@ AcpiTbFindTable ( /* Check for table match on all IDs */ if (!memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->Signature, - Header.Signature, ACPI_NAME_SIZE) && + Header.Signature, ACPI_NAMESEG_SIZE) && (!OemId[0] || !memcmp (AcpiGbl_RootTableList.Tables[i].Pointer->OemId, Header.OemId, ACPI_OEM_ID_SIZE)) && diff --git a/src/acpica/source/components/tables/tbinstal.c b/src/acpica/source/components/tables/tbinstal.c index fbb85ce7..c1d47022 100644 --- a/src/acpica/source/components/tables/tbinstal.c +++ b/src/acpica/source/components/tables/tbinstal.c @@ -274,7 +274,7 @@ AcpiTbInstallStandardTable ( */ if (!Reload && AcpiGbl_DisableSsdtTableInstall && - ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) + ACPI_COMPARE_NAMESEG (&NewTableDesc.Signature, ACPI_SIG_SSDT)) { ACPI_INFO (( "Ignoring installation of %4.4s at %8.8X%8.8X", diff --git a/src/acpica/source/components/tables/tbprint.c b/src/acpica/source/components/tables/tbprint.c index ffa4856b..0ff6a6ce 100644 --- a/src/acpica/source/components/tables/tbprint.c +++ b/src/acpica/source/components/tables/tbprint.c @@ -225,10 +225,10 @@ AcpiTbCleanupTableHeader ( memcpy (OutHeader, Header, sizeof (ACPI_TABLE_HEADER)); - AcpiTbFixString (OutHeader->Signature, ACPI_NAME_SIZE); + AcpiTbFixString (OutHeader->Signature, ACPI_NAMESEG_SIZE); AcpiTbFixString (OutHeader->OemId, ACPI_OEM_ID_SIZE); AcpiTbFixString (OutHeader->OemTableId, ACPI_OEM_TABLE_ID_SIZE); - AcpiTbFixString (OutHeader->AslCompilerId, ACPI_NAME_SIZE); + AcpiTbFixString (OutHeader->AslCompilerId, ACPI_NAMESEG_SIZE); } @@ -253,7 +253,7 @@ AcpiTbPrintTableHeader ( ACPI_TABLE_HEADER LocalHeader; - if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_FACS)) + if (ACPI_COMPARE_NAMESEG (Header->Signature, ACPI_SIG_FACS)) { /* FACS only has signature and length fields */ @@ -320,8 +320,8 @@ AcpiTbVerifyChecksum ( * They are the odd tables, have no standard ACPI header and no checksum */ - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_S3PT) || - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_FACS)) + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_S3PT) || + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_FACS)) { return (AE_OK); } diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c index 9bb3fe89..badee3c5 100644 --- a/src/acpica/source/components/tables/tbutils.c +++ b/src/acpica/source/components/tables/tbutils.c @@ -503,7 +503,7 @@ AcpiTbParseRootTable ( ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex); if (ACPI_SUCCESS (Status) && - ACPI_COMPARE_NAME ( + ACPI_COMPARE_NAMESEG ( &AcpiGbl_RootTableList.Tables[TableIndex].Signature, ACPI_SIG_FADT)) { diff --git a/src/acpica/source/components/tables/tbxface.c b/src/acpica/source/components/tables/tbxface.c index 097e535d..ae5991aa 100644 --- a/src/acpica/source/components/tables/tbxface.c +++ b/src/acpica/source/components/tables/tbxface.c @@ -401,7 +401,7 @@ AcpiGetTableHeader ( for (i = 0, j = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) { - if (!ACPI_COMPARE_NAME ( + if (!ACPI_COMPARE_NAMESEG ( &(AcpiGbl_RootTableList.Tables[i].Signature), Signature)) { continue; @@ -504,7 +504,7 @@ AcpiGetTable ( { TableDesc = &AcpiGbl_RootTableList.Tables[i]; - if (!ACPI_COMPARE_NAME (&TableDesc->Signature, Signature)) + if (!ACPI_COMPARE_NAMESEG (&TableDesc->Signature, Signature)) { continue; } diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c index bda55ea2..217d54bf 100644 --- a/src/acpica/source/components/tables/tbxfload.c +++ b/src/acpica/source/components/tables/tbxfload.c @@ -275,7 +275,7 @@ AcpiTbLoadNamespace ( Table = &AcpiGbl_RootTableList.Tables[AcpiGbl_DsdtIndex]; if (!AcpiGbl_RootTableList.CurrentTableCount || - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_DSDT) || + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_DSDT) || ACPI_FAILURE (AcpiTbValidateTable (Table))) { Status = AE_NO_ACPI_TABLES; @@ -334,9 +334,9 @@ AcpiTbLoadNamespace ( Table = &AcpiGbl_RootTableList.Tables[i]; if (!Table->Address || - (!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) && - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) && - !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) || + (!ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_SSDT) && + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_PSDT) && + !ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_OSDT)) || ACPI_FAILURE (AcpiTbValidateTable (Table))) { continue; @@ -556,7 +556,7 @@ AcpiUnloadParentTable ( * only these types can contain AML and thus are the only types * that can create namespace objects. */ - if (ACPI_COMPARE_NAME ( + if (ACPI_COMPARE_NAMESEG ( AcpiGbl_RootTableList.Tables[i].Signature.Ascii, ACPI_SIG_DSDT)) { diff --git a/src/acpica/source/components/utilities/utascii.c b/src/acpica/source/components/utilities/utascii.c index 08dcb920..c7aaff40 100644 --- a/src/acpica/source/components/utilities/utascii.c +++ b/src/acpica/source/components/utilities/utascii.c @@ -176,7 +176,7 @@ AcpiUtValidNameseg ( /* Validate each character in the signature */ - for (i = 0; i < ACPI_NAME_SIZE; i++) + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) { if (!AcpiUtValidNameChar (Name[i], i)) { diff --git a/src/acpica/source/components/utilities/utdecode.c b/src/acpica/source/components/utilities/utdecode.c index 443a6dd7..3daff815 100644 --- a/src/acpica/source/components/utilities/utdecode.c +++ b/src/acpica/source/components/utilities/utdecode.c @@ -214,17 +214,17 @@ const UINT8 AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] = const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS] = { - "SystemMemory", /* 0x00 */ - "SystemIO", /* 0x01 */ - "PCI_Config", /* 0x02 */ - "EmbeddedControl", /* 0x03 */ - "SMBus", /* 0x04 */ - "SystemCMOS", /* 0x05 */ - "PCIBARTarget", /* 0x06 */ - "IPMI", /* 0x07 */ - "GeneralPurposeIo", /* 0x08 */ - "GenericSerialBus", /* 0x09 */ - "PCC" /* 0x0A */ + "SystemMemory", /* 0x00 */ + "SystemIO", /* 0x01 */ + "PCI_Config", /* 0x02 */ + "EmbeddedControl", /* 0x03 */ + "SMBus", /* 0x04 */ + "SystemCMOS", /* 0x05 */ + "PCIBARTarget", /* 0x06 */ + "IPMI", /* 0x07 */ + "GeneralPurposeIo", /* 0x08 */ + "GenericSerialBus", /* 0x09 */ + "PlatformCommChannel"/* 0x0A */ }; @@ -416,7 +416,7 @@ AcpiUtGetNodeName ( ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) Object; - /* Must return a string of exactly 4 characters == ACPI_NAME_SIZE */ + /* Must return a string of exactly 4 characters == ACPI_NAMESEG_SIZE */ if (!Object) { diff --git a/src/acpica/source/components/utilities/utmisc.c b/src/acpica/source/components/utilities/utmisc.c index acc048d6..466e3fa2 100644 --- a/src/acpica/source/components/utilities/utmisc.c +++ b/src/acpica/source/components/utilities/utmisc.c @@ -214,10 +214,10 @@ AcpiUtIsAmlTable ( /* These are the only tables that contain executable AML */ - if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) || - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_PSDT) || - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT) || - ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_OSDT) || + if (ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT) || + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_PSDT) || + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_SSDT) || + ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_OSDT) || ACPI_IS_OEM_SIG (Table->Signature)) { return (TRUE); diff --git a/src/acpica/source/components/utilities/utpredef.c b/src/acpica/source/components/utilities/utpredef.c index e1cdd704..8d9c5b0b 100644 --- a/src/acpica/source/components/utilities/utpredef.c +++ b/src/acpica/source/components/utilities/utpredef.c @@ -237,7 +237,7 @@ AcpiUtMatchPredefinedMethod ( ThisName = AcpiGbl_PredefinedMethods; while (ThisName->Info.Name[0]) { - if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name)) + if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name)) { return (ThisName); } @@ -374,7 +374,7 @@ AcpiUtMatchResourceName ( 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 (ThisName); } diff --git a/src/acpica/source/components/utilities/utstring.c b/src/acpica/source/components/utilities/utstring.c index 893a9574..f0ee49a0 100644 --- a/src/acpica/source/components/utilities/utstring.c +++ b/src/acpica/source/components/utilities/utstring.c @@ -303,16 +303,16 @@ AcpiUtRepairName ( * Special case for the root node. This can happen if we get an * error during the execution of module-level code. */ - if (ACPI_COMPARE_NAME (Name, ACPI_ROOT_PATHNAME)) + if (ACPI_COMPARE_NAMESEG (Name, ACPI_ROOT_PATHNAME)) { return; } - ACPI_MOVE_NAME (&OriginalName, Name); + ACPI_COPY_NAMESEG (&OriginalName, Name); /* Check each character in the name */ - for (i = 0; i < ACPI_NAME_SIZE; i++) + for (i = 0; i < ACPI_NAMESEG_SIZE; i++) { if (AcpiUtValidNameChar (Name[i], i)) { diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h index b5c4aa02..e1ed0053 100644 --- a/src/acpica/source/include/aclocal.h +++ b/src/acpica/source/include/aclocal.h @@ -480,7 +480,7 @@ ACPI_STATUS (*ACPI_INTERNAL_METHOD) ( */ typedef struct acpi_name_info { - char Name[ACPI_NAME_SIZE]; + char Name[ACPI_NAMESEG_SIZE]; UINT16 ArgumentList; UINT8 ExpectedBtypes; @@ -568,7 +568,7 @@ typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER) ( typedef struct acpi_simple_repair_info { - char Name[ACPI_NAME_SIZE]; + char Name[ACPI_NAMESEG_SIZE]; UINT32 UnexpectedBtypes; UINT32 PackageIndex; ACPI_OBJECT_CONVERTER ObjectConverter; diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h index ad653f0e..d3e4e7b5 100644 --- a/src/acpica/source/include/acpixf.h +++ b/src/acpica/source/include/acpixf.h @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20190215 +#define ACPI_CA_VERSION 0x20190329 #include "acconfig.h" #include "actypes.h" diff --git a/src/acpica/source/include/actbl.h b/src/acpica/source/include/actbl.h index 97134e5e..d6b9e8ff 100644 --- a/src/acpica/source/include/actbl.h +++ b/src/acpica/source/include/actbl.h @@ -213,14 +213,14 @@ typedef struct acpi_table_header { - char Signature[ACPI_NAME_SIZE]; /* ASCII table signature */ + char Signature[ACPI_NAMESEG_SIZE]; /* ASCII table signature */ UINT32 Length; /* Length of table in bytes, including this header */ UINT8 Revision; /* ACPI Specification minor version number */ UINT8 Checksum; /* To make sum of entire table == 0 */ char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */ char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */ UINT32 OemRevision; /* OEM revision number */ - char AslCompilerId[ACPI_NAME_SIZE]; /* ASCII ASL compiler vendor ID */ + char AslCompilerId[ACPI_NAMESEG_SIZE]; /* ASCII ASL compiler vendor ID */ UINT32 AslCompilerRevision; /* ASL compiler version */ } ACPI_TABLE_HEADER; diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h index 2a65ee8f..e7a2d578 100644 --- a/src/acpica/source/include/actypes.h +++ b/src/acpica/source/include/actypes.h @@ -520,7 +520,7 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS; /* Names within the namespace are 4 bytes long */ -#define ACPI_NAME_SIZE 4 +#define ACPI_NAMESEG_SIZE 4 /* Fixed by ACPI spec */ #define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ #define ACPI_PATH_SEPARATOR '.' @@ -666,11 +666,11 @@ typedef UINT64 ACPI_INTEGER; /* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */ #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED -#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) -#define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) +#define ACPI_COMPARE_NAMESEG(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b))) +#define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src))) #else -#define ACPI_COMPARE_NAME(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) -#define ACPI_MOVE_NAME(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) +#define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE)) +#define ACPI_COPY_NAMESEG(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE)) #endif /* Support for the special RSDP signature (8 characters) */ @@ -680,7 +680,7 @@ typedef UINT64 ACPI_INTEGER; /* Support for OEMx signature (x can be any character) */ #define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\ - strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE) + strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE) /* * Algorithm to obtain access bit width. diff --git a/src/acpica/source/include/platform/aclinux.h b/src/acpica/source/include/platform/aclinux.h index 990d17c7..f6522e32 100644 --- a/src/acpica/source/include/platform/aclinux.h +++ b/src/acpica/source/include/platform/aclinux.h @@ -221,6 +221,11 @@ #define ACPI_NO_ERROR_MESSAGES #undef ACPI_DEBUG_OUTPUT +/* Use a specific bugging default separate from ACPICA */ + +#undef ACPI_DEBUG_DEFAULT +#define ACPI_DEBUG_DEFAULT (ACPI_LV_INFO | ACPI_LV_REPAIR) + /* External interface for __KERNEL__, stub is needed */ #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \ diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h index eb244841..602356de 100644 --- a/src/acpica/source/tools/acpiexec/aecommon.h +++ b/src/acpica/source/tools/acpiexec/aecommon.h @@ -287,6 +287,10 @@ void AeMiscellaneousTests ( void); +void +AeLateTest ( + void); + /* aeregion */ ACPI_STATUS diff --git a/src/acpica/source/tools/acpiexec/aeexception.c b/src/acpica/source/tools/acpiexec/aeexception.c index 2a25d181..77ba166b 100644 --- a/src/acpica/source/tools/acpiexec/aeexception.c +++ b/src/acpica/source/tools/acpiexec/aeexception.c @@ -206,7 +206,7 @@ AeExceptionHandler ( if (Name) { - if (ACPI_COMPARE_NAME (&Name, ACPI_ROOT_PATHNAME)) + if (ACPI_COMPARE_NAMESEG (&Name, ACPI_ROOT_PATHNAME)) { AcpiOsPrintf (AE_PREFIX "Evaluating executable code at [%s]\n", ACPI_NAMESPACE_ROOT);