From: Marcin Wojtas Date: Fri, 1 Jun 2018 13:58:13 +0000 (+0800) Subject: MdeModulePkg PeiCore: Check error status when processing boot FV X-Git-Tag: edk2-stable201903~1650 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=38c977c148e92e2af17c5d346d9b4b2e7a18680a MdeModulePkg PeiCore: Check error status when processing boot FV Until now the possible errors returned from processing boot firmware volume were not checked, which could cause misbehavior in further booting stages. Add relevant assert. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marcin Wojtas Signed-off-by: Jan Dabros Reviewed-by: Liming Gao Reviewed-by: Star Zeng --- diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 8009546acd..4150b338b2 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -495,12 +495,13 @@ PeiInitializeFv ( // // Get handle of BFV // - FvPpi->ProcessVolume ( - FvPpi, - SecCoreData->BootFirmwareVolumeBase, - (UINTN)BfvHeader->FvLength, - &FvHandle - ); + Status = FvPpi->ProcessVolume ( + FvPpi, + SecCoreData->BootFirmwareVolumeBase, + (UINTN)BfvHeader->FvLength, + &FvHandle + ); + ASSERT_EFI_ERROR (Status); // // Update internal PEI_CORE_FV array.