MdeModulePkg PeiCore: Check error status when processing boot FV
authorMarcin Wojtas <mw@semihalf.com>
Fri, 1 Jun 2018 13:58:13 +0000 (21:58 +0800)
committerStar Zeng <star.zeng@intel.com>
Mon, 4 Jun 2018 05:27:55 +0000 (13:27 +0800)
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 <mw@semihalf.com>
Signed-off-by: Jan Dabros <jsd@semihalf.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
MdeModulePkg/Core/Pei/FwVol/FwVol.c

index 8009546..4150b33 100644 (file)
@@ -495,12 +495,13 @@ PeiInitializeFv (
   //\r
   // Get handle of BFV\r
   //\r
-  FvPpi->ProcessVolume (\r
-           FvPpi, \r
-           SecCoreData->BootFirmwareVolumeBase,\r
-           (UINTN)BfvHeader->FvLength,\r
-           &FvHandle\r
-           );\r
+  Status = FvPpi->ProcessVolume (\r
+                    FvPpi,\r
+                    SecCoreData->BootFirmwareVolumeBase,\r
+                    (UINTN)BfvHeader->FvLength,\r
+                    &FvHandle\r
+                    );\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
   // Update internal PEI_CORE_FV array.\r