From patchwork Tue May 8 17:35:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 910358 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=fwts-devel-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 40gRTX4GNQz9ryk; Wed, 9 May 2018 03:35:28 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1fG6WL-0008Em-IC; Tue, 08 May 2018 17:35:25 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1fG6WJ-0008Eg-NN for fwts-devel@lists.ubuntu.com; Tue, 08 May 2018 17:35:23 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fG6WJ-0006Z3-El; Tue, 08 May 2018 17:35:23 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] ACPICA: Update to version 20180508 Date: Tue, 8 May 2018 18:35:22 +0100 Message-Id: <20180508173522.24111-1-colin.king@canonical.com> X-Mailer: git-send-email 2.17.0 MIME-Version: 1.0 X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: fwts-devel-bounces@lists.ubuntu.com Sender: "fwts-devel" From: Colin Ian King changes in this release of ACPICA are detailed at the following link on the ACPICA developer mailing list: https://lists.acpica.org/pipermail/devel/2018-May/001795.html Fortunately the delta is relatively small for this release. Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- .../source/components/executer/exconfig.c | 10 +++ .../source/components/namespace/nsinit.c | 82 ++++++++++++++----- .../source/components/utilities/utbuffer.c | 4 +- src/acpica/source/include/aclocal.h | 11 +-- src/acpica/source/include/acnamesp.h | 6 ++ src/acpica/source/include/acpixf.h | 2 +- 6 files changed, 87 insertions(+), 28 deletions(-) diff --git a/src/acpica/source/components/executer/exconfig.c b/src/acpica/source/components/executer/exconfig.c index 2ae60f55..590d8366 100644 --- a/src/acpica/source/components/executer/exconfig.c +++ b/src/acpica/source/components/executer/exconfig.c @@ -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) @@ -615,6 +620,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 */ Status = AcpiExStore (DdbHandle, Target, WalkState); diff --git a/src/acpica/source/components/namespace/nsinit.c b/src/acpica/source/components/namespace/nsinit.c index dc76db9f..dcfb41ed 100644 --- a/src/acpica/source/components/namespace/nsinit.c +++ b/src/acpica/source/components/namespace/nsinit.c @@ -406,6 +406,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 @@ -533,27 +592,10 @@ AcpiNsInitOneObject ( case ACPI_TYPE_PACKAGE: - Info->PackageInit++; - Status = AcpiDsGetPackageArguments (ObjDesc); - if (ACPI_FAILURE (Status)) - { - break; - } - - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE, - "%s: Completing resolution of Package elements\n", - ACPI_GET_FUNCTION_NAME)); + /* Complete the initialization/resolution of the package object */ - /* - * 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: diff --git a/src/acpica/source/components/utilities/utbuffer.c b/src/acpica/source/components/utilities/utbuffer.c index 741742c4..83a5b3c5 100644 --- a/src/acpica/source/components/utilities/utbuffer.c +++ b/src/acpica/source/components/utilities/utbuffer.c @@ -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 */ diff --git a/src/acpica/source/include/aclocal.h b/src/acpica/source/include/aclocal.h index f487a4ec..d92e6bbd 100644 --- a/src/acpica/source/include/aclocal.h +++ b/src/acpica/source/include/aclocal.h @@ -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; diff --git a/src/acpica/source/include/acnamesp.h b/src/acpica/source/include/acnamesp.h index a2c80dfe..529fc6e7 100644 --- a/src/acpica/source/include/acnamesp.h +++ b/src/acpica/source/include/acnamesp.h @@ -204,6 +204,12 @@ ACPI_STATUS AcpiNsInitializeDevices ( UINT32 Flags); +ACPI_STATUS +AcpiNsInitOnePackage ( + ACPI_HANDLE ObjHandle, + UINT32 Level, + void *Context, + void **ReturnValue); /* * nsload - Namespace loading diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h index 2fee13a5..6e10c851 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 0x20180427 +#define ACPI_CA_VERSION 0x20180508 #include "acconfig.h" #include "actypes.h"