Skip to content

Commit

Permalink
Fix other platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Jul 1, 2024
1 parent 3e90aab commit abe2889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/fipsmodule/cpucap/cpu_arm_freebsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ void OPENSSL_cpuid_setup(void) {
// left at zero. The rest of this function will then gracefully report
// the features are absent.
elf_aux_info(AT_HWCAP, &hwcap, sizeof(hwcap));
#if defined(AT_HWCAP2)
elf_aux_info(AT_HWCAP2, &hwcap2, sizeof(hwcap2));
#endif

// Matching OpenSSL, only report other features if NEON is present.
if (hwcap & HWCAP_NEON) {
Expand Down
4 changes: 4 additions & 0 deletions crypto/fipsmodule/cpucap/cpu_ppc64le.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ static void handle_cpu_env(unsigned long *out, const char *in) {
extern uint8_t OPENSSL_cpucap_initialized;

void OPENSSL_cpuid_setup(void) {
#if defined(AT_HWCAP2)
OPENSSL_ppc64le_hwcap2 = getauxval(AT_HWCAP2);
#else
OPENSSL_ppc64le_hwcap2 = 0;
#endif
OPENSSL_cpucap_initialized = 1;

// OPENSSL_ppccap is a 64-bit hex string which may start with "0x".
Expand Down

0 comments on commit abe2889

Please sign in to comment.