From nobody Thu May 16 15:29:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75923+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75923+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1622585106; cv=none; d=zohomail.com; s=zohoarc; b=bnfN7X0IwKT/3Eg8bkpPuRMSREahtEQmD4BlF4C+X2YyLQVv61vqBbU2nzw7mpdBXZOwpXRD7uhhFI5Ax7xT0E6L7ze9+2ozpiOaJDbkLE0HZQVmwqP+2nf5PlJeBeI2B/tMsnajnwxrITiKUK1ZHPyaf9wfpysSI41Vm8vtaOk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622585106; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=cl4H9lU9BYPlsidBxef9EH6rx9DnHc2OuRkbWO9bmBM=; b=h64tmBYUqinLHeZETKbPm6MaDjCH2TEaUiRadJ/oisooW2t/YSKZ0oRzlF17EC9kXr4PaucwzPtX3rZX4OT+dUinmHWG/uB3AfTU0tjZNOeLfOKtlsiwNGQPqIOIT2z/06o6ET6yV0lcy9Qbkbg+UKZGzehRKCyOtzl7Epcb65A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75923+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622585106103673.137098420659; Tue, 1 Jun 2021 15:05:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id F4jZYY1788612xwcI824npAw; Tue, 01 Jun 2021 15:05:05 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.4825.1622585100070457894 for ; Tue, 01 Jun 2021 15:05:00 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AAD381042; Tue, 1 Jun 2021 15:04:59 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.3.149]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 4D72B3F774; Tue, 1 Jun 2021 15:04:58 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, dandan.bi@intel.com, gaoliming@byosoft.com.cn, michael.d.kinney@intel.com, Sami.Mujawar@arm.com, Alexei.Fedorov@arm.com Subject: [edk2-devel] [PATCH v1 1/2] MdePkg/MdeModulePkg: Move AML_NAME_SEG_SIZE definition Date: Tue, 1 Jun 2021 23:04:49 +0100 Message-Id: <20210601220450.28003-2-Pierre.Gondois@arm.com> In-Reply-To: <20210601220450.28003-1-Pierre.Gondois@arm.com> References: <20210601220450.28003-1-Pierre.Gondois@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: 8inKrNwa1BFMewrrwVhy5WyLx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622585105; bh=SkfDpFjm7qR0RvBCeZOSOXhKaURLMnL5SBGnGY4s1Vs=; h=Content-Type:Date:From:Reply-To:Subject:To; b=KG04FKl1KIF8tkjICqBsDoUsJmjqW6SnGnUnJBP3ZoHjGCJH5+HsHAPyOQai6PSMXZj LCl/U8vK37pbZnvC/LBTAHAm5hRp0CaKn7kDV+jTgZbwBSCtZ4PiK1bExyZqc/Ft/pPio DgzjBMv/yoKyQj6uf4JF7muCp82R0y7Zjn0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Pierre Gondois A NameSeg is made 4 chars. Cf. ACPI 6.4 s20.2.2 "Name Objects Encoding": NameSeg :=3D Notice that NameSegs shorter than 4 characters are filled with trailing underscores (=E2=80=98_=E2=80=99s). AML_NAME_SEG_SIZE is currently defined in: - DynamicTablesPkg/Library/Common/AmlLib/AmlDefines.h - MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h Since the value can be inferred from the ACPI specification and to avoid multiple definitions, move it to MdePkg/Include/IndustryStandard/ Signed-off-by: Pierre Gondois Reviewed-by: Liming Gao Reviewed-by: Sami Mujawar --- MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h | 1 - MdePkg/Include/IndustryStandard/AcpiAml.h | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h b/MdeModule= Pkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h index 50d4c96edb63..1b26729e71c3 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h @@ -56,7 +56,6 @@ typedef struct _EFI_AML_NODE_LIST EFI_AML_NODE_LIST; // Size is the total size of this ACPI node buffer. // Children is the children linked list of this node. // -#define AML_NAME_SEG_SIZE 4 =20 struct _EFI_AML_NODE_LIST { UINT32 Signature; diff --git a/MdePkg/Include/IndustryStandard/AcpiAml.h b/MdePkg/Include/Ind= ustryStandard/AcpiAml.h index 74622e912ea4..4255ca3d7087 100644 --- a/MdePkg/Include/IndustryStandard/AcpiAml.h +++ b/MdePkg/Include/IndustryStandard/AcpiAml.h @@ -2,7 +2,7 @@ This file contains AML code definition in the latest ACPI spec. =20 Copyright (c) 2011, Intel Corporation. All rights reserved.
- Copyright (c) 2019, ARM Limited. All rights reserved.
+ Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -176,4 +176,9 @@ #define AML_FIELD_CONNECTION_OP 0x02 #define AML_FIELD_EXT_ACCESS_OP 0x03 =20 +// +// AML Name segment definitions +// +#define AML_NAME_SEG_SIZE 4 + #endif --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75923): https://edk2.groups.io/g/devel/message/75923 Mute This Topic: https://groups.io/mt/83245171/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 15:29:24 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75924+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75924+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1622585108; cv=none; d=zohomail.com; s=zohoarc; b=bj2ha11nqm52tLyzvu5z+Rkn0DUiFOMoPiMDaIMCtx12whfWsRUakaGVxO3zK+jAphlkizt0vGqXzPutH4SeCIPaHTtnZu1ojkBQFKF5EiQP6UQz+cBKJFovCLC6AxxQ+2+DQNdjY7W4UW5FXEi0JDGxWKkLrnFBWNMlw3TALiE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622585108; h=Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=kUQn4lASyYzLVctdryDT2R4208WYyd7AhDndk56QTis=; b=J+tW7Iw7ZKT+ExzWGcjVRS3RD2jFEujQkDTzrkyTJ0rd16q15BQyAfD6d2kDXF0wJ9z3D+jKSaLMep8PzlRritUh4BqRs9zI+drqov1xO8xfuLm5ijRppI8hJK11U7ZHYdT3v0r0TW23ldRIVrjW1qfX7OZR6BI9SwcYqs0E3sM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75924+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622585108010300.1422502715126; Tue, 1 Jun 2021 15:05:08 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Ti3oYY1788612x4dbTWSSoCL; Tue, 01 Jun 2021 15:05:07 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.4822.1622585101849846563 for ; Tue, 01 Jun 2021 15:05:02 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6441B6D; Tue, 1 Jun 2021 15:05:01 -0700 (PDT) X-Received: from e120189.arm.com (unknown [10.57.3.149]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0E14F3F774; Tue, 1 Jun 2021 15:04:59 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io, dandan.bi@intel.com, gaoliming@byosoft.com.cn, michael.d.kinney@intel.com, Sami.Mujawar@arm.com, Alexei.Fedorov@arm.com Subject: [edk2-devel] [PATCH v1 2/2] DynamicTablesPkg: Use AML_NAME_SEG_SIZE define Date: Tue, 1 Jun 2021 23:04:50 +0100 Message-Id: <20210601220450.28003-3-Pierre.Gondois@arm.com> In-Reply-To: <20210601220450.28003-1-Pierre.Gondois@arm.com> References: <20210601220450.28003-1-Pierre.Gondois@arm.com> Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com X-Gm-Message-State: fr7ED2XyW3zlQ2xbtQdmrjKzx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622585107; bh=8TQf5P7vXa0OX3bcPe5MJ9kCmU1PCiHOL5gle7mmWsg=; h=Date:From:Reply-To:Subject:To; b=E52TR9euVCp9F2kVWhE3ldYaioNfUabhLsF6YwKmGDBzCXpc0GmOVzO/lKdJb+zpxnM B23uqL2G6GJTVmrl0pj61EWvot5vI5WQ6pnAEosJc1yDd9x4JwkkRayhkcv+EG4+8kRVZ LDmHDH/c5Vv1WxcQFLsYJGS1NEMsqTYO8M0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Pierre Gondois Use the newly introduced defined value in: MdePkg/Include/IndustryStandard/AcpiAml.h Signed-off-by: Pierre Gondois Reviewed-by: Sami Mujawar --- .../Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c | 4 ++-- .../AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c | 4 ++-- DynamicTablesPkg/Library/Common/AmlLib/AmlDefines.h | 9 +-------- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn= 600Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/Ssd= tCmn600Generator.c index 97a5c55fa3f6..1e8c2bfca5de 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Gene= rator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Gene= rator.c @@ -1,7 +1,7 @@ /** @file SSDT CMN-600 AML Table Generator. =20 - Copyright (c) 2020, Arm Limited. All rights reserved.
+ Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -511,7 +511,7 @@ BuildSsdtCmn600TableEx ( UINT64 Index; CM_ARM_CMN_600_INFO * Cmn600Info; UINT32 Cmn600Count; - CHAR8 NewName[5]; + CHAR8 NewName[AML_NAME_SEG_SIZE + 1]; EFI_ACPI_DESCRIPTION_HEADER ** TableList; =20 ASSERT (This !=3D NULL); diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/Ssd= tSerialPortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPo= rtLibArm/SsdtSerialPortGenerator.c index 6a1e7487dfaf..570f53aacf16 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerial= PortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerial= PortGenerator.c @@ -1,7 +1,7 @@ /** @file SSDT Serial Port Table Generator. =20 - Copyright (c) 2020, Arm Limited. All rights reserved.
+ Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -171,7 +171,7 @@ BuildSsdtSerialPortTableEx ( CM_ARM_SERIAL_PORT_INFO * SerialPortInfo; UINT32 SerialPortCount; UINTN Index; - CHAR8 NewName[5]; + CHAR8 NewName[AML_NAME_SEG_SIZE + 1]; UINT64 Uid; EFI_ACPI_DESCRIPTION_HEADER ** TableList; =20 diff --git a/DynamicTablesPkg/Library/Common/AmlLib/AmlDefines.h b/DynamicT= ablesPkg/Library/Common/AmlLib/AmlDefines.h index cbae14d78802..fff99e644b8d 100644 --- a/DynamicTablesPkg/Library/Common/AmlLib/AmlDefines.h +++ b/DynamicTablesPkg/Library/Common/AmlLib/AmlDefines.h @@ -1,7 +1,7 @@ /** @file AML Defines. =20 - Copyright (c) 2020, Arm Limited. All rights reserved.
+ Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -138,13 +138,6 @@ typedef enum EAmlParseIndex { */ #define AML_FIELD_NAMED_OP 0x04 =20 -/** Size of a NameSeg. - Cf. ACPI 6.3 specification, s20.2. - - @ingroup TreeStructures -*/ - #define AML_NAME_SEG_SIZE 4U - /** AML object types. =20 The ACPI specification defines several object types. They are listed --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75924): https://edk2.groups.io/g/devel/message/75924 Mute This Topic: https://groups.io/mt/83245175/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-