diff --git a/crypto/fipsmodule/cpucap/cpu_aarch64_apple.c b/crypto/fipsmodule/cpucap/cpu_aarch64_apple.c index c8966d0ef7..6bf10d37fc 100644 --- a/crypto/fipsmodule/cpucap/cpu_aarch64_apple.c +++ b/crypto/fipsmodule/cpucap/cpu_aarch64_apple.c @@ -95,8 +95,8 @@ void OPENSSL_cpuid_setup(void) { OPENSSL_armcap_P |= ARMV8_SHA3; } - if (is_brand("Apple M1")) { - OPENSSL_armcap_P |= ARMV8_APPLE_M1; + if (is_brand("Apple M")) { + OPENSSL_armcap_P |= ARMV8_APPLE_M; } if (has_hw_feature("hw.optional.arm.FEAT_DIT")) { diff --git a/crypto/fipsmodule/cpucap/internal.h b/crypto/fipsmodule/cpucap/internal.h index a2724c5092..784698a873 100644 --- a/crypto/fipsmodule/cpucap/internal.h +++ b/crypto/fipsmodule/cpucap/internal.h @@ -243,13 +243,13 @@ OPENSSL_INLINE int CRYPTO_is_ARMv8_GCM_8x_capable(void) { return ((OPENSSL_armcap_P & ARMV8_SHA3) != 0 && ((OPENSSL_armcap_P & ARMV8_NEOVERSE_V1) != 0 || (OPENSSL_armcap_P & ARMV8_NEOVERSE_V2) != 0 || - (OPENSSL_armcap_P & ARMV8_APPLE_M1) != 0)); + (OPENSSL_armcap_P & ARMV8_APPLE_M) != 0)); } OPENSSL_INLINE int CRYPTO_is_ARMv8_wide_multiplier_capable(void) { return (OPENSSL_armcap_P & ARMV8_NEOVERSE_V1) != 0 || (OPENSSL_armcap_P & ARMV8_NEOVERSE_V2) != 0 || - (OPENSSL_armcap_P & ARMV8_APPLE_M1) != 0; + (OPENSSL_armcap_P & ARMV8_APPLE_M) != 0; } OPENSSL_INLINE int CRYPTO_is_ARMv8_DIT_capable(void) { diff --git a/include/openssl/arm_arch.h b/include/openssl/arm_arch.h index 73c63ae041..b770f964d8 100644 --- a/include/openssl/arm_arch.h +++ b/include/openssl/arm_arch.h @@ -86,7 +86,7 @@ // high unrolling factor of AES-GCM and other algorithms that leverage a // wide crypto pipeline and fast multiplier. #define ARMV8_NEOVERSE_V1 (1 << 12) -#define ARMV8_APPLE_M1 (1 << 13) +#define ARMV8_APPLE_M (1 << 13) #define ARMV8_NEOVERSE_V2 (1 << 14) // ARMV8_DIT indicates support for the Data-Independent Timing (DIT) flag.