RFC: https://bugzilla.tianocore.org/show_bug.cgi?id=3853 SecMeasurementLib is designed to do the measurement in SEC phase. In current stage there are 2 functions introduced: - MeasureHobList: Measure the Hoblist passed from the VMM. - MeasureFvImage: Measure the FV image. SecMeasurementLibTdx is the TDX version of the library. Cc: Brijesh Singh <brijesh.singh@amd.com> 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: Ken Lu <ken.lu@intel.com> Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com> Signed-off-by: Min Xu <min.m.xu@intel.com>
47 lines
1.1 KiB
C
47 lines
1.1 KiB
C
/** @file
|
|
|
|
Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef SEC_MEASUREMENT_LIB_H_
|
|
#define SEC_MEASUREMENT_LIB_H_
|
|
|
|
/**
|
|
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 Others Other errors as indicated
|
|
**/
|
|
EFI_STATUS
|
|
EFIAPI
|
|
MeasureFvImage (
|
|
IN EFI_PHYSICAL_ADDRESS FvBase,
|
|
IN UINT64 FvLength,
|
|
IN UINT8 PcrIndex
|
|
);
|
|
|
|
#endif
|