From patchwork Thu May 28 21:23:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 1300070 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Y10Z6JgJz9sRK; Fri, 29 May 2020 07:23:58 +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 1jeQ0K-0003iQ-6t; Thu, 28 May 2020 21:23:56 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jeQ0H-0003iE-Pa for fwts-devel@lists.ubuntu.com; Thu, 28 May 2020 21:23:53 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jeQ0H-00041t-Fk; Thu, 28 May 2020 21:23:53 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH] ACPICA: Update to version 20200528 Date: Thu, 28 May 2020 22:23:53 +0100 Message-Id: <20200528212353.515345-1-colin.king@canonical.com> X-Mailer: git-send-email 2.25.1 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/hyperkitty/list/devel@acpica.org/thread/XIGARBD4AECTLQPYP5A6MGJIUMMWWO4I/ Signed-off-by: Colin Ian King Acked-by: Alex Hung Acked-by: Ivan Hu --- src/acpica/source/compiler/aslcompiler.l | 1 + src/acpica/source/compiler/aslkeywords.y | 1 + src/acpica/source/compiler/aslmap.c | 1 + src/acpica/source/compiler/aslmethod.c | 5 +++- src/acpica/source/compiler/asltokens.y | 1 + src/acpica/source/compiler/aslxref.c | 21 ++++++++++++++--- .../source/components/debugger/dbdisply.c | 2 ++ .../source/components/utilities/utdecode.c | 23 ++++++++++--------- src/acpica/source/include/acpixf.h | 2 +- src/acpica/source/include/actypes.h | 3 ++- 10 files changed, 43 insertions(+), 17 deletions(-) diff --git a/src/acpica/source/compiler/aslcompiler.l b/src/acpica/source/compiler/aslcompiler.l index c12eb90b..4016faed 100644 --- a/src/acpica/source/compiler/aslcompiler.l +++ b/src/acpica/source/compiler/aslcompiler.l @@ -693,6 +693,7 @@ NamePathTail [.]{NameSeg} "GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */ "GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */ "PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */ +"PlatformRtMechanism" { count (0); return (PARSEOP_REGIONSPACE_PRM); } "FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); } /* ResourceTypeKeyword: Resource Usage - Resource Descriptors */ diff --git a/src/acpica/source/compiler/aslkeywords.y b/src/acpica/source/compiler/aslkeywords.y index 84a81632..8b456229 100644 --- a/src/acpica/source/compiler/aslkeywords.y +++ b/src/acpica/source/compiler/aslkeywords.y @@ -394,6 +394,7 @@ RegionSpaceKeyword | PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GPIO);} | PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GSBUS);} | PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCC);} + | PARSEOP_REGIONSPACE_PRM {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PRM);} | PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_FFIXEDHW);} ; diff --git a/src/acpica/source/compiler/aslmap.c b/src/acpica/source/compiler/aslmap.c index 65103049..2c03cd08 100644 --- a/src/acpica/source/compiler/aslmap.c +++ b/src/acpica/source/compiler/aslmap.c @@ -485,6 +485,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] = /* REGIONSPACE_PCC */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PLATFORM_COMM, 0, 0), /* REGIONSPACE_PCI */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PCI_CONFIG, 0, 0), /* REGIONSPACE_PCIBAR */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PCI_BAR_TARGET, 0, 0), +/* REGIONSPACE_PRM */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_PLATFORM_RT, 0, 0), /* REGIONSPACE_SMBUS */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, ACPI_ADR_SPACE_SMBUS, 0, 0), /* REGISTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0), /* RELEASE */ OP_TABLE_ENTRY (AML_RELEASE_OP, 0, 0, 0), diff --git a/src/acpica/source/compiler/aslmethod.c b/src/acpica/source/compiler/aslmethod.c index d56f4817..ff6fd474 100644 --- a/src/acpica/source/compiler/aslmethod.c +++ b/src/acpica/source/compiler/aslmethod.c @@ -724,7 +724,7 @@ MtCheckNamedObjectInMethod ( } OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode); - if (OpInfo->Class == AML_CLASS_NAMED_OBJECT) + if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) && (Op->Asl.AmlOpcode != AML_FIELD_OP)) { /* * 1) Mark the method as a method that creates named objects. @@ -739,6 +739,9 @@ MtCheckNamedObjectInMethod ( * Reason: If a thread blocks within the method for any reason, and * another thread enters the method, the method will fail because * an attempt will be made to create the same object twice. + * + * Note: The Field opcode is disallowed here because Field() does not + * create a new named object. */ ExternalPath = AcpiNsGetNormalizedPathname (MethodInfo->Op->Asl.Node, TRUE); diff --git a/src/acpica/source/compiler/asltokens.y b/src/acpica/source/compiler/asltokens.y index 0b61469a..49c060a5 100644 --- a/src/acpica/source/compiler/asltokens.y +++ b/src/acpica/source/compiler/asltokens.y @@ -422,6 +422,7 @@ NoEcho(' %token PARSEOP_REGIONSPACE_PCC %token PARSEOP_REGIONSPACE_PCI %token PARSEOP_REGIONSPACE_PCIBAR +%token PARSEOP_REGIONSPACE_PRM %token PARSEOP_REGIONSPACE_SMBUS %token PARSEOP_REGISTER %token PARSEOP_RELEASE diff --git a/src/acpica/source/compiler/aslxref.c b/src/acpica/source/compiler/aslxref.c index 0df33e31..4bbbe2bd 100644 --- a/src/acpica/source/compiler/aslxref.c +++ b/src/acpica/source/compiler/aslxref.c @@ -821,9 +821,24 @@ XfNamespaceLocateBegin ( Node->Flags |= ANOBJ_IS_REFERENCED; } - /* Attempt to optimize the NamePath */ - - OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node); + /* + * Attempt to optimize the NamePath + * + * One special case: CondRefOf operator - not all AML interpreter + * implementations expect optimized namepaths as a parameter to this + * operator. They require relative name paths with prefix operators or + * namepaths starting with the root scope. + * + * Other AML interpreter implementations do not perform the namespace + * search that starts at the current scope and recursively searching the + * parent scope until the root scope. The lack of search is only known to + * occur for the namestring parameter for the CondRefOf operator. + */ + if ((Op->Asl.Parent) && + (Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_CONDREFOF)) + { + OptOptimizeNamePath (Op, OpInfo->Flags, WalkState, Path, Node); + } /* * 1) Dereference an alias (A name reference that is an alias) diff --git a/src/acpica/source/components/debugger/dbdisply.c b/src/acpica/source/components/debugger/dbdisply.c index 58bd8eae..75e3e6f8 100644 --- a/src/acpica/source/components/debugger/dbdisply.c +++ b/src/acpica/source/components/debugger/dbdisply.c @@ -204,6 +204,8 @@ static ACPI_ADR_SPACE_TYPE AcpiGbl_SpaceIdList[] = ACPI_ADR_SPACE_IPMI, ACPI_ADR_SPACE_GPIO, ACPI_ADR_SPACE_GSBUS, + ACPI_ADR_SPACE_PLATFORM_COMM, + ACPI_ADR_SPACE_PLATFORM_RT, ACPI_ADR_SPACE_DATA_TABLE, ACPI_ADR_SPACE_FIXED_HARDWARE }; diff --git a/src/acpica/source/components/utilities/utdecode.c b/src/acpica/source/components/utilities/utdecode.c index 01b1823e..d7f2b5cc 100644 --- a/src/acpica/source/components/utilities/utdecode.c +++ b/src/acpica/source/components/utilities/utdecode.c @@ -214,17 +214,18 @@ 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 */ + "PCC", /* 0x0A */ + "PlatformRtMechanism" /* 0x0B */ }; diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h index ed280425..2eafdeac 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 0x20200430 +#define ACPI_CA_VERSION 0x20200528 #include "acconfig.h" #include "actypes.h" diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h index c7d2c9aa..2666ebfb 100644 --- a/src/acpica/source/include/actypes.h +++ b/src/acpica/source/include/actypes.h @@ -968,8 +968,9 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE; #define ACPI_ADR_SPACE_GPIO (ACPI_ADR_SPACE_TYPE) 8 #define ACPI_ADR_SPACE_GSBUS (ACPI_ADR_SPACE_TYPE) 9 #define ACPI_ADR_SPACE_PLATFORM_COMM (ACPI_ADR_SPACE_TYPE) 10 +#define ACPI_ADR_SPACE_PLATFORM_RT (ACPI_ADR_SPACE_TYPE) 11 -#define ACPI_NUM_PREDEFINED_REGIONS 11 +#define ACPI_NUM_PREDEFINED_REGIONS 12 /* * Special Address Spaces