Skip to content

Commit

Permalink
Apply the AES-GCM unroll8 optimisation to Microsoft Azure Cobalt 100
Browse files Browse the repository at this point in the history
Performance improvements range from 18% to 32%.

Change-Id: Ifb89eeac3c0625a582a25ff07cf7f9c9ec8f5ba6

Reviewed-by: Hugo Landau <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
(Merged from openssl#23651)
  • Loading branch information
tom-cosgrove-arm authored and t8m committed Feb 22, 2024
1 parent 1afb326 commit 11adf9a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crypto/arm_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ extern unsigned int OPENSSL_armv8_rsa_neonized;
# define ARM_CPU_IMP_ARM 0x41
# define HISI_CPU_IMP 0x48
# define ARM_CPU_IMP_APPLE 0x61
# define ARM_CPU_IMP_MICROSOFT 0x6D

# define ARM_CPU_PART_CORTEX_A72 0xD08
# define ARM_CPU_PART_N1 0xD0C
Expand All @@ -124,6 +125,8 @@ extern unsigned int OPENSSL_armv8_rsa_neonized;
# define APPLE_CPU_PART_M2_BLIZZARD_MAX 0x038
# define APPLE_CPU_PART_M2_AVALANCHE_MAX 0x039

# define MICROSOFT_CPU_PART_COBALT_100 0xD49

# define MIDR_PARTNUM_SHIFT 4
# define MIDR_PARTNUM_MASK (0xfffU << MIDR_PARTNUM_SHIFT)
# define MIDR_PARTNUM(midr) \
Expand Down
1 change: 1 addition & 0 deletions crypto/armcap.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ void OPENSSL_cpuid_setup(void)
}
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_MICROSOFT, MICROSOFT_CPU_PART_COBALT_100) ||
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;
Expand Down

0 comments on commit 11adf9a

Please sign in to comment.