]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg/CommonFeature: Skip locking when the feature is disabled
authorRuiyu Ni <ruiyu.ni@intel.com>
Tue, 6 Nov 2018 09:04:39 +0000 (17:04 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Wed, 7 Nov 2018 09:05:49 +0000 (17:05 +0800)
commit1ed6498c4a0210204bf4b95cc0c0cd6623ad6a0b
treefa99ca006621a77cb57bfec65a3d7bb9d6b9dc15
parent328409ce8de7f318ee9c929b64302bd361cd1dbd
UefiCpuPkg/CommonFeature: Skip locking when the feature is disabled

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1305

Today's code unconditionally sets the IA32_FEATURE_CONTROL.Lock to 1
no matter the feature is enabled or not.

The patch fixes this issue by only setting the Lock bit to 1 when
the feature is enabled.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
UefiCpuPkg/Library/CpuCommonFeaturesLib/FeatureControl.c