summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
diff options
context:
space:
mode:
authorWu, Jiaxin <jiaxin.wu@intel.com>2022-07-29 14:25:55 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-08-31 04:23:55 +0000
commit76ec17526b7ebd0893f8e2e27ee4e4baf017eeef (patch)
tree68a28e839974e6bc02a21ce34a5efde8045794bb /UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
parent367604b2f49f1b7517756a4ecab426f5308ba7fb (diff)
downloadedk2-76ec17526b7ebd0893f8e2e27ee4e4baf017eeef.tar.gz
edk2-76ec17526b7ebd0893f8e2e27ee4e4baf017eeef.tar.bz2
edk2-76ec17526b7ebd0893f8e2e27ee4e4baf017eeef.zip
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>
Diffstat (limited to 'UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf')
-rw-r--r--UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf4
1 files changed, 4 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
index 35292dac31..7b5cef9700 100644
--- a/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
+++ b/UefiCpuPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.inf
@@ -35,3 +35,7 @@
[Pcd]
gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## SOMETIMES_CONSUMES
+
+[FeaturePcd]
+ gUefiCpuPkgTokenSpaceGuid.PcdSmrrEnable ## CONSUMES
+ gUefiCpuPkgTokenSpaceGuid.PcdSmmFeatureControlEnable ## CONSUMES