public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
@ 2019-09-05  4:27 Chiu, Chasel
  2019-09-05  5:38 ` [edk2-devel] " Zeng, Star
  2019-09-05  6:15 ` Dong, Eric
  0 siblings, 2 replies; 6+ messages in thread
From: Chiu, Chasel @ 2019-09-05  4:27 UTC (permalink / raw)
  To: devel; +Cc: Eric Dong, Ray Ni, Laszlo Ersek

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [edk2-devel] [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
  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 ` Zeng, Star
  2019-09-05  6:15 ` Dong, Eric
  1 sibling, 0 replies; 6+ messages in thread
From: Zeng, Star @ 2019-09-05  5:38 UTC (permalink / raw)
  To: devel@edk2.groups.io, Chiu, Chasel
  Cc: Dong, Eric, Ni, Ray, Laszlo Ersek, Zeng, Star

Reviewed-by: Star Zeng <star.zeng@intel.com>

> -----Original Message-----
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> 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: [edk2-devel] [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
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Dong, Eric @ 2019-09-05  6:15 UTC (permalink / raw)
  To: Chiu, Chasel, devel@edk2.groups.io; +Cc: Ni, Ray, Laszlo Ersek

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
  2019-09-05  6:15 ` Dong, Eric
@ 2019-09-05  6:46   ` Ni, Ray
  2019-09-05 13:16     ` Laszlo Ersek
  0 siblings, 1 reply; 6+ messages in thread
From: Ni, Ray @ 2019-09-05  6:46 UTC (permalink / raw)
  To: Dong, Eric, Chiu, Chasel, devel@edk2.groups.io; +Cc: Laszlo Ersek

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
  2019-09-05  6:46   ` Ni, Ray
@ 2019-09-05 13:16     ` Laszlo Ersek
  2019-09-05 13:19       ` Chiu, Chasel
  0 siblings, 1 reply; 6+ messages in thread
From: Laszlo Ersek @ 2019-09-05 13:16 UTC (permalink / raw)
  To: Ni, Ray, Dong, Eric, Chiu, Chasel, devel@edk2.groups.io

Hi All,

On 09/05/19 08:46, Ni, Ray wrote:
> Reviewed-by: Ray Ni <ray.ni@intel.com>

Please go ahead with the push, I'll skip this.

Thanks
Laszlo

>> -----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
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] UefiCpuPkg: support single EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
  2019-09-05 13:16     ` Laszlo Ersek
@ 2019-09-05 13:19       ` Chiu, Chasel
  0 siblings, 0 replies; 6+ messages in thread
From: Chiu, Chasel @ 2019-09-05 13:19 UTC (permalink / raw)
  To: Laszlo Ersek, Ni, Ray, Dong, Eric, devel@edk2.groups.io


Thanks Laszlo!
Pushed: 8a1305a11f3bda2d6c1ab758e4aea79ee021dd1c

> -----Original Message-----
> From: Laszlo Ersek <lersek@redhat.com>
> Sent: Thursday, September 5, 2019 9:16 PM
> To: Ni, Ray <ray.ni@intel.com>; Dong, Eric <eric.dong@intel.com>; Chiu,
> Chasel <chasel.chiu@intel.com>; devel@edk2.groups.io
> Subject: Re: [PATCH v2] UefiCpuPkg: support single
> EFI_PEI_CORE_FV_LOCATION_PPI in PpiList
> 
> Hi All,
> 
> On 09/05/19 08:46, Ni, Ray wrote:
> > Reviewed-by: Ray Ni <ray.ni@intel.com>
> 
> Please go ahead with the push, I'll skip this.
> 
> Thanks
> Laszlo
> 
> >> -----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
> >


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-09-05 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-09-05 13:16     ` Laszlo Ersek
2019-09-05 13:19       ` Chiu, Chasel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox