From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 330C4202E534E for ; Tue, 12 Feb 2019 18:04:09 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Feb 2019 18:04:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,364,1544515200"; d="scan'208";a="318525600" Received: from ydong10-win10.ccr.corp.intel.com ([10.239.9.125]) by fmsmga006.fm.intel.com with ESMTP; 12 Feb 2019 18:04:08 -0800 From: Eric Dong To: edk2-devel@lists.01.org Cc: Ray Ni , Laszlo Ersek Date: Wed, 13 Feb 2019 10:04:03 +0800 Message-Id: <20190213020405.18800-2-eric.dong@intel.com> X-Mailer: git-send-email 2.15.0.windows.1 In-Reply-To: <20190213020405.18800-1-eric.dong@intel.com> References: <20190213020405.18800-1-eric.dong@intel.com> Subject: [Patch 1/3] 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: Wed, 13 Feb 2019 02:04:09 -0000 Remove useless APIs, simply the code logic. BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1375 Cc: Ray Ni Cc: Laszlo Ersek 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