summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core/Pei/FwVol/FwVol.c
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2014-12-15 09:36:46 +0000
committerlgao4 <lgao4@Edk2>2014-12-15 09:36:46 +0000
commit6395c642ae74ee14a8aa513f83bae41645a1f846 (patch)
tree845eaeaedf07867f94904f04a0355925b601cbeb /MdeModulePkg/Core/Pei/FwVol/FwVol.c
parent84b8497338c2242a92c10de801d12ab389573807 (diff)
downloadedk2-platforms-6395c642ae74ee14a8aa513f83bae41645a1f846.tar.xz
MdeModulePke: PeiCore FirmwareVolmeInfoPpiNotifyCallback ()issue
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
Diffstat (limited to 'MdeModulePkg/Core/Pei/FwVol/FwVol.c')
-rw-r--r--MdeModulePkg/Core/Pei/FwVol/FwVol.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
index 357f0979e2..22098c9c3e 100644
--- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
@@ -530,12 +530,6 @@ FirmwareVolmeInfoPpiNotifyCallback (
Status = EFI_SUCCESS;
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices);
- if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {
- DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported)));
- DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));
- ASSERT (FALSE);
- }
-
if (CompareGuid (NotifyDescriptor->Guid, &gEfiPeiFirmwareVolumeInfo2PpiGuid)) {
//
// It is FvInfo2PPI.
@@ -584,6 +578,12 @@ FirmwareVolmeInfoPpiNotifyCallback (
}
}
+ if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) {
+ DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported)));
+ DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC"));
+ ASSERT (FALSE);
+ }
+
//
// Update internal PEI_CORE_FV array.
//