mirror of https://github.com/acidanthera/audk.git
ArmVirtPkg: Kvmtool: Update ConfigMgr to support ArchCommon
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> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
parent
58c36ce09f
commit
6dad45b7dd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue