From nobody Thu Dec 26 12:23:06 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 1504245532742154.5391820523671; Thu, 31 Aug 2017 22:58:52 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id DBA0B20958BC8; Thu, 31 Aug 2017 22:56:06 -0700 (PDT) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 DFAE721E74918 for ; Thu, 31 Aug 2017 22:56:05 -0700 (PDT) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 31 Aug 2017 22:58:49 -0700 Received: from ydong10-win10.ccr.corp.intel.com ([10.239.158.51]) by orsmga005.jf.intel.com with ESMTP; 31 Aug 2017 22:58:48 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,456,1498546800"; d="scan'208";a="144374059" From: Eric Dong To: edk2-devel@lists.01.org Date: Fri, 1 Sep 2017 13:58:45 +0800 Message-Id: <1504245525-8300-1-git-send-email-eric.dong@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 Subject: [edk2] [Patch] UefiCpuPkg/Lmce.c Remove useless file. 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: 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" Merge the code to MachineCheck.c file, remove this file. Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Eric Dong Reviewed-by: Ruiyu Ni --- UefiCpuPkg/Library/CpuCommonFeaturesLib/Lmce.c | 97 ----------------------= ---- 1 file changed, 97 deletions(-) delete mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/Lmce.c diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Lmce.c b/UefiCpuPkg/Li= brary/CpuCommonFeaturesLib/Lmce.c deleted file mode 100644 index bf7e26b..0000000 --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Lmce.c +++ /dev/null @@ -1,97 +0,0 @@ -/** @file - Local machine check exception feature. - - Copyright (c) 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BS= D License - which accompanies this distribution. The full text of the license may b= e found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMP= LIED. - -**/ - -#include "CpuCommonFeatures.h" - -/** - Detects if Local machine check exception feature supported on current=20 - processor. - - @param[in] ProcessorNumber The index of the CPU executing this functio= n. - @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFOR= MATION - structure for the CPU executing this functi= on. - @param[in] ConfigData A pointer to the configuration buffer retur= ned - by CPU_FEATURE_GET_CONFIG_DATA. NULL if - CPU_FEATURE_GET_CONFIG_DATA was not provide= d in - RegisterCpuFeature(). - - @retval TRUE Local machine check exception feature is supported. - @retval FALSE Local machine check exception feature is not supported. - - @note This service could be called by BSP/APs. -**/ -BOOLEAN -EFIAPI -LmceSupport ( - IN UINTN ProcessorNumber, - IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, - IN VOID *ConfigData OPTIONAL - ) -{ - MSR_IA32_MCG_CAP_REGISTER McgCap; - - if (!McaSupport (ProcessorNumber, CpuInfo, ConfigData)) { - return FALSE; - } - - McgCap.Uint64 =3D AsmReadMsr64 (MSR_IA32_MCG_CAP); - if (ProcessorNumber =3D=3D 0) { - DEBUG ((EFI_D_INFO, "LMCE eanble =3D %x\n", (BOOLEAN) (McgCap.Bits.MCG= _LMCE_P !=3D 0))); - } - return (BOOLEAN) (McgCap.Bits.MCG_LMCE_P !=3D 0); -} - -/** - Initializes Local machine check exception feature to specific state. - - @param[in] ProcessorNumber The index of the CPU executing this functio= n. - @param[in] CpuInfo A pointer to the REGISTER_CPU_FEATURE_INFOR= MATION - structure for the CPU executing this functi= on. - @param[in] ConfigData A pointer to the configuration buffer retur= ned - by CPU_FEATURE_GET_CONFIG_DATA. NULL if - CPU_FEATURE_GET_CONFIG_DATA was not provide= d in - RegisterCpuFeature(). - @param[in] State If TRUE, then the Local machine check excep= tion - feature must be enabled. - If FALSE, then the Local machine check exce= ption - feature must be disabled. - - @retval RETURN_SUCCESS Local machine check exception feature is in= itialized. - -**/ -RETURN_STATUS -EFIAPI -LmceInitialize ( - IN UINTN ProcessorNumber, - IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, - IN VOID *ConfigData, OPTIONAL - IN BOOLEAN State - ) -{ - MSR_IA32_FEATURE_CONTROL_REGISTER *MsrRegister; - - ASSERT (ConfigData !=3D NULL); - MsrRegister =3D (MSR_IA32_FEATURE_CONTROL_REGISTER *) ConfigData; - if (MsrRegister[ProcessorNumber].Bits.Lock =3D=3D 0) { - CPU_REGISTER_TABLE_WRITE_FIELD ( - ProcessorNumber, - Msr, - MSR_IA32_FEATURE_CONTROL, - MSR_IA32_FEATURE_CONTROL_REGISTER, - Bits.LmceOn, - (State) ? 1 : 0 - ); - } - return RETURN_SUCCESS; -} --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel