audk/UefiCpuPkg/Library/CpuCommonFeaturesLib
Ruiyu Ni 8558838922 UefiCpuPkg/CommonFeature: Always set FEATURE_CONTROL.Lock
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1305

The patch reverts commit 1ed6498c4a
* UefiCpuPkg/CommonFeature: Skip locking when the feature is disabled

FEATURE_CONTROL.Lock bit is controlled by feature
CPU_FEATURE_LOCK_FEATURE_CONTROL_REGISTER. The commit 1ed649 fixes
a bug that when the feature is disabled, the Lock bit is cleared.
But it's a security hole if the bit is cleared when booting OS.
We can argue that platform needs to make sure the value
of PcdCpuFeaturesUserConfiguration should be set properly to make
sure feature CPU_FEATURE_LOCK_FEATURE_CONTROL_REGISTER is enabled.

But it's better to guarantee this in the generic core code.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
2018-11-14 11:02:48 +08:00
..
Aesni.c UefiCpuPkg: Update AESNI support checking logic 2017-12-27 15:31:34 +08:00
C1e.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
ClockModulation.c UefiCpuPkg/FeaturesLib: Fix Haswell CPU hang with 50% throttling 2018-02-08 13:49:06 +08:00
CpuCommonFeatures.h UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
CpuCommonFeaturesLib.c UefiCpuPkg: Enable Processor Trace feature. 2017-08-04 12:26:44 +08:00
CpuCommonFeaturesLib.inf UefiCpuPkg/CpuCommonFeaturesLib: Remove an unused PCD 2018-09-29 16:00:39 +08:00
CpuCommonFeaturesLib.uni UefiCpuPkg/CpuFeatures: Change files format to DOS 2017-04-05 16:33:16 +08:00
Eist.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
ExecuteDisable.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
FastStrings.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
FeatureControl.c UefiCpuPkg/CommonFeature: Always set FEATURE_CONTROL.Lock 2018-11-14 11:02:48 +08:00
LimitCpuIdMaxval.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
MachineCheck.c UefiCpuPkg/CpuCommonFeaturesLib: Remove white space at line end. 2018-10-26 11:28:36 +08:00
MonitorMwait.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
PendingBreak.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
Ppin.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
ProcTrace.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00
X2Apic.c UefiCpuPkg/CpuCommonFeaturesLib: Register MSR base on scope Info. 2018-10-22 11:19:49 +08:00