public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sunil V L" <sunilvl@ventanamicro.com>
To: devel@edk2.groups.io
Cc: Sunil V L <sunilvl@ventanamicro.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Leif Lindholm <quic_llindhol@quicinc.com>,
	Pierre Gondois <pierre.gondois@arm.com>,
	Sami Mujawar <Sami.Mujawar@arm.com>
Subject: [edk2-devel] [RFC PATCH v1 12/20] DynamicTablesPkg: Add CreatorId in CM_STD_OBJ_CONFIGURATION_MANAGER_INFO
Date: Tue,  9 Jan 2024 21:59:36 +0530	[thread overview]
Message-ID: <20240109162944.528006-13-sunilvl@ventanamicro.com> (raw)
In-Reply-To: <20240109162944.528006-1-sunilvl@ventanamicro.com>

To support multiple CPU architectures and platforms, it is better to
have the flexibility for the platforms to define their Creator ID in the
ACPI tables. So, add a new field in the structure and use it while
creating the ACPI tables instead of default ARM.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
 DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h          | 1 +
 DynamicTablesPkg/Include/StandardNameSpaceObjects.h       | 1 +
 .../Library/Common/AmlLib/CodeGen/AmlCodeGen.c            | 3 ++-
 .../Library/Common/TableHelperLib/TableHelper.c           | 8 +++++++-
 4 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
index 043ec3d8428f..dc1fab534030 100644
--- a/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
+++ b/DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
@@ -1061,6 +1061,7 @@ AmlCodeGenDefinitionBlock (
   IN  CONST CHAR8                 *OemId,
   IN  CONST CHAR8                 *OemTableId,
   IN        UINT32                OemRevision,
+  IN  CONST CHAR8                 *CreatorId,
   OUT       AML_ROOT_NODE_HANDLE  *NewRootNode
   );
 
diff --git a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
index 8ec3238225ab..d894b9cbb6f9 100644
--- a/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
+++ b/DynamicTablesPkg/Include/StandardNameSpaceObjects.h
@@ -60,6 +60,7 @@ typedef struct CmStdObjConfigurationManagerInfo {
       populate the ACPI table header information.
   */
   UINT8     OemId[6];
+  UINT8     CreatorId[4];
 } CM_STD_OBJ_CONFIGURATION_MANAGER_INFO;
 
 /** A structure used to describe the ACPI table generators to be invoked.
diff --git a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
index d4e3e252cbe6..e1d72ec9444e 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlCodeGen.c
@@ -95,6 +95,7 @@ AmlCodeGenDefinitionBlock (
   IN  CONST CHAR8          *OemId,
   IN  CONST CHAR8          *OemTableId,
   IN        UINT32         OemRevision,
+  IN  CONST CHAR8          *CreatorId,
   OUT       AML_ROOT_NODE  **NewRootNode
   )
 {
@@ -115,8 +116,8 @@ AmlCodeGenDefinitionBlock (
   AcpiHeader.Revision = 2;
   CopyMem (&AcpiHeader.OemId, OemId, 6);
   CopyMem (&AcpiHeader.OemTableId, OemTableId, 8);
+  CopyMem (&AcpiHeader.CreatorId, CreatorId, 4);
   AcpiHeader.OemRevision     = OemRevision;
-  AcpiHeader.CreatorId       = TABLE_GENERATOR_CREATOR_ID_ARM;
   AcpiHeader.CreatorRevision = CREATE_REVISION (1, 0);
 
   Status = AmlCreateRootNode (&AcpiHeader, NewRootNode);
diff --git a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
index 219f94e0dbcc..a2ad480b9b3b 100644
--- a/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
+++ b/DynamicTablesPkg/Library/Common/TableHelperLib/TableHelper.c
@@ -180,7 +180,12 @@ AddAcpiHeader (
   }
 
   // UINT32  CreatorId
-  AcpiHeader->CreatorId = Generator->CreatorId;
+  AcpiHeader->CreatorId = SIGNATURE_32 (
+                            CfgMfrInfo->CreatorId[0],
+                            CfgMfrInfo->CreatorId[1],
+                            CfgMfrInfo->CreatorId[2],
+                            CfgMfrInfo->CreatorId[3]
+                            );
   // UINT32  CreatorRevision
   AcpiHeader->CreatorRevision = Generator->CreatorRevision;
 
@@ -270,6 +275,7 @@ AddSsdtAcpiHeader (
              (CONST CHAR8 *)&CfgMfrInfo->OemId,
              (CONST CHAR8 *)&OemTableId,
              OemRevision,
+             (CONST CHAR8 *)&CfgMfrInfo->CreatorId,
              RootNode
              );
   ASSERT_EFI_ERROR (Status);
-- 
2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113474): https://edk2.groups.io/g/devel/message/113474
Mute This Topic: https://groups.io/mt/103622728/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  parent reply	other threads:[~2024-01-09 16:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09 16:29 [edk2-devel] [RFC PATCH v1 00/20] DynamicTablesPkg: Prepare to add RISC-V support Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 01/20] DynamicTablesPkg: FdtHwInfoParserLib: Move ARM parsers to Arm directory Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 02/20] DynamicTablesPkg: Move common ACPI libraries from folder Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 03/20] DynamicTablesPkg: Update ACPI common libraries BASE_NAME Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 04/20] DynamicTablesPkg: Rename ArmNameSpaceObjects to ArchNameSpaceObjects Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 05/20] DynamicTablesPkg: DynamicPlatRepoLib: Rename ArmObjList as ArchObjList Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 06/20] DynamicTablesPkg: Rename EObjNameSpaceArm to EObjNameSpaceArch Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 07/20] DynamicTablesPkg: FdtHwInfoParserLib: Separate ARM specific code Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 08/20] DynamicTablesPkg: FdtHwInfoParserLib: Pci: Make it common for architectures Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 09/20] DynamicTablesPkg: FdtHwInfoParserLib: Make Serial parser arch neutral Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 10/20] DynamicTablesPkg: FdtHwInfoParserLib: Move ArmLib.h to ArmGicCParser.c Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 11/20] DynamicTablesPkg: TableHelperLib: Populate OemTableId using ConfigManager Sunil V L
2024-01-09 16:29 ` Sunil V L [this message]
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 13/20] DynamicTablesPkg: FdtHwInfoParserLib: Move ARM utilities to separate file Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 14/20] DynamicTablesPkg/FdtHwInfoParserLib: Add function for INTC address cells Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 15/20] DynamicTablesPkg: AcpiSsdtCpuTopologyLib: Move GICC from common code Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 16/20] DynamicTablesPkg: AcpiFadtLib: Move ArmBootArch to ARM specific file Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 17/20] DynamicTablesPkg: DynamicTableManagerDxe: Refactor to allow other archs Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 18/20] DynamicTablesPkg: X86: Add interfaces to succeed CI tests Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 19/20] DynamicTablesPkg/AmlLib: Fix typo Sunil V L
2024-01-09 16:29 ` [edk2-devel] [RFC PATCH v1 20/20] DynamicTablesPkg.ci.yaml: Update exception and ignore list Sunil V L
2024-01-09 18:37 ` [edk2-devel] [RFC PATCH v1 00/20] DynamicTablesPkg: Prepare to add RISC-V support Jeshua Smith via groups.io
2024-01-10  4:20   ` Sunil V L
2024-01-10 21:56     ` Jeshua Smith via groups.io
2024-01-22 17:15       ` Sami Mujawar
2024-01-23  7:01         ` Sunil V L

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=20240109162944.528006-13-sunilvl@ventanamicro.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