public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Marcin Wojtas <mw@semihalf.com>
To: edk2-devel@lists.01.org
Cc: feng.tian@intel.com, michael.d.kinney@intel.com,
	liming.gao@intel.com, leif.lindholm@linaro.org,
	ard.biesheuvel@linaro.org, jsd@semihalf.com,
	Marcin Wojtas <mw@semihalf.com>
Subject: [PATCH] MdeModulePkg PeiCore: Check error status when processing boot FV
Date: Fri,  1 Jun 2018 15:58:13 +0200	[thread overview]
Message-ID: <1527861493-17332-1-git-send-email-mw@semihalf.com> (raw)

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>
---
 MdeModulePkg/Core/Pei/FwVol/FwVol.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
index 8009546..4150b33 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.
-- 
2.7.4



             reply	other threads:[~2018-06-01 13:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 13:58 Marcin Wojtas [this message]
2018-06-01 14:00 ` [PATCH] MdeModulePkg PeiCore: Check error status when processing boot FV Ard Biesheuvel
2018-06-04  5:30   ` Zeng, Star
2018-06-01 14:35 ` Gao, Liming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1527861493-17332-1-git-send-email-mw@semihalf.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox