From owner-svn-src-all@freebsd.org Tue May 8 18:18:29 2018 Return-Path: Delivered-To: svn-src-all@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 AFB35FC48B5; Tue, 8 May 2018 18:18:29 +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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60FD470096; Tue, 8 May 2018 18:18:29 +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 3FA9D2DD24; Tue, 8 May 2018 18:18:29 +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 w48IITxO066733; Tue, 8 May 2018 18:18:29 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w48IIRZA066726; Tue, 8 May 2018 18:18:27 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201805081818.w48IIRZA066726@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 8 May 2018 18:18:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333380 - in head/sys/contrib/dev/acpica: . components/executer components/namespace components/utilities include X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: in head/sys/contrib/dev/acpica: . components/executer components/namespace components/utilities include X-SVN-Commit-Revision: 333380 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 May 2018 18:18:29 -0000 Author: jkim Date: Tue May 8 18:18:27 2018 New Revision: 333380 URL: https://svnweb.freebsd.org/changeset/base/333380 Log: MFV: r333378 Import ACPICA 20180508. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/namespace/nsinit.c head/sys/contrib/dev/acpica/components/utilities/utbuffer.c head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acpixf.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Tue May 8 18:11:26 2018 (r333379) +++ head/sys/contrib/dev/acpica/changes.txt Tue May 8 18:18:27 2018 (r333380) @@ -1,4 +1,25 @@ ---------------------------------------- +8 May 2018. Summary of changes for version 20180508: + + +1) ACPICA kernel-resident subsystem: + +Completed the new (recently deployed) package resolution mechanism for +the Load and LoadTable ASL/AML operators. This fixes a regression that +was introduced in version 20180209 that could result in an +AE_AML_INTERNAL exception during the loading of a dynamic ACPI/AML table +(SSDT) that contains package objects. + + +2) iASL Compiler/Disassembler and Tools: + +AcpiDump and AcpiXtract: Implemented support for ACPI tables larger than +1 MB. This change allows for table offsets within the acpidump file to be +up to 8 characters. These changes are backwards compatible with existing +acpidump files. + + +---------------------------------------- 27 April 2018. Summary of changes for version 20180427: Modified: head/sys/contrib/dev/acpica/components/executer/exconfig.c ============================================================================== --- head/sys/contrib/dev/acpica/components/executer/exconfig.c Tue May 8 18:11:26 2018 (r333379) +++ head/sys/contrib/dev/acpica/components/executer/exconfig.c Tue May 8 18:18:27 2018 (r333380) @@ -342,6 +342,11 @@ AcpiExLoadTableOp ( return_ACPI_STATUS (Status); } + /* Complete the initialization/resolution of package objects */ + + Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL); + /* Parameter Data (optional) */ if (ParameterNode) @@ -614,6 +619,11 @@ AcpiExLoadOp ( return_ACPI_STATUS (Status); } + + /* Complete the initialization/resolution of package objects */ + + Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL); /* Store the DdbHandle into the Target operand */ Modified: head/sys/contrib/dev/acpica/components/namespace/nsinit.c ============================================================================== --- head/sys/contrib/dev/acpica/components/namespace/nsinit.c Tue May 8 18:11:26 2018 (r333379) +++ head/sys/contrib/dev/acpica/components/namespace/nsinit.c Tue May 8 18:18:27 2018 (r333380) @@ -408,6 +408,65 @@ ErrorExit: /******************************************************************************* * + * FUNCTION: AcpiNsInitOnePackage + * + * PARAMETERS: ObjHandle - Node + * Level - Current nesting level + * Context - Not used + * ReturnValue - Not used + * + * RETURN: Status + * + * DESCRIPTION: Callback from AcpiWalkNamespace. Invoked for every package + * within the namespace. Used during dynamic load of an SSDT. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiNsInitOnePackage ( + ACPI_HANDLE ObjHandle, + UINT32 Level, + void *Context, + void **ReturnValue) +{ + ACPI_STATUS Status; + ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; + + + ObjDesc = AcpiNsGetAttachedObject (Node); + if (!ObjDesc) + { + return (AE_OK); + } + + /* Exit if package is already initialized */ + + if (ObjDesc->Package.Flags & AOPOBJ_DATA_VALID) + { + return (AE_OK); + } + + Status = AcpiDsGetPackageArguments (ObjDesc); + if (ACPI_FAILURE (Status)) + { + return (AE_OK); + } + + Status = AcpiUtWalkPackageTree (ObjDesc, NULL, AcpiDsInitPackageElement, + NULL); + if (ACPI_FAILURE (Status)) + { + return (AE_OK); + } + + ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID; + return (AE_OK); +} + + +/******************************************************************************* + * * FUNCTION: AcpiNsInitOneObject * * PARAMETERS: ObjHandle - Node @@ -533,27 +592,10 @@ AcpiNsInitOneObject ( case ACPI_TYPE_PACKAGE: - Info->PackageInit++; - Status = AcpiDsGetPackageArguments (ObjDesc); - if (ACPI_FAILURE (Status)) - { - break; - } + /* Complete the initialization/resolution of the package object */ - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE, - "%s: Completing resolution of Package elements\n", - ACPI_GET_FUNCTION_NAME)); - - /* - * Resolve all named references in package objects (and all - * sub-packages). This action has been deferred until the entire - * namespace has been loaded, in order to support external and - * forward references from individual package elements (05/2017). - */ - Status = AcpiUtWalkPackageTree (ObjDesc, NULL, - AcpiDsInitPackageElement, NULL); - - ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID; + Info->PackageInit++; + Status = AcpiNsInitOnePackage (ObjHandle, Level, NULL, NULL); break; default: Modified: head/sys/contrib/dev/acpica/components/utilities/utbuffer.c ============================================================================== --- head/sys/contrib/dev/acpica/components/utilities/utbuffer.c Tue May 8 18:11:26 2018 (r333379) +++ head/sys/contrib/dev/acpica/components/utilities/utbuffer.c Tue May 8 18:18:27 2018 (r333380) @@ -205,7 +205,7 @@ AcpiUtDumpBuffer ( { /* Print current offset */ - AcpiOsPrintf ("%6.4X: ", (BaseOffset + i)); + AcpiOsPrintf ("%8.4X: ", (BaseOffset + i)); /* Print 16 hex chars */ @@ -387,7 +387,7 @@ AcpiUtDumpBufferToFile ( { /* Print current offset */ - fprintf (File, "%6.4X: ", (BaseOffset + i)); + fprintf (File, "%8.4X: ", (BaseOffset + i)); /* Print 16 hex chars */ Modified: head/sys/contrib/dev/acpica/include/aclocal.h ============================================================================== --- head/sys/contrib/dev/acpica/include/aclocal.h Tue May 8 18:11:26 2018 (r333379) +++ head/sys/contrib/dev/acpica/include/aclocal.h Tue May 8 18:18:27 2018 (r333380) @@ -284,7 +284,7 @@ typedef enum * DescriptorType is used to differentiate between internal descriptors. * * The node is optimized for both 32-bit and 64-bit platforms: - * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case. + * 28 bytes for the 32-bit case, 48 bytes for the 64-bit case. * * Note: The DescriptorType and Type fields must appear in the identical * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT @@ -301,10 +301,12 @@ typedef struct acpi_namespace_node struct acpi_namespace_node *Parent; /* Parent node */ struct acpi_namespace_node *Child; /* First child */ struct acpi_namespace_node *Peer; /* First peer */ + struct acpi_namespace_node *OwnerList; /* All nodes owned by a table or method */ - /* - * The following fields are used by the ASL compiler and disassembler only - */ +/* + * The following fields are appended to the namespace node and + * are used by the ASL compiler and AML disassembler only + */ #ifdef ACPI_LARGE_NAMESPACE_NODE union acpi_parse_object *Op; void *MethodLocals; @@ -312,7 +314,6 @@ typedef struct acpi_namespace_node UINT32 Value; UINT32 Length; UINT8 ArgCount; - #endif } ACPI_NAMESPACE_NODE; Modified: head/sys/contrib/dev/acpica/include/acnamesp.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acnamesp.h Tue May 8 18:11:26 2018 (r333379) +++ head/sys/contrib/dev/acpica/include/acnamesp.h Tue May 8 18:18:27 2018 (r333380) @@ -204,6 +204,12 @@ ACPI_STATUS AcpiNsInitializeDevices ( UINT32 Flags); +ACPI_STATUS +AcpiNsInitOnePackage ( + ACPI_HANDLE ObjHandle, + UINT32 Level, + void *Context, + void **ReturnValue); /* * nsload - Namespace loading Modified: head/sys/contrib/dev/acpica/include/acpixf.h ============================================================================== --- head/sys/contrib/dev/acpica/include/acpixf.h Tue May 8 18:11:26 2018 (r333379) +++ head/sys/contrib/dev/acpica/include/acpixf.h Tue May 8 18:18:27 2018 (r333380) @@ -154,7 +154,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20180427 +#define ACPI_CA_VERSION 0x20180508 #include #include