Thanks for the comments. I'll update the code in next version patch. Thanks, Dun
-----Original Message----- From: Ni, Ray <ray...@intel.com> Sent: Tuesday, April 25, 2023 10:14 PM To: Tan, Dun <dun....@intel.com>; devel@edk2.groups.io Cc: Dong, Eric <eric.d...@intel.com>; Kumar, Rahul R <rahul.r.ku...@intel.com>; Gerd Hoffmann <kra...@redhat.com>; Chen, Xiao X <xiao.x.c...@intel.com> Subject: RE: [Patch V2 2/2] UefiCpuPkg: Update PT code to support enable collect performance > @@ -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 (#103603): https://edk2.groups.io/g/devel/message/103603 Mute This Topic: https://groups.io/mt/98489093/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-