Index: Makefile =================================================================== --- Makefile +++ Makefile @@ -241,7 +241,7 @@ _TARGET_ARCH= ${TARGET:S/pc98/i386/:S/arm64/aarch64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/} +_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v[67])?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/riscv64/riscv/} .endif .if defined(TARGET) && !defined(_TARGET) _TARGET=${TARGET} @@ -421,7 +421,7 @@ .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) TARGETS?=amd64 arm arm64 i386 mips pc98 powerpc sparc64 _UNIVERSE_TARGETS= ${TARGETS} -TARGET_ARCHES_arm?= arm armeb armv6 +TARGET_ARCHES_arm?= arm armeb armv6 armv7 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 TARGET_ARCHES_powerpc?= powerpc powerpc64 Index: Makefile.inc1 =================================================================== --- Makefile.inc1 +++ Makefile.inc1 @@ -382,6 +382,7 @@ arm \ armeb/arm \ armv6/arm \ + armv7/arm \ i386 \ i386/pc98 \ mips \ @@ -585,7 +586,7 @@ BFLAGS+= -B${WORLDTMP}/usr/bin .endif .if ${TARGET} == "arm" -.if ${TARGET_ARCH:Marmv6*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" +.if ${TARGET_ARCH:Marmv[67]*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" TARGET_ABI= gnueabihf .else TARGET_ABI= gnueabi @@ -617,7 +618,7 @@ ${TARGET_ARCH} == "powerpc64") LIBCOMPAT= 32 .include "Makefile.libcompat" -.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6" +.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH:Marmv[67]*} != "" LIBCOMPAT= SOFT .include "Makefile.libcompat" .endif Index: Makefile.libcompat =================================================================== --- Makefile.libcompat +++ Makefile.libcompat @@ -43,10 +43,10 @@ # ------------------------------------------------------------------- # soft-fp world -.if ${TARGET_ARCH} == "armv6" +.if ${TARGET_ARCH:Marmv[67]*} != "" LIBSOFTCFLAGS= -DCOMPAT_SOFTFP LIBSOFTCPUFLAGS= -mfloat-abi=softfp -LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=armv6 +LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=${TARGET_ARCH} LIBSOFTWMAKEFLAGS= -DCOMPAT_SOFTFP .endif Index: gnu/usr.bin/binutils/Makefile.inc0 =================================================================== --- gnu/usr.bin/binutils/Makefile.inc0 +++ gnu/usr.bin/binutils/Makefile.inc0 @@ -7,7 +7,7 @@ VERSION= "2.17.50 [FreeBSD] 2007-07-03" .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif @@ -16,7 +16,7 @@ TARGET_OS?= freebsd BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS} -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || ${TARGET_ARCH} == "armv7eb" || \ (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el} == "") TARGET_BIG_ENDIAN=t .endif Index: gnu/usr.bin/binutils/as/Makefile =================================================================== --- gnu/usr.bin/binutils/as/Makefile +++ gnu/usr.bin/binutils/as/Makefile @@ -46,8 +46,11 @@ # DEO: why not used? #SRCS+= itbl-ops.c -.if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marmv6*} != "" CFLAGS+= -DCPU_DEFAULT=ARM_ARCH_V6K +.endif +.if ${TARGET_ARCH:Marmv7*} != "" +CFLAGS+= -DCPU_DEFAULT=ARM_ARCH_V7A .endif .if ${TARGET_CPUARCH} == "mips" Index: gnu/usr.bin/binutils/ld/Makefile.arm =================================================================== --- gnu/usr.bin/binutils/ld/Makefile.arm +++ gnu/usr.bin/binutils/ld/Makefile.arm @@ -1,6 +1,7 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ + ${TARGET_ARCH} == "armv7eb" NATIVE_EMULATION= armelfb_fbsd .else NATIVE_EMULATION= armelf_fbsd Index: gnu/usr.bin/binutils/libbfd/Makefile.arm =================================================================== --- gnu/usr.bin/binutils/libbfd/Makefile.arm +++ gnu/usr.bin/binutils/libbfd/Makefile.arm @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || ${TARGET_ARCH} == "armv7eb" DEFAULT_VECTOR= bfd_elf32_bigarm_vec .else DEFAULT_VECTOR= bfd_elf32_littlearm_vec @@ -14,7 +14,7 @@ elflink.c VECS+= ${DEFAULT_VECTOR} -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || ${TARGET_ARCH} == "armv7eb" VECS+= bfd_elf32_littlearm_vec .else VECS+= bfd_elf32_bigarm_vec Index: gnu/usr.bin/cc/Makefile.inc =================================================================== --- gnu/usr.bin/cc/Makefile.inc +++ gnu/usr.bin/cc/Makefile.inc @@ -31,11 +31,14 @@ CFLAGS+= -DTARGET_ARM_EABI .endif -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || ${TARGET_ARCH} == "armv7eb" CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END .endif -.if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marmv6*} != "" CFLAGS += -DFREEBSD_ARCH_armv6 +.endif +.if ${TARGET_ARCH:Marmv7*} != "" +CFLAGS += -DFREEBSD_ARCH_armv7 .endif .if ${TARGET_CPUARCH} == "mips" Index: gnu/usr.bin/cc/Makefile.tgt =================================================================== --- gnu/usr.bin/cc/Makefile.tgt +++ gnu/usr.bin/cc/Makefile.tgt @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif @@ -15,6 +15,7 @@ TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif .if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ + ${TARGET_ARCH} == "armv7eb" || \ (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el} == "") TARGET_BIG_ENDIAN=t .endif Index: gnu/usr.bin/gdb/Makefile.inc =================================================================== --- gnu/usr.bin/gdb/Makefile.inc +++ gnu/usr.bin/gdb/Makefile.inc @@ -21,7 +21,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Index: gnu/usr.bin/gdb/libgdb/Makefile =================================================================== --- gnu/usr.bin/gdb/libgdb/Makefile +++ gnu/usr.bin/gdb/libgdb/Makefile @@ -4,7 +4,7 @@ # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) -TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Index: lib/clang/llvm.build.mk =================================================================== --- lib/clang/llvm.build.mk +++ lib/clang/llvm.build.mk @@ -20,10 +20,10 @@ TARGET_ARCH?= ${MACHINE_ARCH} BUILD_ARCH?= ${MACHINE_ARCH} -# Armv6 uses hard float abi, unless the CPUTYPE has soft in it. +# Armv6 and armv7 uses hard float abi, unless the CPUTYPE has soft in it. # arm (for armv4 and armv5 CPUs) always uses the soft float ABI. # For all other targets, we stick with 'unknown'. -.if ${TARGET_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if ${TARGET_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") TARGET_ABI= -gnueabihf .elif ${TARGET_ARCH:Marm*} TARGET_ABI= -gnueabi Index: lib/libc/Makefile =================================================================== --- lib/libc/Makefile +++ lib/libc/Makefile @@ -106,7 +106,7 @@ .include "${LIBC_SRCTOP}/uuid/Makefile.inc" .include "${LIBC_SRCTOP}/xdr/Makefile.inc" .if (${LIBC_ARCH} == "arm" && \ - (${MACHINE_ARCH:Marmv6*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \ + (${MACHINE_ARCH:Marmv[67]*} == "" || (defined(CPUTYPE) && ${CPUTYPE:M*soft*}))) || \ ${LIBC_ARCH} == "mips" .include "${LIBC_SRCTOP}/softfloat/Makefile.inc" .endif Index: lib/libc/arm/Makefile.inc =================================================================== --- lib/libc/arm/Makefile.inc +++ lib/libc/arm/Makefile.inc @@ -11,7 +11,7 @@ .include "${LIBC_SRCTOP}/arm/aeabi/Makefile.inc" -.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") SYM_MAPS+=${LIBC_SRCTOP}/arm/Symbol_vfp.map .endif Index: lib/libc/arm/aeabi/Makefile.inc =================================================================== --- lib/libc/arm/aeabi/Makefile.inc +++ lib/libc/arm/aeabi/Makefile.inc @@ -5,14 +5,14 @@ SRCS+= aeabi_atexit.c \ aeabi_unwind_cpp.c \ aeabi_unwind_exidx.c -.if (${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "") || \ - ${MACHINE_ARCH:Marmv6*} == "" +.if (${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "") || \ + ${MACHINE_ARCH:Marmv[67]*} == "" SRCS+= aeabi_asm_double.S \ aeabi_asm_float.S \ aeabi_double.c \ aeabi_float.c .endif -.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") SRCS+= aeabi_vfp_double.S \ aeabi_vfp_float.S .endif Index: lib/libc/arm/gen/Makefile.inc =================================================================== --- lib/libc/arm/gen/Makefile.inc +++ lib/libc/arm/gen/Makefile.inc @@ -7,7 +7,7 @@ arm_initfini.c \ getcontextx.c -.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") +.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \ fpsetround_vfp.c fpsetsticky_vfp.c .endif Index: lib/libc/sys/Makefile.inc =================================================================== --- lib/libc/sys/Makefile.inc +++ lib/libc/sys/Makefile.inc @@ -107,7 +107,7 @@ CLEANFILES+= ${SASM} ${SPSEUDO} .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" || \ - ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv6*} + ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_ARCH:Marmv[67]*} NOTE_GNU_STACK='\t.section .note.GNU-stack,"",%%progbits\n' .else NOTE_GNU_STACK='' Index: lib/libcompiler_rt/Makefile.inc =================================================================== --- lib/libcompiler_rt/Makefile.inc +++ lib/libcompiler_rt/Makefile.inc @@ -203,7 +203,7 @@ .endif .for file in ${SRCF} -.if ${MACHINE_ARCH:Marmv6*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ +.if ${MACHINE_ARCH:Marmv[67]*} && (!defined(CPUTYPE) || ${CPUTYPE:M*soft*} == "") \ && exists(${CRTSRC}/${CRTARCH}/${file}vfp.S) SRCS+= ${file}vfp.S . elif exists(${CRTSRC}/${CRTARCH}/${file}.S) Index: lib/msun/arm/Makefile.inc =================================================================== --- lib/msun/arm/Makefile.inc +++ lib/msun/arm/Makefile.inc @@ -3,7 +3,7 @@ LDBL_PREC = 53 SYM_MAPS += ${.CURDIR}/arm/Symbol.map -.if ${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" +.if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" ARCH_SRCS = fenv-softfp.c fenv-vfp.c .endif Index: share/mk/bsd.cpu.mk =================================================================== --- share/mk/bsd.cpu.mk +++ share/mk/bsd.cpu.mk @@ -110,11 +110,8 @@ _CPUCFLAGS = -march=armv5te -D__XSCALE__ . elif ${CPUTYPE:M*soft*} != "" _CPUCFLAGS = -mfloat-abi=softfp -. elif ${CPUTYPE} == "armv6" -# Not sure we still need ARM_ARCH_6=1 here. -_CPUCFLAGS = -march=${CPUTYPE} -DARM_ARCH_6=1 . elif ${CPUTYPE} == "cortexa" -_CPUCFLAGS = -march=armv7 -DARM_ARCH_6=1 -mfpu=vfp +_CPUCFLAGS = -march=armv7 -mfpu=vfp . elif ${CPUTYPE:Marmv[4567]*} != "" # Handle all the armvX types that FreeBSD runs: # armv4, armv4t, armv5, armv5te, armv6, armv6t2, armv7, armv7-a, armv7ve @@ -317,18 +314,20 @@ . if ${MACHINE_ARCH:Marmv6*} != "" MACHINE_CPU += armv6 . endif -# armv6 is a hybrid. It can use the softfp ABI, but doesn't emulate -# floating point in the general case, so don't define softfp for -# it at this time. arm and armeb are pure softfp, so define it -# for them. -. if ${MACHINE_ARCH:Marmv6*} == "" +. if ${MACHINE_ARCH:Marmv7*} != "" +MACHINE_CPU += armv7 +. endif +# armv6 and armv7 are a hybrid. It can use the softfp ABI, but doesn't emulate +# floating point in the general case, so don't define softfp for it at this +# time. arm and armeb are pure softfp, so define it for them. +. if ${MACHINE_ARCH:Marmv[67]*} == "" MACHINE_CPU += softfp . endif -# Normally armv6 is hard float ABI from FreeBSD 11 onwards. However -# when CPUTYPE has 'soft' in it, we use the soft-float ABI to allow -# building of soft-float ABI libraries. In this case, we have to -# add the -mfloat-abi=softfp to force that. -.if ${MACHINE_ARCH:Marmv6*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" +# Normally armv6 and armv7 are hard float ABI from FreeBSD 11 onwards. However +# when CPUTYPE has 'soft' in it, we use the soft-float ABI to allow building of +# soft-float ABI libraries. In this case, we have to add the -mfloat-abi=softfp +# to force that. +.if ${MACHINE_ARCH:Marmv[67]*} && defined(CPUTYPE) && ${CPUTYPE:M*soft*} != "" # Needs to be CFLAGS not _CPUCFLAGS because it's needed for the ABI # not a nice optimization. CFLAGS += -mfloat-abi=softfp Index: share/mk/local.meta.sys.mk =================================================================== --- share/mk/local.meta.sys.mk +++ share/mk/local.meta.sys.mk @@ -43,7 +43,7 @@ .endif # from src/Makefile (for universe) -TARGET_ARCHES_arm?= arm armeb armv6 +TARGET_ARCHES_arm?= arm armeb armv6 armv7 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipsn32el TARGET_ARCHES_powerpc?= powerpc powerpc64 Index: share/mk/src.opts.mk =================================================================== --- share/mk/src.opts.mk +++ share/mk/src.opts.mk @@ -275,7 +275,7 @@ BROKEN_OPTIONS+=LLDB .endif # Only doing soft float API stuff on armv6 -.if ${__T} != "armv6" +.if ${__T} != "armv6" && ${__T} != "armv7" BROKEN_OPTIONS+=LIBSOFT .endif # EFI doesn't exist on mips, pc98, powerpc, sparc or riscv. Index: share/mk/sys.mk =================================================================== --- share/mk/sys.mk +++ share/mk/sys.mk @@ -13,7 +13,7 @@ # and/or endian. This is called MACHINE_CPU in NetBSD, but that's used # for something different in FreeBSD. # -MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/:C/riscv64/riscv/} +MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v[67])?(eb|hf)?/arm/:C/powerpc64/powerpc/:C/riscv64/riscv/} .endif Index: sys/arm/allwinner/std.allwinner =================================================================== --- sys/arm/allwinner/std.allwinner +++ sys/arm/allwinner/std.allwinner @@ -2,7 +2,7 @@ #$FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" options IPI_IRQ_START=0 Index: sys/arm/allwinner/std.allwinner_up =================================================================== --- sys/arm/allwinner/std.allwinner_up +++ sys/arm/allwinner/std.allwinner_up @@ -2,7 +2,7 @@ #$FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" files "../allwinner/files.allwinner_up" Index: sys/arm/altera/socfpga/std.socfpga =================================================================== --- sys/arm/altera/socfpga/std.socfpga +++ sys/arm/altera/socfpga/std.socfpga @@ -1,7 +1,7 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" options IPI_IRQ_START=0 Index: sys/arm/amlogic/aml8726/std.aml8726 =================================================================== --- sys/arm/amlogic/aml8726/std.aml8726 +++ sys/arm/amlogic/aml8726/std.aml8726 @@ -1,7 +1,7 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" # Physical memory starts at 0x80000000. We assume the kernel is loaded Index: sys/arm/annapurna/alpine/std.alpine =================================================================== --- sys/arm/annapurna/alpine/std.alpine +++ sys/arm/annapurna/alpine/std.alpine @@ -1,7 +1,7 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a -DAL_HAVE_TYPES" makeoptions KERNVIRTADDR=0xa0200000 Index: sys/arm/broadcom/bcm2835/std.bcm2836 =================================================================== --- sys/arm/broadcom/bcm2835/std.bcm2836 +++ sys/arm/broadcom/bcm2835/std.bcm2836 @@ -1,6 +1,6 @@ # $FreeBSD$ -machine arm armv6 +machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" options SOC_BCM2836 Index: sys/arm/conf/ALLWINNER_UP =================================================================== --- sys/arm/conf/ALLWINNER_UP +++ sys/arm/conf/ALLWINNER_UP @@ -20,7 +20,7 @@ ident ALLWINNER_UP -include "std.armv6" +include "std.armv7" include "../allwinner/std.allwinner_up" options INTRNG Index: sys/arm/conf/ALPINE =================================================================== --- sys/arm/conf/ALPINE +++ sys/arm/conf/ALPINE @@ -19,7 +19,7 @@ ident ALPINE -include "std.armv6" +include "std.armv7" include "../annapurna/alpine/std.alpine" makeoptions MODULES_OVERRIDE="" Index: sys/arm/conf/AML8726 =================================================================== --- sys/arm/conf/AML8726 +++ sys/arm/conf/AML8726 @@ -20,7 +20,7 @@ ident AML8726 -include "std.armv6" +include "std.armv7" include "../amlogic/aml8726/std.aml8726" options SCHED_ULE # ULE scheduler Index: sys/arm/conf/ARMADA38X =================================================================== --- sys/arm/conf/ARMADA38X +++ sys/arm/conf/ARMADA38X @@ -5,7 +5,7 @@ # include "../mv/armada38x/std.armada38x" -include "std.armv6" +include "std.armv7" ident ARMADA38X Index: sys/arm/conf/ARMADAXP =================================================================== --- sys/arm/conf/ARMADAXP +++ sys/arm/conf/ARMADAXP @@ -20,7 +20,7 @@ ident MV-88F78XX0 -include "std.armv6" +include "std.armv7" include "../mv/armadaxp/std.mv78x60" options SOC_MV_ARMADAXP Index: sys/arm/conf/BEAGLEBONE =================================================================== --- sys/arm/conf/BEAGLEBONE +++ sys/arm/conf/BEAGLEBONE @@ -23,7 +23,7 @@ ident BEAGLEBONE -include "std.armv6" +include "std.armv7" include "../ti/am335x/std.am335x" makeoptions MODULES_EXTRA="dtb/am335x am335x_dmtpps" Index: sys/arm/conf/EFIKA_MX =================================================================== --- sys/arm/conf/EFIKA_MX +++ sys/arm/conf/EFIKA_MX @@ -20,7 +20,7 @@ ident EFIKA_MX -include "std.armv6" +include "std.armv7" include "../freescale/imx/std.imx51" makeoptions WITHOUT_MODULES="ahc" Index: sys/arm/conf/EXYNOS5.common =================================================================== --- sys/arm/conf/EXYNOS5.common +++ sys/arm/conf/EXYNOS5.common @@ -20,7 +20,7 @@ makeoptions WERROR="-Werror" -include "std.armv6" +include "std.armv7" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking Index: sys/arm/conf/IMX53 =================================================================== --- sys/arm/conf/IMX53 +++ sys/arm/conf/IMX53 @@ -20,7 +20,7 @@ ident IMX53 -include "std.armv6" +include "std.armv7" include "../freescale/imx/std.imx53" options SOC_IMX53 Index: sys/arm/conf/IMX6 =================================================================== --- sys/arm/conf/IMX6 +++ sys/arm/conf/IMX6 @@ -19,7 +19,7 @@ # $FreeBSD$ ident IMX6 -include "std.armv6" +include "std.armv7" include "../freescale/imx/std.imx6" options INTRNG Index: sys/arm/conf/PANDABOARD =================================================================== --- sys/arm/conf/PANDABOARD +++ sys/arm/conf/PANDABOARD @@ -27,7 +27,7 @@ hints "PANDABOARD.hints" -include "std.armv6" +include "std.armv7" include "../ti/omap4/pandaboard/std.pandaboard" options SCHED_ULE # ULE scheduler Index: sys/arm/conf/RK3188 =================================================================== --- sys/arm/conf/RK3188 +++ sys/arm/conf/RK3188 @@ -20,7 +20,7 @@ ident RK3188 -include "std.armv6" +include "std.armv7" include "../rockchip/std.rk30xx" options SCHED_ULE # ULE scheduler Index: sys/arm/conf/RPI2 =================================================================== --- sys/arm/conf/RPI2 +++ sys/arm/conf/RPI2 @@ -20,7 +20,7 @@ ident RPI2 -include "std.armv6" +include "std.armv7" include "../broadcom/bcm2835/std.rpi" include "../broadcom/bcm2835/std.bcm2836" Index: sys/arm/conf/TEGRA124 =================================================================== --- sys/arm/conf/TEGRA124 +++ sys/arm/conf/TEGRA124 @@ -18,7 +18,7 @@ # # $FreeBSD$ -include "std.armv6" +include "std.armv7" include "../nvidia/tegra124/std.tegra124" ident TEGRA124 Index: sys/arm/conf/VYBRID =================================================================== --- sys/arm/conf/VYBRID +++ sys/arm/conf/VYBRID @@ -19,7 +19,7 @@ # $FreeBSD$ ident VYBRID -include "std.armv6" +include "std.armv7" include "../freescale/vybrid/std.vybrid" makeoptions WERROR="-Werror" Index: sys/arm/conf/ZEDBOARD =================================================================== --- sys/arm/conf/ZEDBOARD +++ sys/arm/conf/ZEDBOARD @@ -21,7 +21,7 @@ ident ZEDBOARD -include "std.armv6" +include "std.armv7" include "../xilinx/std.zynq7" makeoptions MODULES_EXTRA="dtb/zynq" Index: sys/arm/conf/std.armv6 =================================================================== --- sys/arm/conf/std.armv6 +++ sys/arm/conf/std.armv6 @@ -1,4 +1,4 @@ -# Standard kernel config items for all ARMv6/v7 systems. +# Standard kernel config items for all ARMv6 systems. # # $FreeBSD$ Index: sys/arm/conf/std.armv7 =================================================================== --- /dev/null +++ sys/arm/conf/std.armv7 @@ -1,13 +1,12 @@ # Standard kernel config items for all ARMv7 systems. # -# $FreeBSD: head/sys/arm/conf/std.armv7 324341 2017-10-05 23:01:50Z imp $ +# $FreeBSD: stable/11/sys/arm/conf/std.armv7 324341 2017-10-05 23:01:50Z imp $ options HZ=1000 options ARM_L2_PIPT # Only L2 PIPT is supported options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options TCP_HHOOK # hhook(9) framework for TCP options IPSEC # IP (v4/v6) security options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem @@ -42,7 +41,6 @@ options VFP # Enable floating point hardware support options COMPAT_FREEBSD10 # Compatible with FreeBSD10 -options COMPAT_FREEBSD11 # Compatible with FreeBSD11 # DTrace support options KDTRACE_HOOKS # Kernel DTrace hooks Index: sys/arm/freescale/imx/std.imx51 =================================================================== --- sys/arm/freescale/imx/std.imx51 +++ sys/arm/freescale/imx/std.imx51 @@ -1,5 +1,5 @@ # $FreeBSD$ -machine arm armv6 +machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" Index: sys/arm/freescale/imx/std.imx53 =================================================================== --- sys/arm/freescale/imx/std.imx53 +++ sys/arm/freescale/imx/std.imx53 @@ -1,5 +1,5 @@ # $FreeBSD$ -machine arm armv6 +machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" Index: sys/arm/freescale/imx/std.imx6 =================================================================== --- sys/arm/freescale/imx/std.imx6 +++ sys/arm/freescale/imx/std.imx6 @@ -1,5 +1,5 @@ # $FreeBSD$ -machine arm armv6 +machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" Index: sys/arm/freescale/vybrid/std.vybrid =================================================================== --- sys/arm/freescale/vybrid/std.vybrid +++ sys/arm/freescale/vybrid/std.vybrid @@ -1,7 +1,7 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" files "../freescale/vybrid/files.vybrid" Index: sys/arm/include/param.h =================================================================== --- sys/arm/include/param.h +++ sys/arm/include/param.h @@ -52,10 +52,12 @@ #define __PCI_REROUTE_INTERRUPT -#if __ARM_ARCH >= 6 -#define _V6_SUFFIX "v6" +#if __ARM_ARCH >= 7 +#define _V_SUFFIX "v7" +#elif __ARM_ARCH >= 6 +#define _V_SUFFIX "v6" #else -#define _V6_SUFFIX "" +#define _V_SUFFIX "" #endif #ifdef __ARM_BIG_ENDIAN @@ -68,7 +70,7 @@ #define MACHINE "arm" #endif #ifndef MACHINE_ARCH -#define MACHINE_ARCH "arm" _V6_SUFFIX _EB_SUFFIX +#define MACHINE_ARCH "arm" _V_SUFFIX _EB_SUFFIX #endif #if defined(SMP) || defined(KLD_MODULE) Index: sys/arm/mv/armada38x/std.armada38x =================================================================== --- sys/arm/mv/armada38x/std.armada38x +++ sys/arm/mv/armada38x/std.armada38x @@ -2,7 +2,7 @@ files "../mv/armada38x/files.armada38x" files "../mv/files.mv" cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" Index: sys/arm/mv/std-pj4b.mv =================================================================== --- sys/arm/mv/std-pj4b.mv +++ sys/arm/mv/std-pj4b.mv @@ -2,7 +2,7 @@ files "../mv/files.mv" cpu CPU_MV_PJ4B -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" # This was originally defined as "(KERNBASE-(1024*1024*1024))" but that Index: sys/arm/nvidia/tegra124/std.tegra124 =================================================================== --- sys/arm/nvidia/tegra124/std.tegra124 +++ sys/arm/nvidia/tegra124/std.tegra124 @@ -1,6 +1,6 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" options INTRNG Index: sys/arm/qemu/std.virt =================================================================== --- sys/arm/qemu/std.virt +++ sys/arm/qemu/std.virt @@ -1,5 +1,5 @@ # $FreeBSD$ -machine arm armv6 +machine arm armv7 cpu CPU_CORTEXA makeoptions CONF_CFLAGS="-march=armv7a" Index: sys/arm/rockchip/std.rk30xx =================================================================== --- sys/arm/rockchip/std.rk30xx +++ sys/arm/rockchip/std.rk30xx @@ -2,7 +2,7 @@ #$FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" options IPI_IRQ_START=0 Index: sys/arm/samsung/exynos/std.exynos5250 =================================================================== --- sys/arm/samsung/exynos/std.exynos5250 +++ sys/arm/samsung/exynos/std.exynos5250 @@ -1,7 +1,7 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" options IPI_IRQ_START=0 Index: sys/arm/samsung/exynos/std.exynos5420 =================================================================== --- sys/arm/samsung/exynos/std.exynos5420 +++ sys/arm/samsung/exynos/std.exynos5420 @@ -1,7 +1,7 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" options IPI_IRQ_START=0 Index: sys/arm/ti/std.ti =================================================================== --- sys/arm/ti/std.ti +++ sys/arm/ti/std.ti @@ -1,7 +1,7 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" files "../ti/files.ti" Index: sys/arm/xilinx/std.zynq7 =================================================================== --- sys/arm/xilinx/std.zynq7 +++ sys/arm/xilinx/std.zynq7 @@ -4,7 +4,7 @@ # $FreeBSD$ cpu CPU_CORTEXA -machine arm armv6 +machine arm armv7 makeoptions CONF_CFLAGS="-march=armv7a" files "../xilinx/files.zynq7" Index: sys/conf/Makefile.arm =================================================================== --- sys/conf/Makefile.arm +++ sys/conf/Makefile.arm @@ -79,7 +79,7 @@ $S/$M/$M/cpufunc_asm_pj4b.S $S/$M/$M/cpufunc_asm_armv6.S \ $S/$M/$M/cpufunc_asm_armv7.S -.if ${MACHINE_ARCH} != "armv6" && defined(KERNPHYSADDR) +.if ${MACHINE_ARCH:Marmv[67]*} == "" && defined(KERNPHYSADDR) KERNEL_EXTRA=trampoline KERNEL_EXTRA_INSTALL=kernel.gz.tramp trampoline: ${KERNEL_KO}.tramp Index: sys/conf/files.arm =================================================================== --- sys/conf/files.arm +++ sys/conf/files.arm @@ -18,8 +18,8 @@ arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_base.c optional fdt arm/arm/bus_space_generic.c standard -arm/arm/busdma_machdep-v4.c optional !armv6 -arm/arm/busdma_machdep-v6.c optional armv6 +arm/arm/busdma_machdep-v4.c optional !armv7 !armv6 +arm/arm/busdma_machdep-v6.c optional armv7 | armv6 arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard @@ -36,11 +36,12 @@ arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342 arm/arm/cpufunc_asm_xscale_c3.S optional cpu_xscale_81342 arm/arm/cpuinfo.c standard -arm/arm/cpu_asm-v6.S optional armv6 +arm/arm/cpu_asm-v6.S optional armv7 | armv6 arm/arm/db_disasm.c optional ddb arm/arm/db_interface.c optional ddb arm/arm/db_trace.c optional ddb arm/arm/debug_monitor.c optional ddb armv6 +arm/arm/debug_monitor.c optional ddb armv7 arm/arm/disassem.c optional ddb arm/arm/dump_machdep.c standard arm/arm/elf_machdep.c standard @@ -53,8 +54,8 @@ arm/arm/generic_timer.c optional generic_timer arm/arm/gic.c optional gic arm/arm/hdmi_if.m optional hdmi -arm/arm/identcpu-v4.c optional !armv6 -arm/arm/identcpu-v6.c optional armv6 +arm/arm/identcpu-v4.c optional !armv7 !armv6 +arm/arm/identcpu-v6.c optional armv7 | armv6 arm/arm/in_cksum.c optional inet | inet6 arm/arm/in_cksum_arm.S optional inet | inet6 arm/arm/intr.c optional !intrng @@ -76,8 +77,8 @@ arm/arm/pl310.c optional pl310 arm/arm/platform.c optional platform arm/arm/platform_if.m optional platform -arm/arm/pmap-v4.c optional !armv6 -arm/arm/pmap-v6.c optional armv6 +arm/arm/pmap-v4.c optional !armv7 !armv6 +arm/arm/pmap-v6.c optional armv7 | armv6 arm/arm/pmu.c optional pmu | fdt hwpmc arm/arm/ptrace_machdep.c standard arm/arm/sc_machdep.c optional sc @@ -88,12 +89,12 @@ compile-with "${NORMAL_C:N-Wmissing-prototypes}" arm/arm/support.S standard arm/arm/swtch.S standard -arm/arm/swtch-v4.S optional !armv6 -arm/arm/swtch-v6.S optional armv6 +arm/arm/swtch-v4.S optional !armv7 !armv6 +arm/arm/swtch-v6.S optional armv7 | armv6 arm/arm/sys_machdep.c standard arm/arm/syscall.c standard -arm/arm/trap-v4.c optional !armv6 -arm/arm/trap-v6.c optional armv6 +arm/arm/trap-v4.c optional !armv7 !armv6 +arm/arm/trap-v6.c optional armv7 | armv6 arm/arm/uio_machdep.c standard arm/arm/undefined.c standard arm/arm/unwind.c optional ddb | kdtrace_hooks @@ -117,6 +118,7 @@ dev/fdt/fdt_arm_platform.c optional platform fdt dev/hwpmc/hwpmc_arm.c optional hwpmc dev/hwpmc/hwpmc_armv7.c optional hwpmc armv6 +dev/hwpmc/hwpmc_armv7.c optional hwpmc armv7 dev/iicbus/twsi/twsi.c optional twsi dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofwpci.c optional fdt pci Index: sys/conf/kern.mk =================================================================== --- sys/conf/kern.mk +++ sys/conf/kern.mk @@ -260,6 +260,7 @@ LD_EMULATION_arm=armelf_fbsd LD_EMULATION_armeb=armelfb_fbsd LD_EMULATION_armv6=armelf_fbsd +LD_EMULATION_armv7=armelf_fbsd LD_EMULATION_i386=elf_i386_fbsd LD_EMULATION_mips= elf32btsmip_fbsd LD_EMULATION_mips64= elf64btsmip_fbsd Index: sys/conf/kern.opts.mk =================================================================== --- sys/conf/kern.opts.mk +++ sys/conf/kern.opts.mk @@ -63,7 +63,7 @@ # Things that don't work based on the CPU .if ${MACHINE_CPUARCH} == "arm" -. if ${MACHINE_ARCH:Marmv6*} == "" +. if ${MACHINE_ARCH:Marmv[67]*} == "" BROKEN_OPTIONS+= CDDL ZFS . endif .endif Index: sys/conf/kern.pre.mk =================================================================== --- sys/conf/kern.pre.mk +++ sys/conf/kern.pre.mk @@ -250,6 +250,7 @@ EMBEDFS_FORMAT.arm?= elf32-littlearm EMBEDFS_FORMAT.armv6?= elf32-littlearm +EMBEDFS_FORMAT.armv7?= elf32-littlearm EMBEDFS_FORMAT.aarch64?= elf64-littleaarch64 EMBEDFS_FORMAT.mips?= elf32-tradbigmips EMBEDFS_FORMAT.mipsel?= elf32-tradlittlemips Index: sys/conf/options.arm =================================================================== --- sys/conf/options.arm +++ sys/conf/options.arm @@ -1,5 +1,6 @@ #$FreeBSD$ ARMV6 opt_global.h +ARMV7 opt_global.h ARM_CACHE_LOCK_ENABLE opt_global.h ARM_KERN_DIRECTMAP opt_vm.h ARM_L2_PIPT opt_global.h Index: sys/modules/Makefile =================================================================== --- sys/modules/Makefile +++ sys/modules/Makefile @@ -434,7 +434,7 @@ .endif .if ${MK_CDDL} != "no" || defined(ALL_MODULES) -.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv6*} != "") && \ +.if (${MACHINE_CPUARCH} != "arm" || ${MACHINE_ARCH:Marmv[67]*} != "") && \ ${MACHINE_CPUARCH} != "mips" && \ ${MACHINE_CPUARCH} != "sparc64" SUBDIR+= dtrace @@ -816,7 +816,7 @@ _igb= igb .endif -.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH} == "armv6" || \ +.if (${MACHINE_CPUARCH} == "amd64" || ${MACHINE_ARCH:Marmv[67]*} != "" || \ ${MACHINE_CPUARCH} == "i386") _cloudabi32= cloudabi32 .endif Index: sys/modules/cloudabi32/Makefile =================================================================== --- sys/modules/cloudabi32/Makefile +++ sys/modules/cloudabi32/Makefile @@ -18,7 +18,7 @@ VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S OUTPUT_TARGET=elf64-x86-64-freebsd BINARY_ARCHITECTURE=i386 -.elif ${MACHINE_ARCH} == "armv6" +.elif ${MACHINE_ARCH:Marmv[67]*} != "" VDSO_SRCS=${SYSDIR}/contrib/cloudabi/cloudabi_vdso_armv6.S OUTPUT_TARGET=elf32-littlearm BINARY_ARCHITECTURE=arm