C functions in SEC\r
\r
Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
\r
PeiCoreEntryPoint = NULL;\r
SecCoreData = (EFI_SEC_PEI_HAND_OFF *) Context;\r
- AllSecPpiList = (EFI_PEI_PPI_DESCRIPTOR *) SecCoreData->PeiTemporaryRamBase;\r
\r
//\r
// Perform platform specific initialization before entering PeiCore.\r
// is enabled.\r
//\r
if (PpiList != NULL) {\r
- for (Index = 0;\r
- (PpiList[Index].Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) != EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;\r
- Index++) {\r
+ Index = 0;\r
+ do {\r
if (CompareGuid (PpiList[Index].Guid, &gEfiPeiCoreFvLocationPpiGuid) &&\r
(((EFI_PEI_CORE_FV_LOCATION_PPI *) PpiList[Index].Ppi)->PeiCoreFvLocation != 0)\r
) {\r
break;\r
} else {\r
//\r
- // PeiCore not found\r
+ // Invalid PeiCore FV provided by platform\r
//\r
CpuDeadLoop ();\r
}\r
}\r
- }\r
+ } while ((PpiList[Index++].Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) != EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST);\r
}\r
//\r
// If EFI_PEI_CORE_FV_LOCATION_PPI not found, try to locate PeiCore from BFV.\r
}\r
\r
if (PpiList != NULL) {\r
+ AllSecPpiList = (EFI_PEI_PPI_DESCRIPTOR *) SecCoreData->PeiTemporaryRamBase;\r
+\r
//\r
// Remove the terminal flag from the terminal PPI\r
//\r