[edk2-devel] [Patch V2 2/2] UefiCpuPkg: Update PT code to support enable collect performance
Ni, Ray
ray.ni at intel.com
Tue Apr 25 14:13:53 UTC 2023
> @@ -112,6 +115,7 @@ ProcTraceSupport (
> PROC_TRACE_DATA *ProcTraceData;
> CPUID_STRUCTURED_EXTENDED_FEATURE_FLAGS_EBX Ebx;
> CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_ECX Ecx;
> + CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF_EBX MainLeafEbx;
1. can you update the "Ecx" to "ProcTraceEcx", and "MainLeafEbx" to "ProcTraceEbx"?
>
> //
> // Check if ProcTraceMemorySize option is enabled (0xFF means disable by
> user)
> @@ -141,6 +145,12 @@ ProcTraceSupport (
> ProcTraceData->ProcessorData[ProcessorNumber].RtitCtrl.Uint64 =
> AsmReadMsr64 (MSR_IA32_RTIT_CTL);
> ProcTraceData->ProcessorData[ProcessorNumber].RtitOutputBase.Uint64
> = AsmReadMsr64 (MSR_IA32_RTIT_OUTPUT_BASE);
> ProcTraceData-
> >ProcessorData[ProcessorNumber].RtitOutputMaskPtrs.Uint64 =
> AsmReadMsr64 (MSR_IA32_RTIT_OUTPUT_MASK_PTRS);
> +
> + if (ProcTraceData->EnablePerformanceCollecting) {
> + AsmCpuidEx (CPUID_INTEL_PROCESSOR_TRACE,
> CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF, NULL, &MainLeafEbx.Uint32,
> NULL, NULL);
2. There is an existing Cpuid call earlier. Can you get the "EBX" value in the existing
Cpuid call? And you don't even need to check "EnablePerformanceCollecting" here
for the capability detection.
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103548): https://edk2.groups.io/g/devel/message/103548
Mute This Topic: https://groups.io/mt/98489093/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3943202/1813853/130120423/xyzzy [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list