diff options
author | Jeff Fan <jeff.fan@intel.com> | 2015-11-20 05:19:55 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-11-20 05:19:55 +0000 |
commit | 181abae03616d46ffe577a8fab09b087ea3df218 (patch) | |
tree | 113cfadc676081b1f63e9c710516cf7a79f4ee5e /UefiCpuPkg/Library/CpuExceptionHandlerLib | |
parent | b787ece3293b19f7f340ddfe2070d020beb0a6fc (diff) | |
download | edk2-platforms-181abae03616d46ffe577a8fab09b087ea3df218.tar.xz |
UefiCpuPkg/SmmFeatureLib: Check SmmFeatureControl by Code_Access_Chk
Bit SMM_Code_Access_Chk (SMM-RO) in MSR_SMM_MCA_CAP is defined in SDM.
If set to 1 indicates that the SMM code access restriction is supported and the
MSR_SMM_FEATURE_CONTROL is supported.
If this bit is not set, we needn't to access register SmmFetureControl.
Otherwise, #GP exception may happen.
We need to check if SmmFeatureControl support or not by checking
SMM_Code_Access_Chk (SMM-RO) in MSR_SMM_MCA_CAP.
Because MSR_SMM_MCA_CAP is SMM-RO register, we should move this check from
SmmCpuFeaturesLibConstructor (non-SMM) to SmmCpuFeaturesInitializeProcessor
(SMM).
(Sync patch r18906 from main trunk.)
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@18913 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/Library/CpuExceptionHandlerLib')
0 files changed, 0 insertions, 0 deletions