diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -711,6 +711,8 @@ .sv_trap = linux_vsyscall, .sv_hwcap = NULL, .sv_hwcap2 = NULL, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -811,6 +811,8 @@ .sv_trap = NULL, .sv_hwcap = NULL, .sv_hwcap2 = NULL, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -97,6 +97,8 @@ .sv_trap = NULL, .sv_hwcap = &elf_hwcap, .sv_hwcap2 = &elf_hwcap2, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec_old = exec_onexec_old, .sv_onexit = exit_onexit, .sv_regset_begin = SET_BEGIN(__elfN(regset)), diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -134,6 +134,8 @@ .sv_trap = NULL, .sv_hwcap = &elf32_hwcap, .sv_hwcap2 = &elf32_hwcap2, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec_old = exec_onexec_old, .sv_onexit = exit_onexit, .sv_regset_begin = SET_BEGIN(__elfN(regset)), diff --git a/sys/arm64/arm64/elf_machdep.c b/sys/arm64/arm64/elf_machdep.c --- a/sys/arm64/arm64/elf_machdep.c +++ b/sys/arm64/arm64/elf_machdep.c @@ -101,6 +101,8 @@ .sv_trap = NULL, .sv_hwcap = &elf_hwcap, .sv_hwcap2 = &elf_hwcap2, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec_old = exec_onexec_old, .sv_protect = arm64_exec_protect, .sv_onexit = exit_onexit, diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -458,6 +458,8 @@ .sv_trap = NULL, .sv_hwcap = &linux_elf_hwcap, .sv_hwcap2 = &linux_elf_hwcap2, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, diff --git a/sys/compat/linux/linux_misc.h b/sys/compat/linux/linux_misc.h --- a/sys/compat/linux/linux_misc.h +++ b/sys/compat/linux/linux_misc.h @@ -85,7 +85,9 @@ * differ from AT_PLATFORM. */ #define LINUX_AT_RANDOM 25 /* address of random bytes */ -#define LINUX_AT_HWCAP2 26 /* CPU capabilities, second part */ +#define LINUX_AT_HWCAP2 26 /* CPU capabilities */ +#define LINUX_AT_HWCAP3 29 /* CPU capabilities */ +#define LINUX_AT_HWCAP4 30 /* CPU capabilities */ #define LINUX_AT_EXECFN 31 /* filename of program */ #define LINUX_AT_SYSINFO 32 /* vsyscall */ #define LINUX_AT_SYSINFO_EHDR 33 /* vdso header */ diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -606,6 +606,8 @@ .sv_trap = NULL, .sv_hwcap = NULL, .sv_hwcap2 = NULL, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, @@ -650,6 +652,8 @@ .sv_trap = NULL, .sv_hwcap = NULL, .sv_hwcap2 = NULL, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec = linux_on_exec_vmspace, .sv_onexit = linux_on_exit, .sv_ontdexit = linux_thread_dtor, diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1487,6 +1487,10 @@ AUXARGS_ENTRY(pos, AT_HWCAP, *imgp->sysent->sv_hwcap); if (imgp->sysent->sv_hwcap2 != NULL) AUXARGS_ENTRY(pos, AT_HWCAP2, *imgp->sysent->sv_hwcap2); + if (imgp->sysent->sv_hwcap3 != NULL) + AUXARGS_ENTRY(pos, AT_HWCAP3, *imgp->sysent->sv_hwcap3); + if (imgp->sysent->sv_hwcap4 != NULL) + AUXARGS_ENTRY(pos, AT_HWCAP4, *imgp->sysent->sv_hwcap4); bsdflags = 0; bsdflags |= __elfN(sigfastblock) ? ELF_BSDF_SIGFASTBLK : 0; oc = atomic_load_int(&vm_overcommit); diff --git a/sys/powerpc/powerpc/elf32_machdep.c b/sys/powerpc/powerpc/elf32_machdep.c --- a/sys/powerpc/powerpc/elf32_machdep.c +++ b/sys/powerpc/powerpc/elf32_machdep.c @@ -134,6 +134,8 @@ .sv_trap = NULL, .sv_hwcap = &cpu_features, .sv_hwcap2 = &cpu_features2, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec_old = exec_onexec_old, .sv_onexit = exit_onexit, .sv_regset_begin = SET_BEGIN(__elfN(regset)), diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -97,6 +97,8 @@ .sv_trap = NULL, .sv_hwcap = &cpu_features, .sv_hwcap2 = &cpu_features2, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec_old = exec_onexec_old, .sv_onexit = exit_onexit, .sv_regset_begin = SET_BEGIN(__elfN(regset)), @@ -139,6 +141,8 @@ .sv_trap = NULL, .sv_hwcap = &cpu_features, .sv_hwcap2 = &cpu_features2, + .sv_hwcap3 = NULL, + .sv_hwcap4 = NULL, .sv_onexec_old = exec_onexec_old, .sv_onexit = exit_onexit, .sv_regset_begin = SET_BEGIN(__elfN(regset)), diff --git a/sys/powerpc/powerpc/elf_common.c b/sys/powerpc/powerpc/elf_common.c --- a/sys/powerpc/powerpc/elf_common.c +++ b/sys/powerpc/powerpc/elf_common.c @@ -93,6 +93,7 @@ AUXARGS_ENTRY(pos, AT_OLD_HWCAP, *imgp->sysent->sv_hwcap); if (imgp->sysent->sv_hwcap2 != NULL) AUXARGS_ENTRY(pos, AT_OLD_HWCAP2, *imgp->sysent->sv_hwcap2); + if (imgp->sysent->sv_hwcap3 != NULL) AUXARGS_ENTRY(pos, AT_OLD_NULL, 0); free(imgp->auxargs, M_TEMP); diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -1015,8 +1015,10 @@ #define AT_USRSTACKBASE 35 /* Top of user stack */ #define AT_USRSTACKLIM 36 /* Grow limit of user stack */ #define AT_CHERI_STATS 37 /* Reserved */ +#define AT_HWCAP3 38 /* CPU feature flags 3. */ +#define AT_HWCAP4 39 /* CPU feature flags 4. */ -#define AT_COUNT 38 /* Count of defined aux entry types. */ +#define AT_COUNT 40 /* Count of defined aux entry types. */ /* * Relocation types. diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -145,6 +145,8 @@ int (*sv_trap)(struct thread *); u_long *sv_hwcap; /* Value passed in AT_HWCAP. */ u_long *sv_hwcap2; /* Value passed in AT_HWCAP2. */ + u_long *sv_hwcap3; /* Value passed in AT_HWCAP3. */ + u_long *sv_hwcap4; /* Value passed in AT_HWCAP4. */ const char *(*sv_machine_arch)(struct proc *); vm_offset_t sv_fxrng_gen_offset; void (*sv_onexec_old)(struct thread *td);