diff options
author | Jason Voelz <jason.voelz@intel.com> | 2019-12-23 14:55:37 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-01-10 03:41:55 +0000 |
commit | 1f0d8096291651e6c20dbbc57d108321c1443563 (patch) | |
tree | 31cec397ee04b017011067e5150d340d1982c5b2 /UefiCpuPkg | |
parent | 859046e000beecae6903e3f2143ffbd9944c7ee4 (diff) | |
download | edk2-1f0d8096291651e6c20dbbc57d108321c1443563.tar.gz |
UefiCpuPkg/CpuCommonFeaturesLib: SMXE bit of CR4 should set
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>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r-- | UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c | 9 |
1 files changed, 9 insertions, 0 deletions
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,
|