Date: Sat, 21 Oct 2017 12:05:01 +0000 (UTC) From: Michal Meloun <mmel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324814 - in head/sys: arm/include arm64/include kern mips/include powerpc/include riscv/include sparc64/include sys x86/include Message-ID: <201710211205.v9LC512m032589@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mmel Date: Sat Oct 21 12:05:01 2017 New Revision: 324814 URL: https://svnweb.freebsd.org/changeset/base/324814 Log: Add AT_HWCAP2 ELF auxiliary vector. - allocate value for new AT_HWCAP2 auxiliary vector on all platforms. - expand 'struct sysentvec' by new 'u_long *sv_hwcap2', in exactly same way as for AT_HWCAP. MFC after: 1 month Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D12699 Modified: head/sys/arm/include/elf.h head/sys/arm64/include/elf.h head/sys/kern/imgact_elf.c head/sys/mips/include/elf.h head/sys/powerpc/include/elf.h head/sys/riscv/include/elf.h head/sys/sparc64/include/elf.h head/sys/sys/sysent.h head/sys/x86/include/elf.h Modified: head/sys/arm/include/elf.h ============================================================================== --- head/sys/arm/include/elf.h Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/arm/include/elf.h Sat Oct 21 12:05:01 2017 (r324814) @@ -86,8 +86,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ #define R_ARM_COUNT 33 /* Count of defined relocation types. */ Modified: head/sys/arm64/include/elf.h ============================================================================== --- head/sys/arm64/include/elf.h Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/arm64/include/elf.h Sat Oct 21 12:05:01 2017 (r324814) @@ -92,8 +92,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS64 Modified: head/sys/kern/imgact_elf.c ============================================================================== --- head/sys/kern/imgact_elf.c Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/kern/imgact_elf.c Sat Oct 21 12:05:01 2017 (r324814) @@ -1133,6 +1133,8 @@ __elfN(freebsd_fixup)(register_t **stack_base, struct imgp->sysent->sv_stackprot); if (imgp->sysent->sv_hwcap != NULL) AUXARGS_ENTRY(pos, AT_HWCAP, *imgp->sysent->sv_hwcap); + if (imgp->sysent->sv_hwcap2 != NULL) + AUXARGS_ENTRY(pos, AT_HWCAP2, *imgp->sysent->sv_hwcap2); AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); Modified: head/sys/mips/include/elf.h ============================================================================== --- head/sys/mips/include/elf.h Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/mips/include/elf.h Sat Oct 21 12:05:01 2017 (r324814) @@ -146,8 +146,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ #define ET_DYN_LOAD_ADDR 0x0120000 Modified: head/sys/powerpc/include/elf.h ============================================================================== --- head/sys/powerpc/include/elf.h Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/powerpc/include/elf.h Sat Oct 21 12:05:01 2017 (r324814) @@ -109,8 +109,9 @@ __ElfType(Auxinfo); #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* * Relocation types. Modified: head/sys/riscv/include/elf.h ============================================================================== --- head/sys/riscv/include/elf.h Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/riscv/include/elf.h Sat Oct 21 12:05:01 2017 (r324814) @@ -92,8 +92,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS64 Modified: head/sys/sparc64/include/elf.h ============================================================================== --- head/sys/sparc64/include/elf.h Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/sparc64/include/elf.h Sat Oct 21 12:05:01 2017 (r324814) @@ -94,8 +94,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #if __ELF_WORD_SIZE == 32 Modified: head/sys/sys/sysent.h ============================================================================== --- head/sys/sys/sysent.h Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/sys/sysent.h Sat Oct 21 12:05:01 2017 (r324814) @@ -130,6 +130,7 @@ struct sysentvec { void (*sv_thread_detach)(struct thread *); int (*sv_trap)(struct thread *); u_long *sv_hwcap; /* Value passed in AT_HWCAP. */ + u_long *sv_hwcap2; /* Value passed in AT_HWCAP2. */ }; #define SV_ILP32 0x000100 /* 32-bit executable. */ Modified: head/sys/x86/include/elf.h ============================================================================== --- head/sys/x86/include/elf.h Sat Oct 21 10:48:06 2017 (r324813) +++ head/sys/x86/include/elf.h Sat Oct 21 12:05:01 2017 (r324814) @@ -102,8 +102,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* * Relocation types. @@ -189,8 +190,9 @@ __ElfType(Auxinfo); #define AT_STACKPROT 23 /* Initial stack protection. */ #define AT_EHDRFLAGS 24 /* e_flags field from elf hdr */ #define AT_HWCAP 25 /* CPU feature flags. */ +#define AT_HWCAP2 26 /* CPU feature flags 2. */ -#define AT_COUNT 26 /* Count of defined aux entry types. */ +#define AT_COUNT 27 /* Count of defined aux entry types. */ /* * Relocation types.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710211205.v9LC512m032589>