From: "Liming Gao" <liming.gao@intel.com>
To: devel@edk2.groups.io
Cc: Jason Voelz <jason.voelz@intel.com>, Ray Ni <ray.ni@intel.com>
Subject: [Patch 2/2] UefiCpuPkg/CpuCommonFeaturesLib: SMXE bit of CR4 should set
Date: Mon, 23 Dec 2019 14:55:37 +0800 [thread overview]
Message-ID: <20191223065537.32468-3-liming.gao@intel.com> (raw)
In-Reply-To: <20191223065537.32468-1-liming.gao@intel.com>
From: Jason Voelz <jason.voelz@intel.com>
Add code to set SMXE in CR4 in the SmxInitialize flow when SMX is enabled.
Signed-off-by: Jason Voelz <jason.voelz@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
---
UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c b/UefiCpuPkg/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 = RETURN_UNSUPPORTED;
}
+ CPU_REGISTER_TABLE_WRITE_FIELD (
+ ProcessorNumber,
+ ControlRegister,
+ 4,
+ IA32_CR4,
+ Bits.SMXE,
+ (State) ? 1 : 0
+ )
+
CPU_REGISTER_TABLE_TEST_THEN_WRITE_FIELD (
ProcessorNumber,
Msr,
--
2.13.0.windows.1
next prev parent reply other threads:[~2019-12-23 6:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-23 6:55 [Patch 0/2] UefiCpuPkg/CpuCommonFeaturesLib: Set SMXE bit of CR4 when SMX is enabled Liming Gao
2019-12-23 6:55 ` [Patch 1/2] MdePkg BaseLib.h: Update IA32_CR4 strut to include all public fields Liming Gao
2020-01-08 14:12 ` Ni, Ray
2019-12-23 6:55 ` Liming Gao [this message]
2020-01-08 14:12 ` [Patch 2/2] UefiCpuPkg/CpuCommonFeaturesLib: SMXE bit of CR4 should set Ni, Ray
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191223065537.32468-3-liming.gao@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox