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>
This commit is contained in:
Jason Voelz 2019-12-23 14:55:37 +08:00 committed by mergify[bot]
parent 859046e000
commit 1f0d809629
1 changed files with 9 additions and 0 deletions

View File

@ -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,