Export powerpc CPU features for auxvec

FreeBSD exports the AT_HWCAP* auxvec items if provided by the ELF sysentvec
structure.  Add the CPU features to be exported, so user space can more
easily check for them without using the hw.cpu_features and hw.cpu_features2
sysctls.
This commit is contained in:
jhibbits 2018-04-21 15:15:47 +00:00
parent 334fa0aab4
commit fb63c578b3
2 changed files with 4 additions and 0 deletions

View File

@ -123,6 +123,8 @@ struct sysentvec elf32_freebsd_sysvec = {
.sv_schedtail = NULL,
.sv_thread_detach = NULL,
.sv_trap = NULL,
.sv_hwcap = &cpu_features,
.sv_hwcap2 = &cpu_features2,
};
INIT_SYSENTVEC(elf32_sysvec, &elf32_freebsd_sysvec);

View File

@ -88,6 +88,8 @@ struct sysentvec elf64_freebsd_sysvec_v1 = {
.sv_schedtail = NULL,
.sv_thread_detach = NULL,
.sv_trap = NULL,
.sv_hwcap = &cpu_features,
.sv_hwcap2 = &cpu_features2,
};
INIT_SYSENTVEC(elf64_sysvec_v1, &elf64_freebsd_sysvec_v1);