From nobody Tue Nov 26 14:50:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+52495+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52495+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1577084163; cv=none; d=zohomail.com; s=zohoarc; b=H1SJBUrJmMTfoGDn4rW+GxPyZQiPD8yWVdry6lSM9ATK79bvJn+uYXgD4Ujq/QRrwpI7NzdqV6FIR8Gcc1yvNuMfGBn74nDKdzflI8HgIiev7/kiwl9wpK24YCbXkBCnsS5gH6g/5zG7qiDSBgejnVoGGi6kkrZe/DC8B5DrOQo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1577084163; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=ERJR/6bJoBbOi11pPpjuU3LLlRXxHIB3wwoPqKY0jyw=; b=JgphqC0H6Pk4EE1iRjoU1AgnElmKH20VP2Drd5AWpccHptOlKWIuMiMAAtinOhRktoqbKkGAhpzmWb850OdQw1P0c8zm15i29Sob+thvdSjwspoQC6LzgU/PhesiTHRkT6H+56oZkYzlXMIsQj3o82hkbUzYbJqmxlK3uF+ZTUk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52495+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 15770841632301019.0213331068915; Sun, 22 Dec 2019 22:56:03 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id VCkRYY1788612xS2DHWxjSWb; Sun, 22 Dec 2019 22:56:02 -0800 X-Received: from mga07.intel.com (mga07.intel.com []) by mx.groups.io with SMTP id smtpd.web12.410.1577084160583910651 for ; Sun, 22 Dec 2019 22:56:02 -0800 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Dec 2019 22:56:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,346,1571727600"; d="scan'208";a="211454629" X-Received: from lgao4-mobl1.ccr.corp.intel.com ([10.255.29.23]) by orsmga008.jf.intel.com with ESMTP; 22 Dec 2019 22:56:00 -0800 From: "Liming Gao" To: devel@edk2.groups.io Cc: Jason Voelz , Ray Ni Subject: [edk2-devel] [Patch 2/2] UefiCpuPkg/CpuCommonFeaturesLib: SMXE bit of CR4 should set Date: Mon, 23 Dec 2019 14:55:37 +0800 Message-Id: <20191223065537.32468-3-liming.gao@intel.com> In-Reply-To: <20191223065537.32468-1-liming.gao@intel.com> References: <20191223065537.32468-1-liming.gao@intel.com> 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,liming.gao@intel.com X-Gm-Message-State: LJhAGOk4QJXOZdMzSr368QJmx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1577084162; bh=f6XE8sN+/ZaE4EVo3LoqvyV34gYjQjf9kkNfzb6d0JQ=; h=Cc:Date:From:Reply-To:Subject:To; b=HgTfn9OvTvjFvYZ/kbpuhfgstRhC2/wFn5avTM3MzIrmH+n6OputXTMfLSTiWw7khl1 FAk0ABdFavnvQW2TlRI7MubUk+jSzfVy9TvEq+QuGO/DGNbLFxjmJblOTEY1stqTjx6Aq aEh7m0pQDy21+fIvS4UyBp54RaZN7J+XXlA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Jason Voelz Add code to set SMXE in CR4 in the SmxInitialize flow when SMX is enabled. Signed-off-by: Jason Voelz Cc: Ray Ni Reviewed-by: Ray Ni --- UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c b/Uef= iCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c index 38d3f53f56..b4474d2fab 100644 --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c @@ -240,6 +240,15 @@ SmxInitialize ( Status =3D RETURN_UNSUPPORTED; } =20 + CPU_REGISTER_TABLE_WRITE_FIELD ( + ProcessorNumber, + ControlRegister, + 4, + IA32_CR4, + Bits.SMXE, + (State) ? 1 : 0 + ) + CPU_REGISTER_TABLE_TEST_THEN_WRITE_FIELD ( ProcessorNumber, Msr, --=20 2.13.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 (#52495): https://edk2.groups.io/g/devel/message/52495 Mute This Topic: https://groups.io/mt/69226211/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-