Re: [PATCH V5 06/13] OvmfPkg: Refactor MeaureFvImage

Gerd Hoffmann

On Sat, Jan 28, 2023 at 09:58:35PM +0800, Min Xu wrote:
From: Min M Xu <min.m.xu@...>


MeasureFvImage once was implemented in PeilessStartupLib and it does
measurement and logging for Configuration FV (Cfv) image in one go,
using TpmMeasureAndLogData(). But it doesn't work in SEC.

This patch splits MeasureFvImage into 2 functions and implement them in
- TdxHelperMeasureCfvImage
- TdxHelperBuildGuidHobForTdxMeasurement

TdxHelperMeasureCfvImage measures the Cfv image and stores the hash value
in WorkArea. TdxHelperBuildGuidHobForTdxMeasurement builds GuidHob for the
measurement based on the hash value in WorkArea.

After these 2 functions are introduced, PeilessStartupLib should also be
- Call these 2 functions instead of the MeasureFvImage
- Delete the duplicated codes in PeilessStartupLib
Acked-by: Gerd Hoffmann <kraxel@...>

Join to automatically receive all group messages.