From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 51EF1211D0785 for ; Thu, 28 Feb 2019 21:40:10 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2019 21:40:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,426,1544515200"; d="scan'208";a="138156446" Received: from ydong10-win10.ccr.corp.intel.com ([10.239.9.125]) by orsmga002.jf.intel.com with ESMTP; 28 Feb 2019 21:40:05 -0800 From: Eric Dong To: edk2-devel@lists.01.org Date: Fri, 1 Mar 2019 13:39:54 +0800 Message-Id: <20190301053957.3572-2-eric.dong@intel.com> X-Mailer: git-send-email 2.15.0.windows.1 In-Reply-To: <20190301053957.3572-1-eric.dong@intel.com> References: <20190301053957.3572-1-eric.dong@intel.com> Subject: [Patch v2 1/4] UefiCpuPkg/RegisterCpuFeaturesLib: Remove useless functions. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Mar 2019 05:40:10 -0000 Remove useless APIs, simplify the code logic. BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1375 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong --- .../Include/Library/RegisterCpuFeaturesLib.h | 34 --------------- .../RegisterCpuFeaturesLib.c | 50 ---------------------- 2 files changed, 84 deletions(-) diff --git a/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h b/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h index 2f7e71c833..073f020d0b 100644 --- a/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h +++ b/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h @@ -166,40 +166,6 @@ IsCpuFeatureInSetting ( IN UINT32 Feature ); -/** - Determines if a CPU feature is set in PcdCpuFeaturesCapability bit mask. - - @param[in] Feature The bit number of the CPU feature to check in the PCD - PcdCpuFeaturesCapability. - - @retval TRUE The CPU feature is set in PcdCpuFeaturesCapability. - @retval FALSE The CPU feature is not set in PcdCpuFeaturesCapability. - - @note This service could be called by BSP only. -**/ -BOOLEAN -EFIAPI -IsCpuFeatureCapability ( - IN UINT32 Feature - ); - -/** - Determines if a CPU feature is set in PcdCpuFeaturesUserConfiguration bit mask. - - @param[in] Feature The bit number of the CPU feature to check in the PCD - PcdCpuFeaturesUserConfiguration. - - @retval TRUE The CPU feature is set in PcdCpuFeaturesUserConfiguration. - @retval FALSE The CPU feature is not set in PcdCpuFeaturesUserConfiguration. - - @note This service could be called by BSP only. -**/ -BOOLEAN -EFIAPI -IsCpuFeatureUserConfiguration ( - IN UINT32 Feature - ); - /** Prepares for the data used by CPU feature detection and initialization. diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c index ed8d526325..3540029079 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c @@ -1242,56 +1242,6 @@ IsCpuFeatureInSetting ( ); } -/** - Determines if a CPU feature is set in PcdCpuFeaturesCapability bit mask. - - @param[in] Feature The bit number of the CPU feature to check in the PCD - PcdCpuFeaturesCapability - - @retval TRUE The CPU feature is set in PcdCpuFeaturesCapability. - @retval FALSE The CPU feature is not set in PcdCpuFeaturesCapability. - - @note This service could be called by BSP only. -**/ -BOOLEAN -EFIAPI -IsCpuFeatureCapability ( - IN UINT32 Feature - ) -{ - return IsCpuFeatureSetInCpuPcd ( - (UINT8 *)PcdGetPtr (PcdCpuFeaturesCapability), - PcdGetSize (PcdCpuFeaturesCapability), - Feature - ); - -} - -/** - Determines if a CPU feature is set in PcdCpuFeaturesUserConfiguration bit mask. - - @param[in] Feature The bit number of the CPU feature to check in the PCD - PcdCpuFeaturesUserConfiguration - - @retval TRUE The CPU feature is set in PcdCpuFeaturesUserConfiguration. - @retval FALSE The CPU feature is not set in PcdCpuFeaturesUserConfiguration. - - @note This service could be called by BSP only. -**/ -BOOLEAN -EFIAPI -IsCpuFeatureUserConfiguration ( - IN UINT32 Feature - ) -{ - return IsCpuFeatureSetInCpuPcd ( - (UINT8 *)PcdGetPtr (PcdCpuFeaturesUserConfiguration), - PcdGetSize (PcdCpuFeaturesUserConfiguration), - Feature - ); - -} - /** Switches to assigned BSP after CPU features initialization. -- 2.15.0.windows.1