summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/UefiCpuPkg.dec
diff options
context:
space:
mode:
authorDun Tan <dun.tan@intel.com>2023-04-25 16:33:30 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-26 09:19:51 +0000
commitede0bd1496405f72147308b9570efba0234349b2 (patch)
tree043f9781af431a08c935ca7ccfa904f5130d2343 /UefiCpuPkg/UefiCpuPkg.dec
parent61e2c8342443303e6e50e7ce75b5971e88413573 (diff)
downloadedk2-ede0bd1496405f72147308b9570efba0234349b2.zip
edk2-ede0bd1496405f72147308b9570efba0234349b2.tar.gz
edk2-ede0bd1496405f72147308b9570efba0234349b2.tar.bz2
UefiCpuPkg: Update PT code to support enable collect performance
Update ProcTrace feature code to support enable collect performance data by generating CYC and TSC packets. Add a new dynamic PCD to indicate if enable performance collecting. In ProcTrace.c code, if this new PCD is true, after check cpuid, CYC and TSC packets will be generated by setting the corresponding MSR bits feilds if supported. Bugzila: https://bugzilla.tianocore.org/show_bug.cgi?id=4423 Signed-off-by: Dun Tan <dun.tan@intel.com> Cc: Eric Dong <eric.dong@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Xiao X Chen <xiao.x.chen@intel.com>
Diffstat (limited to 'UefiCpuPkg/UefiCpuPkg.dec')
-rw-r--r--UefiCpuPkg/UefiCpuPkg.dec8
1 files changed, 8 insertions, 0 deletions
diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec
index 6845e80..d31c3b1 100644
--- a/UefiCpuPkg/UefiCpuPkg.dec
+++ b/UefiCpuPkg/UefiCpuPkg.dec
@@ -345,6 +345,14 @@
# @Prompt Enable CPU processor trace only on BSP.
gUefiCpuPkgTokenSpaceGuid.PcdCpuProcTraceBspOnly|FALSE|BOOLEAN|0x60000019
+ ## This PCD indicates if enable performance collecting when CPU processor trace is enabled.<BR><BR>
+ # CYC/TSC timing packets will be generated to collect performance data if this PCD is TRUE.
+ # This PCD is ignored if CPU processor trace is disabled.<BR><BR>
+ # TRUE - Performance collecting will be enabled in processor trace.<BR>
+ # FASLE - Performance collecting will be disabled in processor trace.<BR>
+ # @Prompt Enable performance collecting when processor trace is enabled.
+ gUefiCpuPkgTokenSpaceGuid.PcdCpuProcTracePerformanceCollecting|FALSE|BOOLEAN|0x60000020
+
[PcdsFixedAtBuild.X64, PcdsPatchableInModule.X64, PcdsDynamic.X64, PcdsDynamicEx.X64]
## Indicate access to non-SMRAM memory is restricted to reserved, runtime and ACPI NVS type after SmmReadyToLock.
# MMIO access is always allowed regardless of the value of this PCD.