aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2023-09-22 16:20:17 +0000
committerAndrew Turner <andrew@FreeBSD.org>2023-09-22 17:15:14 +0000
commitd61f9bfb0e5c119c97a559f187b1e9c73077307b (patch)
tree126f4cc377760db28fd10f969cabe409919c017e
parent2f198d313b4894c1fc3649aa1e5ccfba2b6a2ef5 (diff)
downloadsrc-d61f9bfb0e5c119c97a559f187b1e9c73077307b.tar.gz
src-d61f9bfb0e5c119c97a559f187b1e9c73077307b.zip
arm64: Export HWCAP_CPUID
We have export the CPUID registers since 2018 but never set the HWCAP_CPUID flag to tell userspace it could use them. Fix this by setting it. Sponsored by: Arm Ltd
-rw-r--r--sys/arm64/arm64/identcpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
index e84ac338497b..5d23e1495dea 100644
--- a/sys/arm64/arm64/identcpu.c
+++ b/sys/arm64/arm64/identcpu.c
@@ -2203,6 +2203,8 @@ identify_cpu_sysinit(void *dummy __unused)
/* Find the values to export to userspace as AT_HWCAP and AT_HWCAP2 */
parse_cpu_features();
+ /* We export the CPUID registers */
+ elf_hwcap |= HWCAP_CPUID;
#ifdef COMPAT_FREEBSD32
/* Set the default caps and any that need to check multiple fields */