From 6395c642ae74ee14a8aa513f83bae41645a1f846 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Mon, 15 Dec 2014 09:36:46 +0000 Subject: 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 Reviewed-by: Star Zeng Reviewed-by: Guo Dong 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'MdeModulePkg/Core/Pei') 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. // -- cgit v1.2.3