X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=SecurityPkg%2FTcg%2FTrEEPei%2FTrEEPei.c;h=8e2bc748ff41b2b94a0bc3037994cf438a01b75f;hb=b5412eac9eaccaed53ab32f6c3dd016e71f44a0e;hp=001a45b3100fb525e449633c3e840cc04a7f7584;hpb=387208ab04f54edb75c0853cf1ba1443bd796347;p=mirror_edk2.git diff --git a/SecurityPkg/Tcg/TrEEPei/TrEEPei.c b/SecurityPkg/Tcg/TrEEPei/TrEEPei.c index 001a45b310..8e2bc748ff 100644 --- a/SecurityPkg/Tcg/TrEEPei/TrEEPei.c +++ b/SecurityPkg/Tcg/TrEEPei/TrEEPei.c @@ -39,6 +39,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include #define PERF_ID_TREE_PEI 0x3080 @@ -63,10 +64,10 @@ EFI_PEI_PPI_DESCRIPTOR mTpmInitializedPpiList = { NULL }; -EFI_PLATFORM_FIRMWARE_BLOB mMeasuredBaseFvInfo[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)]; +EFI_PLATFORM_FIRMWARE_BLOB *mMeasuredBaseFvInfo; UINT32 mMeasuredBaseFvIndex = 0; -EFI_PLATFORM_FIRMWARE_BLOB mMeasuredChildFvInfo[FixedPcdGet32 (PcdPeiCoreMaxFvSupported)]; +EFI_PLATFORM_FIRMWARE_BLOB *mMeasuredChildFvInfo; UINT32 mMeasuredChildFvIndex = 0; /** @@ -592,6 +593,11 @@ PeimEntryMP ( ); // Do not check status, because it is optional + mMeasuredBaseFvInfo = (EFI_PLATFORM_FIRMWARE_BLOB *) AllocateZeroPool (sizeof (EFI_PLATFORM_FIRMWARE_BLOB) * PcdGet32 (PcdPeiCoreMaxFvSupported)); + ASSERT (mMeasuredBaseFvInfo != NULL); + mMeasuredChildFvInfo = (EFI_PLATFORM_FIRMWARE_BLOB *) AllocateZeroPool (sizeof (EFI_PLATFORM_FIRMWARE_BLOB) * PcdGet32 (PcdPeiCoreMaxFvSupported)); + ASSERT (mMeasuredChildFvInfo != NULL); + if (PcdGet8 (PcdTpm2ScrtmPolicy) == 1) { Status = MeasureCRTMVersion (); ASSERT_EFI_ERROR (Status);