X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FPei%2FPeiMain%2FPeiMain.c;h=6969ce3ffe9fd8ee588e9285d03f5c4cca5bf147;hp=6e032783d0bdd88142cd5d52be38993a54b47647;hb=f9876ecf8a296a8e0d4ad8d22ed5ff12ecc11f65;hpb=d949491623f84f8151275438c41afc92698f000c diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c index 6e032783d0..6969ce3ffe 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, Intel Corporation +Copyright (c) 2006 - 2010, 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 @@ -12,9 +12,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#include +#include "PeiMain.h" -STATIC EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi = { +EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi = { (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), &gEfiPeiMemoryDiscoveredPpiGuid, NULL @@ -23,7 +23,7 @@ STATIC EFI_PEI_PPI_DESCRIPTOR mMemoryDiscoveredPpi = { /// /// Pei service instance /// -STATIC EFI_PEI_SERVICES gPs = { +EFI_PEI_SERVICES gPs = { { PEI_SERVICES_SIGNATURE, PEI_SERVICES_REVISION, @@ -42,7 +42,7 @@ STATIC EFI_PEI_SERVICES gPs = { PeiGetHobList, PeiCreateHob, - PeiFvFindNextVolume, + PeiFfsFindNextVolume, PeiFfsFindNextFile, PeiFfsFindSectionData, @@ -55,8 +55,8 @@ STATIC EFI_PEI_SERVICES gPs = { PeiReportStatusCode, PeiResetSystem, - NULL, - NULL, + &gPeiDefaultCpuIoPpi, + &gPeiDefaultPciCfg2Ppi, PeiFfsFindFileByName, PeiFfsGetFileInfo, @@ -65,7 +65,6 @@ STATIC EFI_PEI_SERVICES gPs = { }; /** - This routine is invoked by main entry of PeiMain module during transition from SEC to PEI. After switching stack in the PEI core, it will restart with the old core data. @@ -83,10 +82,8 @@ STATIC EFI_PEI_SERVICES gPs = { core's data areas. If NULL, it is first PeiCore entering. - @retval EFI_NOT_FOUND Never reach - **/ -EFI_STATUS +VOID EFIAPI PeiCore ( IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, @@ -156,7 +153,7 @@ PeiCore ( // // Initialize libraries that the PeiCore is linked against // - ProcessLibraryConstructorList (NULL, &PrivateData.PS); + ProcessLibraryConstructorList (NULL, (CONST EFI_PEI_SERVICES **)&PrivateData.PS); InitializeMemoryServices (&PrivateData, SecCoreData, OldCoreData); @@ -165,7 +162,7 @@ PeiCore ( // // Save PeiServicePointer so that it can be retrieved anywhere. // - SetPeiServicesTablePointer(&PrivateData.PS); + SetPeiServicesTablePointer((CONST EFI_PEI_SERVICES **) &PrivateData.PS); if (OldCoreData != NULL) { @@ -187,8 +184,11 @@ PeiCore ( // REPORT_STATUS_CODE ( EFI_PROGRESS_CODE, - FixedPcdGet32 (PcdStatusCodeValuePeiCoreEntry) + (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT) ); + + PERF_START (NULL, "SEC", NULL, 1); + PERF_END (NULL, "SEC", NULL, Tick); PERF_START (NULL,"PEI", NULL, Tick); // @@ -247,10 +247,11 @@ PeiCore ( &PrivateData.PS, PrivateData.HobList ); - + // + // Should never reach here. + // ASSERT_EFI_ERROR (Status); - - return EFI_NOT_FOUND; + CpuDeadLoop(); }