git: 15ef78831eb0 - stable/14 - arm64: Export HWCAP_CPUID

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Mon, 19 Feb 2024 16:45:01 UTC
The branch stable/14 has been updated by andrew:

URL: https://cgit.FreeBSD.org/src/commit/?id=15ef78831eb01a0e42317f7b6f03a227fae89e9d

commit 15ef78831eb01a0e42317f7b6f03a227fae89e9d
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-09-22 16:20:17 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2024-02-19 13:08:35 +0000

    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
    
    (cherry picked from commit d61f9bfb0e5c119c97a559f187b1e9c73077307b)
---
 sys/arm64/arm64/identcpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c
index 1e9ff32754f0..4202cbe7878f 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 */