From owner-svn-src-head@freebsd.org Fri Mar 29 20:21:37 2019 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A7F91551692; Fri, 29 Mar 2019 20:21:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11F1B80417; Fri, 29 Mar 2019 20:21:37 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DFB8340B2; Fri, 29 Mar 2019 20:21:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x2TKLa0J039452; Fri, 29 Mar 2019 20:21:36 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x2TKLSZR039409; Fri, 29 Mar 2019 20:21:28 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201903292021.x2TKLSZR039409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 29 Mar 2019 20:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345713 - in head: sys/amd64/acpica sys/arm64/acpica sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/... X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head: sys/amd64/acpica sys/arm64/acpica sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/compon... X-SVN-Commit-Revision: 345713 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 11F1B80417 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.975,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Mar 2019 20:21:38 -0000 Author: jkim Date: Fri Mar 29 20:21:28 2019 New Revision: 345713 URL: https://svnweb.freebsd.org/changeset/base/345713 Log: Merge ACPICA 20190329. Modified: head/sys/amd64/acpica/acpi_machdep.c head/sys/arm64/acpica/acpi_machdep.c head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/adisasm.c head/sys/contrib/dev/acpica/common/adwalk.c head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/common/ahtable.c head/sys/contrib/dev/acpica/common/dmrestag.c head/sys/contrib/dev/acpica/common/dmtable.c head/sys/contrib/dev/acpica/common/dmtables.c head/sys/contrib/dev/acpica/compiler/aslanalyze.c head/sys/contrib/dev/acpica/compiler/aslcodegen.c head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslload.c head/sys/contrib/dev/acpica/compiler/aslmessages.c head/sys/contrib/dev/acpica/compiler/aslmethod.c head/sys/contrib/dev/acpica/compiler/asloffset.c head/sys/contrib/dev/acpica/compiler/asloperands.c head/sys/contrib/dev/acpica/compiler/aslopt.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/asltransform.c head/sys/contrib/dev/acpica/compiler/aslutils.c head/sys/contrib/dev/acpica/compiler/aslxref.c head/sys/contrib/dev/acpica/compiler/dtcompile.c head/sys/contrib/dev/acpica/compiler/dttemplate.c head/sys/contrib/dev/acpica/components/debugger/dbexec.c head/sys/contrib/dev/acpica/components/debugger/dbnames.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmnames.c head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c head/sys/contrib/dev/acpica/components/events/evgpeinit.c head/sys/contrib/dev/acpica/components/executer/exnames.c head/sys/contrib/dev/acpica/components/namespace/nsaccess.c head/sys/contrib/dev/acpica/components/namespace/nsdump.c head/sys/contrib/dev/acpica/components/namespace/nsinit.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsobject.c head/sys/contrib/dev/acpica/components/namespace/nsparse.c head/sys/contrib/dev/acpica/components/namespace/nsrepair.c head/sys/contrib/dev/acpica/components/namespace/nsrepair2.c head/sys/contrib/dev/acpica/components/namespace/nsutils.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/resources/rsxface.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbfind.c head/sys/contrib/dev/acpica/components/tables/tbinstal.c head/sys/contrib/dev/acpica/components/tables/tbprint.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/utilities/utascii.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utmisc.c head/sys/contrib/dev/acpica/components/utilities/utpredef.c head/sys/contrib/dev/acpica/components/utilities/utstring.c head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/actypes.h head/sys/dev/acpica/Osd/OsdTable.c head/sys/dev/acpica/acpi_quirk.c head/sys/i386/acpica/acpi_machdep.c head/usr.sbin/acpi/acpidump/acpi.c Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- head/sys/amd64/acpica/acpi_machdep.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/amd64/acpica/acpi_machdep.c Fri Mar 29 20:21:28 2019 (r345713) @@ -164,7 +164,7 @@ map_table(vm_paddr_t pa, int offset, const char *sig) void *table; header = table_map(pa, offset, sizeof(ACPI_TABLE_HEADER)); - if (strncmp(header->Signature, sig, ACPI_NAME_SIZE) != 0) { + if (strncmp(header->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { table_unmap(header, sizeof(ACPI_TABLE_HEADER)); return (NULL); } @@ -202,7 +202,7 @@ probe_table(vm_paddr_t address, const char *sig) printf("Table '%.4s' at 0x%jx\n", table->Signature, (uintmax_t)address); - if (strncmp(table->Signature, sig, ACPI_NAME_SIZE) != 0) { + if (strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { table_unmap(table, sizeof(ACPI_TABLE_HEADER)); return (0); } Modified: head/sys/arm64/acpica/acpi_machdep.c ============================================================================== --- head/sys/arm64/acpica/acpi_machdep.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/arm64/acpica/acpi_machdep.c Fri Mar 29 20:21:28 2019 (r345713) @@ -70,7 +70,7 @@ map_table(vm_paddr_t pa, int offset, const char *sig) void *table; header = pmap_mapbios(pa, sizeof(ACPI_TABLE_HEADER)); - if (strncmp(header->Signature, sig, ACPI_NAME_SIZE) != 0) { + if (strncmp(header->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { pmap_unmapbios((vm_offset_t)header, sizeof(ACPI_TABLE_HEADER)); return (NULL); } @@ -109,7 +109,7 @@ probe_table(vm_paddr_t address, const char *sig) printf("Table '%.4s' at 0x%jx\n", table->Signature, (uintmax_t)address); - if (strncmp(table->Signature, sig, ACPI_NAME_SIZE) != 0) { + if (strncmp(table->Signature, sig, ACPI_NAMESEG_SIZE) != 0) { pmap_unmapbios((vm_offset_t)table, sizeof(ACPI_TABLE_HEADER)); return (0); } Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/changes.txt Fri Mar 29 20:21:28 2019 (r345713) @@ -1,7 +1,75 @@ ---------------------------------------- -15 February 2019. Summary of changes for version 20190215: +29 March 2019. Summary of changes for version 20190329: -This release is available at https://acpica.org/downloads + +1) ACPICA kernel-resident subsystem: + +Namespace support: Remove the address nodes from global list after method +termination. The global address list contains pointers to namespace nodes +that represent Operation Regions. This change properly removes Operation +Region namespace nodes that are declared dynamically during method +execution. + +Linux: Use a different debug default than ACPICA. There was a divergence +between Linux and the ACPICA codebases. In order to resolve this +divergence, Linux now declares its own debug default in aclinux.h + +Renamed some internal macros to improve code understanding and +maintenance. The macros below all operate on single 4-character ACPI +NameSegs, not generic strings (old -> new): + ACPI_NAME_SIZE -> ACPI_NAMESEG_SIZE + ACPI_COMPARE_NAME -> ACPI_COMPARE_NAMESEG + ACPI_MOVE_NAME -> ACPI_COPY_NAMESEG + +Fix for missing comma in array declaration for the AcpiGbl_GenericNotify +table. + +Test suite: Update makefiles, add PCC operation region support + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented additional illegal forward reference detection. Now +detect and emit an error upon detection of a forward reference from a +Field to an Operation Region. This will fail at runtime if allowed to +pass the compiler. + +AcpiExec: Add an address list check for dynamic Operation Regions. This +feature performs a sanity test for each node the global address list. +This is done in order to ensure that all dynamic operation regions are +properly removed from the global address list and no dangling pointers +are left behind. + +Disassembler: Improved generation of resource pathnames. This change +improves the code that generates resource descriptor and resource tag +pathnames. The original code used a bunch of str* C library functions +that caused warnings on some compilers. + +iASL: Removed some uses of strncpy and replaced with memmove. The strncpy +function can overwrite buffers if the calling code is not very careful. +In the case of generating a module/table header, use of memmove is a +better implementation. + + +3) Status of new features that have not been completed at this time: + +iASL: Implementing an enhanced multiple file compilation into a single +namespace feature (Status): This feature will be released soon, and +allows multiple ASL files to be compiled into the same single namespace. +By doing so, any unresolved external declarations as well as duplicate +named object declarations can be detected during compilation (rather than +later during runtime). The following commands are examples that utilize +this feature: + iasl dsdt.asl ssdt.asl + iasl dsdt.asl ssdt1.asl ssdt2.asl + iasl dsdt.asl ssdt*.asl + +ASL tutorial status: Feedback is being gathered internally and the +current plan is to publish this tutorial on the ACPICA website after a +final review by a tech writer. + +---------------------------------------- +15 February 2019. Summary of changes for version 20190215: 0) Support for ACPI specification version 6.3: Modified: head/sys/contrib/dev/acpica/common/acfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acfileio.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/common/acfileio.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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])) { Modified: head/sys/contrib/dev/acpica/common/adisasm.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adisasm.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/common/adisasm.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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 Modified: head/sys/contrib/dev/acpica/common/adwalk.c ============================================================================== --- head/sys/contrib/dev/acpica/common/adwalk.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/common/adwalk.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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; Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); } Modified: head/sys/contrib/dev/acpica/common/ahtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahtable.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/common/ahtable.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); } Modified: head/sys/contrib/dev/acpica/common/dmrestag.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmrestag.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/common/dmrestag.c Fri Mar 29 20:21:28 2019 (r345713) @@ -747,6 +747,7 @@ AcpiGetTagPathname ( UINT8 ResourceTableIndex; ACPI_SIZE RequiredSize; char *Pathname; + char *PathnameEnd; AML_RESOURCE *Aml; ACPI_PARSE_OBJECT *Op; char *InternalPath; @@ -809,20 +810,27 @@ 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 */ AcpiNsInternalizeName (Pathname, &InternalPath); @@ -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 */ Modified: head/sys/contrib/dev/acpica/common/dmtable.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtable.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/common/dmtable.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); } Modified: head/sys/contrib/dev/acpica/common/dmtables.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtables.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/common/dmtables.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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"); } Modified: head/sys/contrib/dev/acpica/compiler/aslanalyze.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslanalyze.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); } Modified: head/sys/contrib/dev/acpica/compiler/aslcodegen.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcodegen.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslcodegen.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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 */ Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Fri Mar 29 20:21:28 2019 (r345713) @@ -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, "\\")) { /* Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Fri Mar 29 20:21:28 2019 (r345713) @@ -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 */ Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Fri Mar 29 20:21:28 2019 (r345713) @@ -1239,7 +1239,7 @@ AslElevateException ( return (AE_LIMIT); } - AslGbl_ElevatedMessages[AslGbl_ExpectedMessagesIndex] = MessageId; + AslGbl_ElevatedMessages[AslGbl_ElevatedMessagesIndex] = MessageId; AslGbl_ElevatedMessagesIndex++; return (AE_OK); } Modified: head/sys/contrib/dev/acpica/compiler/aslload.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslload.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslload.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); Modified: head/sys/contrib/dev/acpica/compiler/aslmessages.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmessages.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslmessages.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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", Modified: head/sys/contrib/dev/acpica/compiler/aslmethod.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslmethod.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslmethod.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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 */ Modified: head/sys/contrib/dev/acpica/compiler/asloffset.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloffset.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/asloffset.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); Modified: head/sys/contrib/dev/acpica/compiler/asloperands.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asloperands.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/asloperands.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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])) { Modified: head/sys/contrib/dev/acpica/compiler/aslopt.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopt.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslopt.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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)); Modified: head/sys/contrib/dev/acpica/compiler/aslpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslpredef.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslpredef.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); } Modified: head/sys/contrib/dev/acpica/compiler/asltransform.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asltransform.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/asltransform.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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; } Modified: head/sys/contrib/dev/acpica/compiler/aslutils.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslutils.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslutils.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); } Modified: head/sys/contrib/dev/acpica/compiler/aslxref.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslxref.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/aslxref.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); Modified: head/sys/contrib/dev/acpica/compiler/dtcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dtcompile.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/dtcompile.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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)) Modified: head/sys/contrib/dev/acpica/compiler/dttemplate.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/dttemplate.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/compiler/dttemplate.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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)); Modified: head/sys/contrib/dev/acpica/components/debugger/dbexec.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbexec.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/debugger/dbexec.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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)) { Modified: head/sys/contrib/dev/acpica/components/debugger/dbnames.c ============================================================================== --- head/sys/contrib/dev/acpica/components/debugger/dbnames.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/debugger/dbnames.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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); Modified: head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c ============================================================================== --- head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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; } Modified: head/sys/contrib/dev/acpica/components/disassembler/dmnames.c ============================================================================== --- head/sys/contrib/dev/acpica/components/disassembler/dmnames.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/disassembler/dmnames.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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; } } Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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))) { Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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")); Modified: head/sys/contrib/dev/acpica/components/events/evgpeinit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/events/evgpeinit.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/events/evgpeinit.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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 */ Modified: head/sys/contrib/dev/acpica/components/executer/exnames.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exnames.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/executer/exnames.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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++; Modified: head/sys/contrib/dev/acpica/components/namespace/nsaccess.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsaccess.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/namespace/nsaccess.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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; } Modified: head/sys/contrib/dev/acpica/components/namespace/nsdump.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsdump.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/namespace/nsdump.c Fri Mar 29 20:21:28 2019 (r345713) @@ -236,7 +236,7 @@ AcpiNsPrintPathname ( AcpiOsPrintf ("?"); } - Pathname += ACPI_NAME_SIZE; + Pathname += ACPI_NAMESEG_SIZE; NumSegments--; if (NumSegments) { Modified: head/sys/contrib/dev/acpica/components/namespace/nsinit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsinit.c Fri Mar 29 19:47:42 2019 (r345712) +++ head/sys/contrib/dev/acpica/components/namespace/nsinit.c Fri Mar 29 20:21:28 2019 (r345713) @@ -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. */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***