mirror of https://github.com/acidanthera/audk.git
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> Reviewed-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
parent
7bf5255997
commit
8a1305a11f
|
@ -238,9 +238,8 @@ SecStartupPhase2(
|
||||||
// is enabled.
|
// is enabled.
|
||||||
//
|
//
|
||||||
if (PpiList != NULL) {
|
if (PpiList != NULL) {
|
||||||
for (Index = 0;
|
Index = 0;
|
||||||
(PpiList[Index].Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) != EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
|
do {
|
||||||
Index++) {
|
|
||||||
if (CompareGuid (PpiList[Index].Guid, &gEfiPeiCoreFvLocationPpiGuid) &&
|
if (CompareGuid (PpiList[Index].Guid, &gEfiPeiCoreFvLocationPpiGuid) &&
|
||||||
(((EFI_PEI_CORE_FV_LOCATION_PPI *) PpiList[Index].Ppi)->PeiCoreFvLocation != 0)
|
(((EFI_PEI_CORE_FV_LOCATION_PPI *) PpiList[Index].Ppi)->PeiCoreFvLocation != 0)
|
||||||
) {
|
) {
|
||||||
|
@ -256,12 +255,12 @@ SecStartupPhase2(
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
//
|
//
|
||||||
// PeiCore not found
|
// Invalid PeiCore FV provided by platform
|
||||||
//
|
//
|
||||||
CpuDeadLoop ();
|
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.
|
// If EFI_PEI_CORE_FV_LOCATION_PPI not found, try to locate PeiCore from BFV.
|
||||||
|
|
Loading…
Reference in New Issue