From nobody Thu Dec 26 14:34:09 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 From nobody Thu Dec 26 14:34:09 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 1503455484873295.0436315761224; Tue, 22 Aug 2017 19:31:24 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 686E121E7901B; 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 0E64D21CFA5EF for ; Tue, 22 Aug 2017 19:28:45 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP; 22 Aug 2017 19:31:18 -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:17 -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="1165258539" From: Eric Dong To: edk2-devel@lists.01.org Date: Wed, 23 Aug 2017 10:31:13 +0800 Message-Id: <1503455473-14360-3-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 2/2] UefiCpuPkg: Update default for PcdCpuProcTraceMemSize/PcdCpuProcTraceOutputScheme. 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" These two definitions have redundant definition which can be handle by code. This patch update them to follow new code definitions. Cc: Michael Kinney Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong --- UefiCpuPkg/UefiCpuPkg.dec | 14 ++++++-------- UefiCpuPkg/UefiCpuPkg.uni | 8 +++----- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/UefiCpuPkg/UefiCpuPkg.dec b/UefiCpuPkg/UefiCpuPkg.dec index b4e099d..51ae0e2 100644 --- a/UefiCpuPkg/UefiCpuPkg.dec +++ b/UefiCpuPkg/UefiCpuPkg.dec @@ -286,7 +286,7 @@ gUefiCpuPkgTokenSpaceGuid.PcdCpuFeaturesSetting|{0x00, 0x00, 0x00, 0x00,= 0x00, 0x00, 0x00, 0x00}|VOID*|0x00000019 =20 ## Contains the size of memory required when CPU processor trace is enab= led.

- # Default value is 0x10 which disables the processor trace.
+ # Default value is 0x0 which use 4K memory size.
# 0x0 - 4K.
# 0x1 - 8K.
# 0x2 - 16K.
@@ -303,19 +303,17 @@ # 0xD - 32M.
# 0xE - 64M.
# 0xF - 128M.
- # 0x10 - ProcTraceMemDisable.
# @Prompt The memory size used for processor trace. - # @ValidRange 0x80000001 | 0 - 0x10 - gUefiCpuPkgTokenSpaceGuid.PcdCpuProcTraceMemSize|0x10|UINT32|0x60000012 + # @ValidRange 0x80000001 | 0 - 0xF + gUefiCpuPkgTokenSpaceGuid.PcdCpuProcTraceMemSize|0x0|UINT32|0x60000012 =20 ## Contains the processor trace output scheme when CPU processor trace i= s enabled.

- # Default value is 2 which disables the processor trace.
+ # Default value is 1 which use single range output scheme.
# 0 - Single Range output scheme.
# 1 - ToPA(Table of physical address) scheme.
- # 2 - Invalid scheme.
# @Prompt The processor trace output scheme. - # @ValidRange 0x80000001 | 0 - 2 - gUefiCpuPkgTokenSpaceGuid.PcdCpuProcTraceOutputScheme|0x2|UINT8|0x600000= 15 + # @ValidRange 0x80000001 | 0 - 1 + gUefiCpuPkgTokenSpaceGuid.PcdCpuProcTraceOutputScheme|0x0|UINT8|0x600000= 15 =20 [UserExtensions.TianoCore."ExtraFiles"] UefiCpuPkgExtra.uni diff --git a/UefiCpuPkg/UefiCpuPkg.uni b/UefiCpuPkg/UefiCpuPkg.uni index 858e4a7..f3be041 100644 --- a/UefiCpuPkg/UefiCpuPkg.uni +++ b/UefiCpuPkg/UefiCpuPkg.uni @@ -198,7 +198,7 @@ #string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuProcTraceMemSize_PROMPT #lang= uage en-US "Memory size used by Processor Trace feature." =20 #string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuProcTraceMemSize_HELP #langua= ge en-US "User input the memory size can be used by processor trace feature= .

\n" - = "Default value is 0x10 which disables the processor memory trace.<= BR>\n" + = "Default value is 0x0 which use 4K memory size.
\n" = "0x0 - 4K.
\n" = "0x1 - 8K.
\n" = "0x2 - 16K.
\n" @@ -215,12 +215,10 @@ = "0xD - 32M.
\n" = "0xE - 64M.
\n" = "0xF - 128M.
\n" - = "0x10 - ProcTraceMemDisable.
\n" =20 #string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuProcTraceOutputScheme_PROMPT = #language en-US "Processor Trace output scheme type." =20 #string STR_gUefiCpuPkgTokenSpaceGuid_PcdCpuProcTraceOutputScheme_HELP #l= anguage en-US "User input the processor trace output scheme type.

\n" - = "Default value is 2 which disables the processor memory trace= .
\n" + = "Default value is 0 which use single range output scheme.
= \n" = "0 - Single Range output scheme.
\n" - = "1 - ToPA(Table of physical address) scheme.
\n" - = "2 - Invalid scheme.
\n" \ No newline at end of file + = "1 - ToPA(Table of physical address) scheme.
\n" \ No newline at end of file --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel