From 2ffd2198863fe8e971b56fc146339cc4dbd56295 Mon Sep 17 00:00:00 2001 From: Michael Niewöhner Date: Sun, 11 Oct 2020 16:59:13 +0200 Subject: cpu/intel/common: add a Kconfig to control AES-NI locking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46277 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Nico Huber --- src/cpu/intel/common/common_init.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/cpu/intel/common/common_init.c') 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; -- cgit v1.2.3