aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/intel/common/common_init.c
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-10-11 16:59:13 +0200
committerNico Huber <nico.h@gmx.de>2020-10-19 21:02:51 +0000
commit2ffd2198863fe8e971b56fc146339cc4dbd56295 (patch)
tree9a692c30d29b2b811a954738ad34f859561079b9 /src/cpu/intel/common/common_init.c
parent469a99b5c8886e2855ebf8f714f08501c55def77 (diff)
cpu/intel/common: add a Kconfig to control AES-NI locking
Add a Kconfig to be able to disable locking of AES-NI for e.g debugging, testing, ... Change-Id: I4eaf8d7d187188ee6e78741b1ceb837c40c2c402 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46277 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/cpu/intel/common/common_init.c')
-rw-r--r--src/cpu/intel/common/common_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cpu/intel/common/common_init.c b/src/cpu/intel/common/common_init.c
index fc5360d001..45680146ad 100644
--- a/src/cpu/intel/common/common_init.c
+++ b/src/cpu/intel/common/common_init.c
@@ -270,6 +270,9 @@ void set_aesni_lock(void)
{
msr_t msr;
+ if (!CONFIG(SET_MSR_AESNI_LOCK_BIT))
+ return;
+
if (cpu_get_feature_flags_ecx() & CPUID_AES)
return;