From nobody Tue May 7 00:45:58 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+41187+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41187+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1558495597; cv=none; d=zoho.com; s=zohoarc; b=km4hc6dj9VnhYe6OkPfCIFRi/8bAI0pcCuv04MLVgSrQ12gi0QXEt+DHXFQz97FJ+4SNVVO1bTrhLMyg/NHEyX+I7/rvahL2x4v/YOfECZO/zDFcVz2RzvFt7XM2jz+0EmdVkK+w/DzuhnZKWr1pHRbucZ5vVvTNwEEbYchBIw0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558495597; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=e6xQ/elL4PqMkAcqg6dMflDize/UWpkDf+G7BHP0//c=; b=VVxaKbT5DJoPHAEQwd2rwtfH4f9hMYoPwFtzcNC+p6tnSMT3UaMl2c3iW1gLgyV32PeC3cYpzh2IfLHWDXs9S3Yc6DHi8U2yq3O7+egwlF9Yaz9/yGKzJKLOOrAx3k+6LBI86ElD0THQ3/rupRONy0UNIZ69F7KVf5xp+nVCd5g= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+41187+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1558495597650221.04228441317616; Tue, 21 May 2019 20:26:37 -0700 (PDT) Return-Path: X-Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by groups.io with SMTP; Tue, 21 May 2019 20:26:36 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2019 20:26:35 -0700 X-ExtLoop1: 1 X-Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.82]) by fmsmga008.fm.intel.com with ESMTP; 21 May 2019 20:26:34 -0700 From: "Zeng, Star" To: devel@edk2.groups.io Cc: Star Zeng , Laszlo Ersek , Eric Dong , Ruiyu Ni , Chandana Kumar , Kevin Li Subject: [edk2-devel] [PATCH] UefiCpuPkg CpuCommFeaturesLib: Fix ASSERT if LMCE is supported Date: Wed, 22 May 2019 11:26:32 +0800 Message-Id: <20190522032632.89416-1-star.zeng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,star.zeng@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1558495597; bh=9v8S878nn1dzLbUSjE9dP7sWvhaO3WWoauFawABkPjU=; h=Cc:Date:From:Reply-To:Subject:To; b=ZvfxsMDOKPghjfFkP+RCaXp8iO27fTH0cQjNY9VFHTBZP/3gj0hafqMNe6lv6nV2sW3 LCgU3d9/4fAcDxUr3XDhPyzctCiXaXV6NX9YB5PDpQ6zW+lsVU8mZnr2xnK5i3Ka2r1dO Qo19g7BUnOR1mqucESXz9asYTKdKAl8Cp88= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1829 There will be ASSERT if LMCE is supported as below. DXE_ASSERT!: [CpuFeaturesDxe] XXX\UefiCpuPkg\Library\CpuCommonFeaturesLib\MachineCheck.c (342): ConfigData !=3D ((void *) 0) The code should get Config Data and FeatureControlGetConfigData could be used. BTW: A typo in LmceInitialize is also fixed. Change-Id: I32b63ba649fc2977e155181a6263009e359742ed Cc: Laszlo Ersek Cc: Eric Dong Cc: Ruiyu Ni Cc: Chandana Kumar Cc: Kevin Li Signed-off-by: Star Zeng --- UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.c | 2 +- UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.c= b/UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.c index 738b57dc87f9..9ddc6ce9d476 100644 --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.c +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/CpuCommonFeaturesLib.c @@ -214,7 +214,7 @@ CpuCommonFeaturesLibConstructor ( if (IsCpuFeatureSupported (CPU_FEATURE_LMCE)) { Status =3D RegisterCpuFeature ( "LMCE", - NULL, + FeatureControlGetConfigData, LmceSupport, LmceInitialize, CPU_FEATURE_LMCE, diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c b/UefiC= puPkg/Library/CpuCommonFeaturesLib/MachineCheck.c index 9ee559130080..2528e0044ecb 100644 --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/MachineCheck.c @@ -322,7 +322,7 @@ LmceInitialize ( MSR_IA32_FEATURE_CONTROL_REGISTER *MsrRegister; =20 // - // The scope of FastStrings bit in the MSR_IA32_MISC_ENABLE is core for = below processor type, only program + // The scope of LcmeOn bit in the MSR_IA32_MISC_ENABLE is core for below= processor type, only program // MSR_IA32_MISC_ENABLE for thread 0 in each core. // if (IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayMod= el) || --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#41187): https://edk2.groups.io/g/devel/message/41187 Mute This Topic: https://groups.io/mt/31716359/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-