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 16269AC1198 for ; Thu, 21 Mar 2024 15:54:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=VR0arzWXapjstNoVK26V2kHfJAlIqj9L04P66JXDsfM=; 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:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711036468; v=1; b=wOxx5qXUcPuzEG3u01d9F4KUpsxbQoByYxsudCu1jvfqSqc2qPuiMTawGi4OrJXr0btnFFYE mS0IRomOvLvkTaiMptT55keVG0p1vmXZwUG6AY0X45E0Af03YHKAxopDVV4gdIC12MjZA4vH8sg H4lLotAitrh+KBbOLyUntoiXqYneort4UJyeD1BsAzwAxYCPF92D6H5FXKzy9OhyAVgf+1eP6q8 2IbKn3Ifk0fj1eWDkYzir8kJ/ptJg+y9PweB+s4LpwDA9/OlRzhHGY1euq2mdPiCH1e8wVp9fse TNtBpxIbEOpM2OpM+S6dIZhQmKyl5tu/rq17OVhLI0gmw== X-Received: by 127.0.0.2 with SMTP id un3yYY7687511xGwR7u6Uv8p; Thu, 21 Mar 2024 08:54:28 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.392.1711036468090563929 for ; Thu, 21 Mar 2024 08:54:28 -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 0C2701007; Thu, 21 Mar 2024 08:55:02 -0700 (PDT) X-Received: from e126645.nice.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id BBE8E3F67D; Thu, 21 Mar 2024 08:54:23 -0700 (PDT) From: "PierreGondois" To: devel@edk2.groups.io Cc: Pierre Gondois , Sami Mujawar , Pierre Gondois , Yeo Reum Yun , Sunil V L , AbdulLateef Attar , Jeshua Smith , Jeff Brasen , Girish Mahadevan , Leif Lindholm , Meenakshi Aggarwal Subject: [edk2-devel] [PATCH 11/16] ArmVirtPkg: Kvmtool: Update ConfigMgr to support ArchCommon Date: Thu, 21 Mar 2024 16:53:14 +0100 Message-Id: <20240321155319.701355-12-pierre.gondois@arm.com> In-Reply-To: <20240321155319.701355-1-pierre.gondois@arm.com> References: <20240321155319.701355-1-pierre.gondois@arm.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 Resent-Date: Thu, 21 Mar 2024 08:54:28 -0700 Reply-To: devel@edk2.groups.io,pierre.gondois@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: HSb5ZKN8NG8MPwlNxQ9Zh05kx7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=wOxx5qXU; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=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 From: Sami Mujawar Update the Configuration Manager for Kvmtool guest firmware to handle ArchComm namespace objects. Cc: Pierre Gondois Cc: Yeo Reum Yun Cc: AbdulLateef Attar Cc: Jeshua Smith Cc: Jeff Brasen Cc: Girish Mahadevan Cc: Leif Lindholm Cc: Meenakshi Aggarwal Signed-off-by: Sami Mujawar Signed-off-by: Pierre Gondois --- .../KvmtoolCfgMgrDxe/ConfigurationManager.c | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c b/ArmVirtPk= g/KvmtoolCfgMgrDxe/ConfigurationManager.c index 68b9d2bf0513..4a76583f969c 100644 --- a/ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c +++ b/ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c @@ -722,6 +722,73 @@ GetStandardNameSpaceObject ( return Status;=0D }=0D =0D +/**=0D + Return an ArchCommon namespace object.=0D +=0D + @param [in] This Pointer to the Configuration Manager Protoc= ol.=0D + @param [in] CmObjectId The Configuration Manager Object ID.=0D + @param [in] Token An optional token identifying the object. I= f=0D + unused this must be CM_NULL_TOKEN.=0D + @param [in, out] CmObject Pointer to the Configuration Manager Object= =0D + descriptor describing the requested Object.= =0D +=0D + @retval EFI_SUCCESS Success.=0D + @retval EFI_INVALID_PARAMETER A parameter is invalid.=0D + @retval EFI_NOT_FOUND The required object information is not fou= nd.=0D +**/=0D +EFI_STATUS=0D +EFIAPI=0D +GetArchCommonNameSpaceObject (=0D + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL *CONST This,=0D + IN CONST CM_OBJECT_ID CmObjectId,=0D + IN CONST CM_OBJECT_TOKEN Token OPTIONAL,= =0D + IN OUT CM_OBJ_DESCRIPTOR *CONST CmObject=0D + )=0D +{=0D + EFI_STATUS Status;=0D + EDKII_PLATFORM_REPOSITORY_INFO *PlatformRepo;=0D +=0D + if ((This =3D=3D NULL) || (CmObject =3D=3D NULL)) {=0D + ASSERT (This !=3D NULL);=0D + ASSERT (CmObject !=3D NULL);=0D + return EFI_INVALID_PARAMETER;=0D + }=0D +=0D + Status =3D EFI_NOT_FOUND;=0D + PlatformRepo =3D This->PlatRepoInfo;=0D +=0D + //=0D + // First check among the static objects.=0D + //=0D + switch (GET_CM_OBJECT_ID (CmObjectId)) {=0D + default:=0D + //=0D + // No match found among the static objects.=0D + // Check the dynamic objects.=0D + //=0D + Status =3D DynamicPlatRepoGetObject (=0D + PlatformRepo->DynamicPlatformRepo,=0D + CmObjectId,=0D + Token,=0D + CmObject=0D + );=0D + break;=0D + } // switch=0D +=0D + if (Status =3D=3D EFI_NOT_FOUND) {=0D + DEBUG ((=0D + DEBUG_INFO,=0D + "INFO: CmObjectId " FMT_CM_OBJECT_ID ". Status =3D %r\n",=0D + CmObjectId,=0D + Status=0D + ));=0D + } else {=0D + ASSERT_EFI_ERROR (Status);=0D + }=0D +=0D + return Status;=0D +}=0D +=0D /**=0D Return an ARM namespace object.=0D =0D @@ -929,6 +996,9 @@ ArmKvmtoolPlatformGetObject ( case EObjNameSpaceStandard:=0D Status =3D GetStandardNameSpaceObject (This, CmObjectId, Token, CmOb= ject);=0D break;=0D + case EObjNameSpaceArchCommon:=0D + Status =3D GetArchCommonNameSpaceObject (This, CmObjectId, Token, Cm= Object);=0D + break;=0D case EObjNameSpaceArm:=0D Status =3D GetArmNameSpaceObject (This, CmObjectId, Token, CmObject)= ;=0D break;=0D --=20 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] -=-=-=-=-=-=-=-=-=-=-=-