X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=EdkModulePkg%2FCore%2FPei%2FPeiMain%2FPeiMain.c;h=924336b22d47025d9b8e16839f04afc3285767e5;hb=20bfd422ed24d772cf7e0c8bd214d6ce5a454c68;hp=014c571c05eaf208a228463f6ccc95e1868b28d2;hpb=878ddf1fc3540a715f63594ed22b6929e881afb4;p=mirror_edk2.git diff --git a/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c b/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c index 014c571c05..924336b22d 100644 --- a/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/EdkModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -107,12 +107,11 @@ Returns: mTick = 0; -#ifdef EFI_PEI_PERFORMANCE - if (OldCoreData == NULL) { - mTick = GetPerformanceCounter (); + if (PerformanceMeasurementEnabled()) { + if (OldCoreData == NULL) { + mTick = GetPerformanceCounter (); + } } -#endif - // // For IPF in CAR mode the real memory access is uncached,in InstallPeiMemory() @@ -151,10 +150,10 @@ Returns: // // The following code dumps out interesting cache as RAM usage information // so we can keep tabs on how the cache as RAM is being utilized. The - // DEBUG_CODE macro is used to prevent this code from being compiled + // DEBUG_CODE_BEGIN macro is used to prevent this code from being compiled // on a debug build. // - DEBUG_CODE ( + DEBUG_CODE_BEGIN (); UINTN *StackPointer; UINTN StackValue; @@ -174,13 +173,14 @@ Returns: ((UINTN) OldCoreData->HobList.HandoffInformationTable->EfiFreeMemoryBottom - (UINTN) OldCoreData->HobList.Raw) )); - ); + DEBUG_CODE_END (); // // Alert any listeners that there is permanent memory available // + PERF_START (NULL,"PEI", NULL, mTick); PERF_START (NULL,"DisMem", NULL, 0); - Status = PeiCoreInstallPpi (&mMemoryDiscoveredPpi); + Status = PeiServicesInstallPpi (&mMemoryDiscoveredPpi); PERF_END (NULL,"DisMem", NULL, 0); } else { @@ -202,7 +202,7 @@ Returns: // If SEC provided any PPI services to PEI, install them. // if (PeiStartupDescriptor->DispatchTable != NULL) { - Status = PeiCoreInstallPpi (PeiStartupDescriptor->DispatchTable); + Status = PeiServicesInstallPpi (PeiStartupDescriptor->DispatchTable); ASSERT_EFI_ERROR (Status); } } @@ -221,7 +221,7 @@ Returns: PERF_END (NULL, "PostMem", NULL, 0); - Status = PeiCoreLocatePpi ( + Status = PeiServicesLocatePpi ( &gEfiDxeIplPpiGuid, 0, NULL,