audk/UefiCpuPkg/Library
Jeff Fan 4ab4e20f1a 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).

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/trunk/edk2@18906 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-20 01:23:52 +00:00
..
BaseUefiCpuLib UefiCpuPkg: Convert non DOS format files to DOS format 2014-09-03 08:48:53 +00:00
BaseXApicLib UefiCpuPkg: LocalApicLib: Add API to set SoftwareEnable bit 2015-10-30 17:53:31 +00:00
BaseXApicX2ApicLib UefiCpuPkg: LocalApicLib: Add API to set SoftwareEnable bit 2015-10-30 17:53:31 +00:00
CpuExceptionHandlerLib UefiCpuPkg/Library/CpuExceptionHandlerLib: Add exception type decoder 2015-07-08 05:45:10 +00:00
MtrrLib UefiCpuPkg/MtrrLib: MtrrValidBitsMask and MtrrValidAddressMask wrong 2015-09-05 02:07:02 +00:00
PlatformSecLibNull UefiCpuPkg: Add PlatformSecLib 2015-10-19 19:09:56 +00:00
SecPeiDxeTimerLibUefiCpu UefiCpuPkg: Add ASSERT to handle local APIC not config properly 2015-10-09 07:04:00 +00:00
SmmCpuFeaturesLib UefiCpuPkg/SmmFeatureLib: Check SmmFeatureControl by Code_Access_Chk 2015-11-20 01:23:52 +00:00
SmmCpuPlatformHookLibNull UefiCpuPkg: Add SmmCpuPlatformHookLib 2015-10-19 19:11:15 +00:00