From 469a99b5c8886e2855ebf8f714f08501c55def77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Niew=C3=B6hner?= Date: Sun, 11 Oct 2020 16:15:04 +0200 Subject: cpu/intel/common: only lock AES-NI when supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a check to only lock AES-NI when AES is supported. Change-Id: Ia7ffd5393a3e972f461ff7991b9c5bd363712361 Signed-off-by: Michael Niewöhner Reviewed-on: https://review.coreboot.org/c/coreboot/+/46276 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') diff --git a/src/cpu/intel/common/common_init.c b/src/cpu/intel/common/common_init.c index f189c598ac..fc5360d001 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 (cpu_get_feature_flags_ecx() & CPUID_AES) + return; + /* Only run once per core as specified in the MSR datasheet */ if (intel_ht_sibling()) return; -- cgit v1.2.3