diff options
-rw-r--r-- | crypto/arm_arch.h | 1 | ||||
-rw-r--r-- | crypto/armcap.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/crypto/arm_arch.h b/crypto/arm_arch.h index a77a7bacb5..cc5cc5ba49 100644 --- a/crypto/arm_arch.h +++ b/crypto/arm_arch.h @@ -104,6 +104,7 @@ extern unsigned int OPENSSL_armv8_rsa_neonized; # define ARM_CPU_PART_V1 0xD40 # define ARM_CPU_PART_N2 0xD49 # define HISI_CPU_PART_KP920 0xD01 +# define ARM_CPU_PART_V2 0xD4F # define MIDR_PARTNUM_SHIFT 4 # define MIDR_PARTNUM_MASK (0xfffU << MIDR_PARTNUM_SHIFT) diff --git a/crypto/armcap.c b/crypto/armcap.c index 68f735baec..01b3b32534 100644 --- a/crypto/armcap.c +++ b/crypto/armcap.c @@ -400,7 +400,8 @@ void OPENSSL_cpuid_setup(void) OPENSSL_armv8_rsa_neonized = 1; } if ((MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_V1) || - MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_N2)) && + MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_N2) || + MIDR_IS_CPU_MODEL(OPENSSL_arm_midr, ARM_CPU_IMP_ARM, ARM_CPU_PART_V2)) && (OPENSSL_armcap_P & ARMV8_SHA3)) OPENSSL_armcap_P |= ARMV8_UNROLL8_EOR3; # endif |