UefiCpuPkg: Add PCD to control SMRR enable & SmmFeatureControl support

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3962

Two SMM variables (mSmrrSupported & mSmmFeatureControlSupported) are global
variables, they control whether the SMRR and SMM Feature Control MSR will
be restored respectively.
To avoid the TOCTOU, add PCD to control SMRR & SmmFeatureControl enable.

Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
Wu, Jiaxin
2022-07-29 14:25:55 +08:00
committed by mergify[bot]
parent 367604b2f4
commit 76ec17526b
6 changed files with 48 additions and 23 deletions

View File

@@ -158,6 +158,18 @@
# @Prompt Lock SMM Feature Control MSR.
gUefiCpuPkgTokenSpaceGuid.PcdCpuSmmFeatureControlMsrLock|TRUE|BOOLEAN|0x3213210B
## Indicates if SMRR will be enabled.<BR><BR>
# TRUE - SMRR will be enabled.<BR>
# FALSE - SMRR will not be enabled.<BR>
# @Prompt Enable SMRR.
gUefiCpuPkgTokenSpaceGuid.PcdSmrrEnable|TRUE|BOOLEAN|0x3213210D
## Indicates if SmmFeatureControl will be enabled.<BR><BR>
# TRUE - SmmFeatureControl will be enabled.<BR>
# FALSE - SmmFeatureControl will not be enabled.<BR>
# @Prompt Support SmmFeatureControl.
gUefiCpuPkgTokenSpaceGuid.PcdSmmFeatureControlEnable|TRUE|BOOLEAN|0x32132110
[PcdsFixedAtBuild]
## List of exception vectors which need switching stack.
# This PCD will only take into effect if PcdCpuStackGuard is enabled.