summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/CpuCommonFeaturesLib
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2017-08-23 10:24:58 +0800
committerEric Dong <eric.dong@intel.com>2017-08-28 15:13:49 +0800
commit330021fa41e41ef4b4aafc20e853d91179fd1b80 (patch)
tree3814ebb26b64cde0f9242f36c4e603ccef9d2868 /UefiCpuPkg/Library/CpuCommonFeaturesLib
parentb2b0ffc9b7720bf97b8f9390f77e7399e4e96596 (diff)
downloadedk2-330021fa41e41ef4b4aafc20e853d91179fd1b80.tar.gz
edk2-330021fa41e41ef4b4aafc20e853d91179fd1b80.tar.bz2
edk2-330021fa41e41ef4b4aafc20e853d91179fd1b80.zip
UefiCpuPkg/CpuCommonFeaturesLib: Remove redundant definition.
The EnumProcTraceMemDisable/OutputSchemeInvalid are redundant definitions. These definitions can be handled by other code, so remove them. V2: Change enum members name. Cc: Michael Kinney <michael.d.kinney@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Diffstat (limited to 'UefiCpuPkg/Library/CpuCommonFeaturesLib')
-rw-r--r--UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c
index e4636b20db..167c1be424 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c
@@ -30,10 +30,9 @@
/// Processor trace output scheme selection.
///
typedef enum {
- OutputSchemeSingleRange = 0,
- OutputSchemeToPA,
- OutputSchemeInvalid
-} PROC_TRACE_OUTPUT_SCHEME;
+ RtitOutputSchemeSingleRange = 0,
+ RtitOutputSchemeToPA
+} RTIT_OUTPUT_SCHEME;
typedef struct {
BOOLEAN ProcTraceSupported;
@@ -122,7 +121,7 @@ ProcTraceSupport (
//
ProcTraceData = (PROC_TRACE_DATA *) ConfigData;
if ((ProcTraceData->ProcTraceMemSize > RtitTopaMemorySize128M) ||
- (ProcTraceData->ProcTraceOutputScheme > ProcTraceOutputSchemeToPA)) {
+ (ProcTraceData->ProcTraceOutputScheme > RtitOutputSchemeToPA)) {
return FALSE;
}
@@ -138,8 +137,8 @@ ProcTraceSupport (
AsmCpuidEx (CPUID_INTEL_PROCESSOR_TRACE, CPUID_INTEL_PROCESSOR_TRACE_MAIN_LEAF, NULL, NULL, &Ecx.Uint32, NULL);
ProcTraceData->ProcessorData[ProcessorNumber].TopaSupported = (BOOLEAN) (Ecx.Bits.RTIT == 1);
ProcTraceData->ProcessorData[ProcessorNumber].SingleRangeSupported = (BOOLEAN) (Ecx.Bits.SingleRangeOutput == 1);
- if (ProcTraceData->ProcessorData[ProcessorNumber].TopaSupported ||
- ProcTraceData->ProcessorData[ProcessorNumber].SingleRangeSupported) {
+ if ((ProcTraceData->ProcessorData[ProcessorNumber].TopaSupported && (ProcTraceData->ProcTraceOutputScheme == RtitOutputSchemeToPA)) ||
+ (ProcTraceData->ProcessorData[ProcessorNumber].SingleRangeSupported && (ProcTraceData->ProcTraceOutputScheme == RtitOutputSchemeSingleRange))) {
return TRUE;
}
@@ -291,7 +290,7 @@ ProcTraceInitialize (
// Single Range output scheme
//
if (ProcTraceData->ProcessorData[ProcessorNumber].SingleRangeSupported &&
- (ProcTraceData->ProcTraceOutputScheme == OutputSchemeSingleRange)) {
+ (ProcTraceData->ProcTraceOutputScheme == RtitOutputSchemeSingleRange)) {
if (FirstIn) {
DEBUG ((DEBUG_INFO, "ProcTrace: Enabling Single Range Output scheme \n"));
}
@@ -337,7 +336,7 @@ ProcTraceInitialize (
// ToPA(Table of physical address) scheme
//
if (ProcTraceData->ProcessorData[ProcessorNumber].TopaSupported &&
- (ProcTraceData->ProcTraceOutputScheme == OutputSchemeToPA)) {
+ (ProcTraceData->ProcTraceOutputScheme == RtitOutputSchemeToPA)) {
//
// Create ToPA structure aligned at 4KB for each logical thread
// with at least 2 entries by 8 bytes size each. The first entry