]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePke: PeiCore FirmwareVolmeInfoPpiNotifyCallback ()issue
authorLiming Gao <liming.gao@intel.com>
Mon, 15 Dec 2014 09:36:46 +0000 (09:36 +0000)
committerlgao4 <lgao4@Edk2>
Mon, 15 Dec 2014 09:36:46 +0000 (09:36 +0000)
PeiCore FirmwareVolmeInfoPpiNotifyCallback() should check FvCount when new one is added.
Now, this check is the entry of Notify function that is too early, because PeiCore will
install FvInfo and FvInfo2 both for one sub FV image and trig FvNotify function twice for the same FV images.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Guo Dong <guo.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16520 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Core/Pei/FwVol/FwVol.c

index 357f0979e27d5df8be33cd0368f4ee2fb7e5874f..22098c9c3e9e77c05de6734c2525e278fd7be422 100644 (file)
@@ -530,12 +530,6 @@ FirmwareVolmeInfoPpiNotifyCallback (
   Status       = EFI_SUCCESS;\r
   PrivateData  = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);\r
 \r
-  if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
-    DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported)));\r
-    DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));\r
-    ASSERT (FALSE);\r
-  }\r
-\r
   if (CompareGuid (NotifyDescriptor->Guid, &gEfiPeiFirmwareVolumeInfo2PpiGuid)) {\r
     //\r
     // It is FvInfo2PPI.\r
@@ -584,6 +578,12 @@ FirmwareVolmeInfoPpiNotifyCallback (
       }\r
     }\r
 \r
+    if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {\r
+      DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported)));\r
+      DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));\r
+      ASSERT (FALSE);\r
+    }\r
+\r
     //\r
     // Update internal PEI_CORE_FV array.\r
     //\r