From 689670d288fbbba0719a49c5817227d49b7e8bf8 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Thu, 4 Apr 2024 21:20:18 -0400 Subject: [PATCH] lib/arm/cpu_features: detect dotprod support on Windows ARM64 --- lib/arm/cpu_features.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/arm/cpu_features.c b/lib/arm/cpu_features.c index 8a26a7c5..5c643529 100644 --- a/lib/arm/cpu_features.c +++ b/lib/arm/cpu_features.c @@ -179,7 +179,12 @@ static u32 query_arm_cpu_features(void) if (IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE)) features |= ARM_CPU_FEATURE_CRC32; - /* FIXME: detect SHA3 and DOTPROD support too. */ +#ifdef PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE + if (IsProcessorFeaturePresent(PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE)) + features |= ARM_CPU_FEATURE_DOTPROD; +#endif + + /* FIXME: detect SHA3 support too. */ return features; }