aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorMichael Niewöhner <foss@mniewoehner.de>2020-10-11 16:15:04 +0200
committerNico Huber <nico.h@gmx.de>2020-10-19 21:02:04 +0000
commit469a99b5c8886e2855ebf8f714f08501c55def77 (patch)
tree9a217bdc4479ab215802f924977cc1e55a98daf9 /src/cpu
parent13b9149bab28c24798507b152c4d212dd9512175 (diff)
cpu/intel/common: only lock AES-NI when supported
Add a check to only lock AES-NI when AES is supported. Change-Id: Ia7ffd5393a3e972f461ff7991b9c5bd363712361 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46276 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')
-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 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;