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
This commit is contained in:
Liming Gao 2014-12-15 09:36:46 +00:00 committed by lgao4
parent 84b8497338
commit 6395c642ae
1 changed files with 6 additions and 6 deletions

View File

@ -530,12 +530,6 @@ FirmwareVolmeInfoPpiNotifyCallback (
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices); 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)) { if (CompareGuid (NotifyDescriptor->Guid, &gEfiPeiFirmwareVolumeInfo2PpiGuid)) {
// //
// It is FvInfo2PPI. // 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. // Update internal PEI_CORE_FV array.
// //