X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FPei%2FPeiMain%2FPeiMain.c;fp=MdeModulePkg%2FCore%2FPei%2FPeiMain%2FPeiMain.c;h=e3a301dfe0f22d0d227d8dd9157580bde6247eba;hp=a52e6f020176811e0a4086db8e0a2f9fc2c44879;hb=d1102dba7210b95e41d06c2338a22ba6af248645;hpb=ca79bab7af4770c5eb578f6d495af01705aedb79 diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c index a52e6f0201..e3a301dfe0 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -1,7 +1,7 @@ /** @file Pei Core Main Entry Point - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -46,7 +46,7 @@ EFI_PEI_SERVICES gPs = { PeiFfsFindNextFile, PeiFfsFindSectionData, - PeiInstallPeiMemory, + PeiInstallPeiMemory, PeiAllocatePages, PeiAllocatePool, (EFI_PEI_COPY_MEM)CopyMem, @@ -70,7 +70,7 @@ EFI_PEI_SERVICES gPs = { /** Shadow PeiCore module from flash to installed memory. - + @param PrivateData PeiCore's private data structure @return PeiCore function address after shadowing. @@ -155,7 +155,7 @@ PeiCore ( EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable; EFI_PEI_TEMPORARY_RAM_DONE_PPI *TemporaryRamDonePpi; UINTN Index; - + // // Retrieve context passed into PEI Core // @@ -252,7 +252,7 @@ PeiCore ( // Indicate that PeiCore reenter // OldCoreData->PeimDispatcherReenter = TRUE; - + if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 && (OldCoreData->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) { // // if Loading Module at Fixed Address is enabled, allocate the PEI code memory range usage bit map array. @@ -270,12 +270,12 @@ PeiCore ( || (HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME && PcdGetBool (PcdShadowPeimOnBoot))) { OldCoreData->ShadowedPeiCore = ShadowPeiCore (OldCoreData); } - + // // PEI Core has now been shadowed to memory. Restart PEI Core in memory. // OldCoreData->ShadowedPeiCore (SecCoreData, PpiList, OldCoreData); - + // // Should never reach here. // @@ -295,13 +295,13 @@ PeiCore ( CpuIo = (VOID*)PrivateData.ServiceTableShadow.CpuIo; PciCfg = (VOID*)PrivateData.ServiceTableShadow.PciCfg; - + CopyMem (&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs)); - + PrivateData.ServiceTableShadow.CpuIo = CpuIo; PrivateData.ServiceTableShadow.PciCfg = PciCfg; } - + // // Cache a pointer to the PEI Services Table that is either in temporary memory or permanent memory // @@ -347,9 +347,9 @@ PeiCore ( ASSERT (PrivateData.FileHandles != NULL); } InitializePpiServices (&PrivateData, OldCoreData); - + // - // Update performance measurements + // Update performance measurements // if (OldCoreData == NULL) { PERF_EVENT ("SEC"); // Means the end of SEC phase. @@ -367,14 +367,14 @@ PeiCore ( // // Complete PEI Core Service initialization - // + // InitializeSecurityServices (&PrivateData.Ps, OldCoreData); InitializeDispatcherData (&PrivateData, OldCoreData, SecCoreData); InitializeImageServices (&PrivateData, OldCoreData); // // Perform PEI Core Phase specific actions - // + // if (OldCoreData == NULL) { // // Report Status Code EFI_SW_PC_INIT @@ -383,7 +383,7 @@ PeiCore ( EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT) ); - + // // If SEC provided the PpiList, process it. //