From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 2EA0121EA35A0 for ; Mon, 4 Sep 2017 20:16:41 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 04 Sep 2017 20:19:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,477,1498546800"; d="scan'208";a="897093731" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 04 Sep 2017 20:19:29 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 20:19:29 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 4 Sep 2017 20:19:28 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.117]) by shsmsx102.ccr.corp.intel.com ([169.254.2.39]) with mapi id 14.03.0319.002; Tue, 5 Sep 2017 11:19:25 +0800 From: "Ni, Ruiyu" To: "Dong, Eric" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] UefiCpuPkg/Lmce.c Remove useless file. Thread-Index: AQHTIudpCtWAi+7BIkeAmXKGhtwktqKlpXGg Date: Tue, 5 Sep 2017 03:19:24 +0000 Deferred-Delivery: Tue, 5 Sep 2017 03:19:00 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BA2391C@SHSMSX104.ccr.corp.intel.com> References: <1504245525-8300-1-git-send-email-eric.dong@intel.com> In-Reply-To: <1504245525-8300-1-git-send-email-eric.dong@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: , X-List-Received-Date: Tue, 05 Sep 2017 03:16:41 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: Dong, Eric > Sent: Friday, September 1, 2017 1:59 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu > Subject: [Patch] UefiCpuPkg/Lmce.c Remove useless file. >=20 > Merge the code to MachineCheck.c file, remove this file. >=20 > Cc: Ruiyu Ni > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Eric Dong > --- > UefiCpuPkg/Library/CpuCommonFeaturesLib/Lmce.c | 97 --------------------= -- > ---- > 1 file changed, 97 deletions(-) > delete mode 100644 UefiCpuPkg/Library/CpuCommonFeaturesLib/Lmce.c >=20 > diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/Lmce.c > b/UefiCpuPkg/Library/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 = BSD > License > - which accompanies this distribution. The full text of the license may= be > 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 IMPLIED. > - > -**/ > - > -#include "CpuCommonFeatures.h" > - > -/** > - Detects if Local machine check exception feature supported on current > - processor. > - > - @param[in] ProcessorNumber The index of the CPU executing this > function. > - @param[in] CpuInfo A pointer to the > REGISTER_CPU_FEATURE_INFORMATION > - structure for the CPU executing this func= tion. > - @param[in] ConfigData A pointer to the configuration buffer ret= urned > - by CPU_FEATURE_GET_CONFIG_DATA. NULL if > - CPU_FEATURE_GET_CONFIG_DATA was not provi= ded in > - RegisterCpuFeature(). > - > - @retval TRUE Local machine check exception feature is supported. > - @retval FALSE Local machine check exception feature is not supporte= d. > - > - @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 > function. > - @param[in] CpuInfo A pointer to the > REGISTER_CPU_FEATURE_INFORMATION > - structure for the CPU executing this func= tion. > - @param[in] ConfigData A pointer to the configuration buffer ret= urned > - by CPU_FEATURE_GET_CONFIG_DATA. NULL if > - CPU_FEATURE_GET_CONFIG_DATA was not provi= ded in > - RegisterCpuFeature(). > - @param[in] State If TRUE, then the Local machine check exc= eption > - feature must be enabled. > - If FALSE, then the Local machine check ex= ception > - feature must be disabled. > - > - @retval RETURN_SUCCESS Local machine check exception feature is > initialized. > - > -**/ > -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; > -} > -- > 2.7.0.windows.1