public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: "Dong, Eric" <eric.dong@intel.com>,
	"Chiu, Chasel" <chasel.chiu@intel.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: Laszlo Ersek <lersek@redhat.com>
Subject: Re: [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
Date: Thu, 5 Sep 2019 06:46:11 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C2C4587@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <ED077930C258884BBCB450DB737E662259EDF873@shsmsx102.ccr.corp.intel.com>

Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Dong, Eric
> Sent: Wednesday, September 4, 2019 11:15 PM
> To: Chiu, Chasel <chasel.chiu@intel.com>; devel@edk2.groups.io
> Cc: Ni, Ray <ray.ni@intel.com>; Laszlo Ersek <lersek@redhat.com>
> Subject: RE: [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
> 
> Reviewed-by: Eric Dong <eric.dong@intel.com>
> 
> > -----Original Message-----
> > From: Chiu, Chasel
> > Sent: Thursday, September 5, 2019 12:27 PM
> > To: devel@edk2.groups.io
> > Cc: Dong, Eric <eric.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Laszlo
> > Ersek <lersek@redhat.com>
> > Subject: [PATCH v2] UefiCpuPkg: support single
> > EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2153
> >
> > Current logic will skip searching EFI_PEI_CORE_FV_LOCATION_PPI when the
> > PPI in PpiList having EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST flag, but
> > platform may pass single PPI in PpiList that should be supported.
> >
> > Changed the logic to verify PpiList first before checking
> > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST flag.
> >
> > Test: Verified both single EFI_PEI_CORE_FV_LOCATION_PPI and multiple
> >       PPIs in PpiList cases and both can boot with the PeiCore
> >       specified by EFI_PEI_CORE_FV_LOCATION_PPI.
> >
> > Cc: Eric Dong <eric.dong@intel.com>
> > Cc: Ray Ni <ray.ni@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
> > ---
> >  UefiCpuPkg/SecCore/SecMain.c | 9 ++++-----
> >  1 file changed, 4 insertions(+), 5 deletions(-)
> >
> > diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c
> > index 66c952b897..5d5e7f17dc 100644
> > --- a/UefiCpuPkg/SecCore/SecMain.c
> > +++ b/UefiCpuPkg/SecCore/SecMain.c
> > @@ -238,9 +238,8 @@ SecStartupPhase2(
> >    // is enabled.
> >    //
> >    if (PpiList != NULL) {
> > -    for (Index = 0;
> > -      (PpiList[Index].Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) !=
> > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
> > -      Index++) {
> > +    Index = 0;
> > +    do {
> >        if (CompareGuid (PpiList[Index].Guid, &gEfiPeiCoreFvLocationPpiGuid) &&
> >            (((EFI_PEI_CORE_FV_LOCATION_PPI *) PpiList[Index].Ppi)-
> > >PeiCoreFvLocation != 0)
> >           ) {
> > @@ -256,12 +255,12 @@ SecStartupPhase2(
> >            break;
> >          } else {
> >            //
> > -          // PeiCore not found
> > +          // Invalid PeiCore FV provided by platform
> >            //
> >            CpuDeadLoop ();
> >          }
> >        }
> > -    }
> > +    } while ((PpiList[Index++].Flags &
> > + EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) !=
> > + EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST);
> >    }
> >    //
> >    // If EFI_PEI_CORE_FV_LOCATION_PPI not found, try to locate PeiCore from
> > BFV.
> > --
> > 2.13.3.windows.1


  reply	other threads:[~2019-09-05  6:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05  4:27 [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList Chiu, Chasel
2019-09-05  5:38 ` [edk2-devel] " Zeng, Star
2019-09-05  6:15 ` Dong, Eric
2019-09-05  6:46   ` Ni, Ray [this message]
2019-09-05 13:16     ` Laszlo Ersek
2019-09-05 13:19       ` Chiu, Chasel

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=734D49CCEBEEF84792F5B80ED585239D5C2C4587@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