From nobody Fri Dec 27 04:29:55 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 150345548237474.37481371916215; Tue, 22 Aug 2017 19:31:22 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 3074621E49BD5; Tue, 22 Aug 2017 19:28:46 -0700 (PDT) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EDAFE21E49BCC for ; Tue, 22 Aug 2017 19:28:43 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 22 Aug 2017 19:31:17 -0700 Received: from ydong10-win10.ccr.corp.intel.com ([10.239.158.51]) by orsmga001.jf.intel.com with ESMTP; 22 Aug 2017 19:31:16 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,415,1498546800"; d="scan'208";a="1165258533" From: Eric Dong To: edk2-devel@lists.01.org Date: Wed, 23 Aug 2017 10:31:12 +0800 Message-Id: <1503455473-14360-2-git-send-email-eric.dong@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1503455473-14360-1-git-send-email-eric.dong@intel.com> References: <1503455473-14360-1-git-send-email-eric.dong@intel.com> Subject: [edk2] [Patch 1/2] UefiCpuPkg/CpuCommonFeaturesLib: Remove redundant definition. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Kinney , Ruiyu Ni MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The EnumProcTraceMemDisable/OutputSchemeInvalid are redundant definitions. These definitions can be handled by other code, so remove them. Cc: Michael Kinney Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong --- UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c b/UefiCpuP= kg/Library/CpuCommonFeaturesLib/ProcTrace.c index a90dd4e..6524882 100644 --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ProcTrace.c @@ -35,8 +35,7 @@ typedef enum { Enum16M, Enum32M, Enum64M, - Enum128M, - EnumProcTraceMemDisable + Enum128M } PROC_TRACE_MEM_SIZE; =20 /// @@ -44,8 +43,7 @@ typedef enum { /// typedef enum { OutputSchemeSingleRange =3D 0, - OutputSchemeToPA, - OutputSchemeInvalid + OutputSchemeToPA } PROC_TRACE_OUTPUT_SCHEME; =20 typedef struct { @@ -134,10 +132,6 @@ ProcTraceSupport ( // Check if ProcTraceMemorySize option is enabled (0xFF means disable by= user) // ProcTraceData =3D (PROC_TRACE_DATA *) ConfigData; - if ((ProcTraceData->ProcTraceMemSize >=3D EnumProcTraceMemDisable) || - (ProcTraceData->ProcTraceOutputScheme >=3D OutputSchemeInvalid)) { - return FALSE; - } =20 // // Check if Processor Trace is supported @@ -151,8 +145,8 @@ ProcTraceSupport ( AsmCpuidEx (CPUID_INTEL_PROCESSOR_TRACE, CPUID_INTEL_PROCESSOR_TRACE_MAI= N_LEAF, NULL, NULL, &Ecx.Uint32, NULL); ProcTraceData->ProcessorData[ProcessorNumber].TopaSupported =3D (BOOLEAN= ) (Ecx.Bits.RTIT =3D=3D 1); ProcTraceData->ProcessorData[ProcessorNumber].SingleRangeSupported =3D (= BOOLEAN) (Ecx.Bits.SingleRangeOutput =3D=3D 1); - if (ProcTraceData->ProcessorData[ProcessorNumber].TopaSupported ||=20 - ProcTraceData->ProcessorData[ProcessorNumber].SingleRangeSupported) { + if ((ProcTraceData->ProcessorData[ProcessorNumber].TopaSupported && (Pro= cTraceData->ProcTraceOutputScheme =3D=3D OutputSchemeToPA)) || + (ProcTraceData->ProcessorData[ProcessorNumber].SingleRangeSupported = && (ProcTraceData->ProcTraceOutputScheme =3D=3D OutputSchemeSingleRange))) { return TRUE; } =20 --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel