]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SecurityPkg/Tcg/TcgPei/TcgPei.c
MdeModulePkg/SecurityPkg: Update TreePei to handle FvInfo2 and update FwVol of PeiCor...
[mirror_edk2.git] / SecurityPkg / Tcg / TcgPei / TcgPei.c
index f3f4b3f4c0eeb89d793020e830c78ea1412d188e..f2650a20f3791847895e91755194d06e3b85c025 100644 (file)
@@ -461,6 +461,7 @@ FirmwareVolmeInfoPpiNotifyCallback (
   EFI_PEI_FIRMWARE_VOLUME_INFO_PPI  *Fv;\r
   EFI_STATUS                        Status;\r
   EFI_PEI_FIRMWARE_VOLUME_PPI       *FvPpi;\r
+  UINTN                             Index;\r
 \r
   Fv = (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *) Ppi;\r
 \r
@@ -485,6 +486,14 @@ FirmwareVolmeInfoPpiNotifyCallback (
     \r
     ASSERT (mMeasuredChildFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported));\r
     if (mMeasuredChildFvIndex < FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
+      //\r
+      // Check whether FV is in the measured child FV list.\r
+      //\r
+      for (Index = 0; Index < mMeasuredChildFvIndex; Index++) {\r
+        if (mMeasuredChildFvInfo[Index].BlobBase == (EFI_PHYSICAL_ADDRESS) (UINTN) Fv->FvInfo) {\r
+          return EFI_SUCCESS;\r
+        }\r
+      }\r
       mMeasuredChildFvInfo[mMeasuredChildFvIndex].BlobBase   = (EFI_PHYSICAL_ADDRESS) (UINTN) Fv->FvInfo;\r
       mMeasuredChildFvInfo[mMeasuredChildFvIndex].BlobLength = Fv->FvInfoSize;\r
       mMeasuredChildFvIndex++;\r