From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id BF3EC74003A for ; Tue, 9 Jan 2024 16:30:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=HP/fSITxKCgvtq41dOTH9TlOBK/dZH/oxROtI+c2CCc=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1704817832; v=1; b=osskmsZHbczo0XD6RHUyQif8yRooUavyxfKpjXcSSdDiuh3sA9SuWhtWgmkYy9ldCXLUKpM0 OTMseyQV2EdDMzSEs3ILT15ixgQ3q8YK89QErQyimd/Zf3zf96p22iJ+spzj5a6h7rBJ5zQRLXZ eQuy6YSI1MjZLSw8uaVQ0CCc= X-Received: by 127.0.0.2 with SMTP id 8hfaYY7687511xMTRWCYKDYP; Tue, 09 Jan 2024 08:30:32 -0800 X-Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web11.21057.1704817832021965287 for ; Tue, 09 Jan 2024 08:30:32 -0800 X-Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1d3f8af8297so14242735ad.2 for ; Tue, 09 Jan 2024 08:30:31 -0800 (PST) X-Gm-Message-State: DX5BFSu7vZUJaRVbxfTlWxhtx7686176AA= X-Google-Smtp-Source: AGHT+IHSlYEuPQfpUO/vCRhVq5SdEJVylwahTDsp2XkXXT8DkijkEz/N7UusLC5+H65O0xtkCVnMjQ== X-Received: by 2002:a17:903:11c5:b0:1d4:6a34:b441 with SMTP id q5-20020a17090311c500b001d46a34b441mr3692009plh.112.1704817831088; Tue, 09 Jan 2024 08:30:31 -0800 (PST) X-Received: from localhost.localdomain ([106.51.188.200]) by smtp.gmail.com with ESMTPSA id c12-20020a170902b68c00b001d457090851sm1983596pls.289.2024.01.09.08.30.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 08:30:30 -0800 (PST) From: "Sunil V L" To: devel@edk2.groups.io Cc: Sunil V L , Ard Biesheuvel , Leif Lindholm , Pierre Gondois , Sami Mujawar 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 Message-Id: <20240109162944.528006-13-sunilvl@ventanamicro.com> In-Reply-To: <20240109162944.528006-1-sunilvl@ventanamicro.com> References: <20240109162944.528006-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk 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,sunilvl@ventanamicro.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=osskmsZH; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io 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 Cc: Leif Lindholm Cc: Pierre Gondois Cc: Sami Mujawar Signed-off-by: Sunil V L --- 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] -=-=-=-=-=-=-=-=-=-=-=-