OvmfPkg: Implement MeasureHobList/MeasureFvImage
MeasureHobList and MeasureFvImage once were implemented in SecMeasurementTdxLib. The intention of this patch-set is to refactor SecMeasurementTdxLib to be an instance of TpmMeasurementLib. So these 2 functions (MeasureHobList/MeasureFvImage) are moved to PeilessStartupLib. This is because: 1. RTMR based trusted boot is implemented in Config-B (See below link) 2. PeilessStartupLib is designed for PEI-less boot and it is the right place to do the measurement for Hoblist and Config-FV. Config-B: https://edk2.groups.io/g/devel/message/76367 Cc: Erdem Aktas <erdemaktas@google.com> Cc: James Bottomley <jejb@linux.ibm.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
@@ -69,4 +69,40 @@ TdxValidateCfv (
|
||||
IN UINT32 TdxCfvSize
|
||||
);
|
||||
|
||||
/**
|
||||
Measure the Hoblist passed from the VMM.
|
||||
|
||||
@param[in] VmmHobList The Hoblist pass the firmware
|
||||
|
||||
@retval EFI_SUCCESS Fv image is measured successfully
|
||||
or it has been already measured.
|
||||
@retval Others Other errors as indicated
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
MeasureHobList (
|
||||
IN CONST VOID *VmmHobList
|
||||
);
|
||||
|
||||
/**
|
||||
Measure FV image.
|
||||
|
||||
@param[in] FvBase Base address of FV image.
|
||||
@param[in] FvLength Length of FV image.
|
||||
@param[in] PcrIndex Index of PCR
|
||||
|
||||
@retval EFI_SUCCESS Fv image is measured successfully
|
||||
or it has been already measured.
|
||||
@retval EFI_OUT_OF_RESOURCES No enough memory to log the new event.
|
||||
@retval EFI_DEVICE_ERROR The command was unsuccessful.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
MeasureFvImage (
|
||||
IN EFI_PHYSICAL_ADDRESS FvBase,
|
||||
IN UINT64 FvLength,
|
||||
IN UINT8 PcrIndex
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user