audk/UefiCpuPkg
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
..
Application/Cpuid UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
CpuDxe UefiCpuPkg/CpuDxe: prevent recursive calling of InitializePageTablePool 2018-10-26 10:30:34 +08:00
CpuFeatures UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
CpuIo2Dxe UefiCpuPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:52 +08:00
CpuIo2Smm UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
CpuIoPei UefiCpuPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:52 +08:00
CpuMpPei UefiCpuPkg/CpuMpPei: fix vs2012 build error 2018-09-26 10:20:33 +08:00
CpuS3DataDxe UefiCpuPkg/CpuS3DataDxe: Keep old data if value already existed. 2018-10-22 11:19:48 +08:00
Include UefiCpuPkg/RegisterCpuFeaturesLib.h: Add new dependence types. 2018-10-22 11:19:47 +08:00
Library UefiCpuPkg/CommonFeature: Always set FEATURE_CONTROL.Lock 2018-11-14 11:02:48 +08:00
PiSmmCommunication UefiCpuPkg PiSmmCommunicationSmm: Deprecate SMM Communication ACPI Table 2017-07-27 14:08:09 +08:00
PiSmmCpuDxeSmm UefiCpuPkg/PiSmmCpuDxeSmm: Separate semaphore container. 2018-11-11 10:02:47 +08:00
ResetVector UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00
SecCore UefiCpuPkg SecCore:Add a GUID removed previously 2018-09-26 08:39:22 +08:00
Universal/Acpi/S3Resume2Pei UefiCpuPkg/S3Resume2Pei: disable paging before creating new page table. 2018-10-15 08:36:40 +08:00
UefiCpuPkg.dec UefiCpuPkg: Update package version. 2018-01-22 19:23:56 +08:00
UefiCpuPkg.dsc UefiCpuPkg: Removing ipf which is no longer supported from edk2. 2018-06-29 16:19:52 +08:00
UefiCpuPkg.uni UefiCpuPkg/UefiCpuPkg.uni: Add missing string definition for new PCDs 2017-12-26 09:44:14 +08:00
UefiCpuPkgExtra.uni UefiCpuPkg: Clean up source files 2018-06-28 11:19:53 +08:00