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. //