public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Gao, Liming" <liming.gao@intel.com>
To: Marcin Wojtas <mw@semihalf.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Tian, Feng" <feng.tian@intel.com>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
	"ard.biesheuvel@linaro.org" <ard.biesheuvel@linaro.org>,
	"jsd@semihalf.com" <jsd@semihalf.com>
Subject: Re: [PATCH] MdeModulePkg PeiCore: Check error status when processing boot FV
Date: Fri, 1 Jun 2018 14:35:22 +0000	[thread overview]
Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E291B6D@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1527861493-17332-1-git-send-email-mw@semihalf.com>

I agree to add this checker. 

Reviewed-by: Liming Gao <liming.gao@intel.com>

> -----Original Message-----
> From: Marcin Wojtas [mailto:mw@semihalf.com]
> Sent: Friday, June 1, 2018 9:58 PM
> To: edk2-devel@lists.01.org
> Cc: Tian, Feng <feng.tian@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <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
> 
> 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



      parent reply	other threads:[~2018-06-01 14:35 UTC|newest]

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

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=4A89E2EF3DFEDB4C8BFDE51014F606A14E291B6D@SHSMSX104.ccr.corp.intel.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