public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
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: [PATCH v1 2/2] DynamicTablesPkg: Use AML_NAME_SEG_SIZE define
Date: Tue,  1 Jun 2021 23:04:50 +0100	[thread overview]
Message-ID: <20210601220450.28003-3-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20210601220450.28003-1-Pierre.Gondois@arm.com>

From: Pierre Gondois <Pierre.Gondois@arm.com>

Use the newly introduced defined value in:
MdePkg/Include/IndustryStandard/AcpiAml.h

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
---
 .../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/SsdtCmn600Generator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
index 97a5c55fa3f6..1e8c2bfca5de 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
@@ -1,7 +1,7 @@
 /** @file
   SSDT CMN-600 AML Table Generator.
 
-  Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
+  Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -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;
 
   ASSERT (This != NULL);
diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
index 6a1e7487dfaf..570f53aacf16 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtSerialPortLibArm/SsdtSerialPortGenerator.c
@@ -1,7 +1,7 @@
 /** @file
   SSDT Serial Port Table Generator.
 
-  Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
+  Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.<BR>
 
   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;
 
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/AmlDefines.h b/DynamicTablesPkg/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.
 
-  Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
+  Copyright (c) 2020 - 2021, Arm Limited. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
@@ -138,13 +138,6 @@ typedef enum EAmlParseIndex {
 */
 #define AML_FIELD_NAMED_OP            0x04
 
-/** Size of a NameSeg.
-    Cf. ACPI 6.3 specification, s20.2.
-
-  @ingroup TreeStructures
-*/
- #define AML_NAME_SEG_SIZE            4U
-
 /** AML object types.
 
   The ACPI specification defines several object types. They are listed
-- 
2.17.1


  parent reply	other threads:[~2021-06-01 22:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 22:04 [PATCH v1 0/2] Define AML_NAME_SEG_SIZE PierreGondois
2021-06-01 22:04 ` [PATCH v1 1/2] MdePkg/MdeModulePkg: Move AML_NAME_SEG_SIZE definition PierreGondois
2021-06-02  2:28   ` 回复: " gaoliming
2021-06-01 22:04 ` PierreGondois [this message]
2021-06-02  6:13 ` [edk2-devel] [PATCH v1 0/2] Define AML_NAME_SEG_SIZE Zeng, Star
2021-06-02  8:33 ` Sami Mujawar
2021-06-02 11:30 ` Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210601220450.28003-3-Pierre.Gondois@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox