From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io
Cc: Pierre Gondois <pierre.gondois@arm.com>,
Sami Mujawar <sami.mujawar@arm.com>,
Pierre Gondois <Pierre.Gondois@arm.com>,
Yeo Reum Yun <YeoReum.Yun@arm.com>,
Sunil V L <sunilvl@ventanamicro.com>,
AbdulLateef Attar <AbdulLateef.Attar@amd.com>,
Jeshua Smith <jeshuas@nvidia.com>,
Jeff Brasen <jbrasen@nvidia.com>,
Girish Mahadevan <gmahadevan@nvidia.com>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Subject: [edk2-devel] [PATCH 11/16] ArmVirtPkg: Kvmtool: Update ConfigMgr to support ArchCommon
Date: Thu, 21 Mar 2024 16:53:14 +0100 [thread overview]
Message-ID: <20240321155319.701355-12-pierre.gondois@arm.com> (raw)
In-Reply-To: <20240321155319.701355-1-pierre.gondois@arm.com>
From: Sami Mujawar <sami.mujawar@arm.com>
Update the Configuration Manager for Kvmtool guest firmware
to handle ArchComm namespace objects.
Cc: Pierre Gondois <Pierre.Gondois@arm.com>
Cc: Yeo Reum Yun <YeoReum.Yun@arm.com>
Cc: AbdulLateef Attar <AbdulLateef.Attar@amd.com>
Cc: Jeshua Smith <jeshuas@nvidia.com>
Cc: Jeff Brasen <jbrasen@nvidia.com>
Cc: Girish Mahadevan <gmahadevan@nvidia.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <pierre.gondois@arm.com>
---
.../KvmtoolCfgMgrDxe/ConfigurationManager.c | 70 +++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c b/ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c
index 68b9d2bf0513..4a76583f969c 100644
--- a/ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c
+++ b/ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c
@@ -722,6 +722,73 @@ GetStandardNameSpaceObject (
return Status;
}
+/**
+ Return an ArchCommon namespace object.
+
+ @param [in] This Pointer to the Configuration Manager Protocol.
+ @param [in] CmObjectId The Configuration Manager Object ID.
+ @param [in] Token An optional token identifying the object. If
+ unused this must be CM_NULL_TOKEN.
+ @param [in, out] CmObject Pointer to the Configuration Manager Object
+ descriptor describing the requested Object.
+
+ @retval EFI_SUCCESS Success.
+ @retval EFI_INVALID_PARAMETER A parameter is invalid.
+ @retval EFI_NOT_FOUND The required object information is not found.
+**/
+EFI_STATUS
+EFIAPI
+GetArchCommonNameSpaceObject (
+ IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This,
+ IN CONST CM_OBJECT_ID CmObjectId,
+ IN CONST CM_OBJECT_TOKEN Token OPTIONAL,
+ IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject
+ )
+{
+ EFI_STATUS Status;
+ EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;
+
+ if ((This == NULL) || (CmObject == NULL)) {
+ ASSERT (This != NULL);
+ ASSERT (CmObject != NULL);
+ return EFI_INVALID_PARAMETER;
+ }
+
+ Status = EFI_NOT_FOUND;
+ PlatformRepo = This->PlatRepoInfo;
+
+ //
+ // First check among the static objects.
+ //
+ switch (GET_CM_OBJECT_ID (CmObjectId)) {
+ default:
+ //
+ // No match found among the static objects.
+ // Check the dynamic objects.
+ //
+ Status = DynamicPlatRepoGetObject (
+ PlatformRepo->DynamicPlatformRepo,
+ CmObjectId,
+ Token,
+ CmObject
+ );
+ break;
+ } // switch
+
+ if (Status == EFI_NOT_FOUND) {
+ DEBUG ((
+ DEBUG_INFO,
+ "INFO: CmObjectId " FMT_CM_OBJECT_ID ". Status = %r\n",
+ CmObjectId,
+ Status
+ ));
+ } else {
+ ASSERT_EFI_ERROR (Status);
+ }
+
+ return Status;
+}
+
/**
Return an ARM namespace object.
@@ -929,6 +996,9 @@ ArmKvmtoolPlatformGetObject (
case EObjNameSpaceStandard:
Status = GetStandardNameSpaceObject (This, CmObjectId, Token, CmObject);
break;
+ case EObjNameSpaceArchCommon:
+ Status = GetArchCommonNameSpaceObject (This, CmObjectId, Token, CmObject);
+ break;
case EObjNameSpaceArm:
Status = GetArmNameSpaceObject (This, CmObjectId, Token, CmObject);
break;
--
2.25.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#116972): https://edk2.groups.io/g/devel/message/116972
Mute This Topic: https://groups.io/mt/105067984/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2024-03-21 15:54 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-21 15:53 [edk2-devel] [PATCH 00/16] DynamicTablesPkg: Move objects to Arch Common NameSpace (first) PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 01/16] DynamicTablesPkg/SsdtCpuTopology: Update function's parameter description PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 02/16] DynamicTablesPkg: Replace ProcNodeIdInfo with EArmObjReserved29 PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 03/16] DynamicTablesPkg: Introduce ObjectId to validate CmObject Parser Array PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 04/16] DynamicTablesPkg: Introduce an Arch Common Namespace header file PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 05/16] DynamicTablesPkg: Add support for ArchCommon objects in CmObjParser PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 06/16] DynamicTablesPkg: TokenFixer: Return Non Arm NS objs as unsupported PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 07/16] DynamicTablesPkg: Update DynamicPlatRepo for Arch Common namespace PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 08/16] DynamicTablesPkg: Update documentation for CM_OBJECT_ID PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 09/16] DynamicTablesPkg: Drop Cpu Info object ID from Arm Namespace PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 10/16] DynamicTablesPkg: Drop Reserved29 " PierreGondois
2024-03-21 15:53 ` PierreGondois [this message]
2024-03-21 15:53 ` [edk2-devel] [PATCH 12/16] DynamicTablesPkg & ArmVirtPkg: Move Power Mgmt Profile Info Object PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 13/16] DynamicTablesPkg: Move Hypervisor Vendor Id to Arch Common PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 14/16] DynamicTablesPkg: Move FADT Fixed Features Flags " PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 15/16] DynamicTablesPkg: Move Cm Reference object " PierreGondois
2024-03-21 15:53 ` [edk2-devel] [PATCH 16/16] DynamicTablesPkg & ArmVirtPkg: Move Pci Config Space Info PierreGondois
2024-04-04 10:02 ` [edk2-devel] [PATCH 00/16] DynamicTablesPkg: Move objects to Arch Common NameSpace (first) Sunil V L
2024-06-07 14:19 ` 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=20240321155319.701355-12-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