UefiCpuPkg/CpuSmm: Add perf-logging for time-consuming BSP procedures
The patch adds perf-logging for the following potential time-consuming BSP procedures: * PiCpuSmmEntry - SmmRelocateBases - ExecuteFirstSmiInit * BSPHandler - SmmWaitForApArrival - PerformRemainingTasks * InitPaging * SetMemMapAttributes * SetUefiMemMapAttributes * SetPageTableAttributes * ConfigSmmCodeAccessCheck * SmmCpuFeaturesCompleteSmmReadyToLock Signed-off-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2016 - 2019, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2016 - 2023, Intel Corporation. All rights reserved.<BR>
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
@@ -1100,6 +1100,8 @@ SetMemMapAttributes (
|
||||
return;
|
||||
}
|
||||
|
||||
PERF_FUNCTION_BEGIN ();
|
||||
|
||||
DEBUG ((DEBUG_INFO, "MemoryAttributesTable:\n"));
|
||||
DEBUG ((DEBUG_INFO, " Version - 0x%08x\n", MemoryAttributesTable->Version));
|
||||
DEBUG ((DEBUG_INFO, " NumberOfEntries - 0x%08x\n", MemoryAttributesTable->NumberOfEntries));
|
||||
@@ -1152,7 +1154,7 @@ SetMemMapAttributes (
|
||||
PatchSmmSaveStateMap ();
|
||||
PatchGdtIdtMap ();
|
||||
|
||||
return;
|
||||
PERF_FUNCTION_END ();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1454,6 +1456,8 @@ SetUefiMemMapAttributes (
|
||||
UINTN Index;
|
||||
EFI_MEMORY_DESCRIPTOR *Entry;
|
||||
|
||||
PERF_FUNCTION_BEGIN ();
|
||||
|
||||
DEBUG ((DEBUG_INFO, "SetUefiMemMapAttributes\n"));
|
||||
|
||||
if (mUefiMemoryMap != NULL) {
|
||||
@@ -1537,6 +1541,8 @@ SetUefiMemMapAttributes (
|
||||
//
|
||||
// Do not free mUefiMemoryAttributesTable, it will be checked in IsSmmCommBufferForbiddenAddress().
|
||||
//
|
||||
|
||||
PERF_FUNCTION_END ();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1862,6 +1868,7 @@ SetPageTableAttributes (
|
||||
return;
|
||||
}
|
||||
|
||||
PERF_FUNCTION_BEGIN ();
|
||||
DEBUG ((DEBUG_INFO, "SetPageTableAttributes\n"));
|
||||
|
||||
//
|
||||
@@ -1900,5 +1907,5 @@ SetPageTableAttributes (
|
||||
EnableCet ();
|
||||
}
|
||||
|
||||
return;
|
||||
PERF_FUNCTION_END ();
|
||||
}
|
||||
|
Reference in New Issue
Block a user