From owner-freebsd-arm@FreeBSD.ORG Wed Jul 4 23:52:10 2012 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 910461065677; Wed, 4 Jul 2012 23:52:10 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 600E88FC15; Wed, 4 Jul 2012 23:52:10 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id q64Nq1XQ094886; Wed, 4 Jul 2012 23:52:01 GMT (envelope-from kientzle@freebsd.org) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id yunp5iazfpxkkd8vin95xexc8n; Wed, 04 Jul 2012 23:52:01 +0000 (UTC) (envelope-from kientzle@freebsd.org) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: multipart/mixed; boundary="Apple-Mail=_17CC2F48-3F88-47CD-B4C1-D054BE658922" From: Tim Kientzle In-Reply-To: <576FE101-93B7-46D6-B38D-A28EF18CFFC2@freebsd.org> Date: Wed, 4 Jul 2012 16:51:59 -0700 Message-Id: References: <1340921715.1110.100.camel@revolution.hippie.lan> <3AB368CC-BE8B-4058-A342-763B8C073800@bsdimp.com> <576FE101-93B7-46D6-B38D-A28EF18CFFC2@freebsd.org> To: Tim Kientzle X-Mailer: Apple Mail (2.1278) Cc: arm@freebsd.org, Warner Losh Subject: TARGET_ARCH=armv6 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jul 2012 23:52:10 -0000 --Apple-Mail=_17CC2F48-3F88-47CD-B4C1-D054BE658922 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Attached patch adds full support to the projects/armv6 tree for building with TARGET_ARCH=3Darmv6 (*instead of* TARGET_CPUTYPE). I intend to commit this to the armv6 tree after I finish some more test = builds (likely a few days). Most of this is copied from Warner's work[0], though I've filled in a few additional pieces. To wit: * GCC defaults to arm1176jz-s processor instead of StrongARM * GCC defines __FreeBSD_ARCH_armv6__ and sys/param.h sets MACHINE_ARCH = to armv6 when it sees this. This persists the 'armv6' architecture = setting through native rebuilds. * gas defaults to ARM_ARCH_V6K * uname -p returns 'armv6' * make -V MACHINE_ARCH defaults to 'armv6' * WANT_TP_ADDRESS is now assumed for any processor < ARMv6K (as set by = the compiler's CPU settings) The other renaming and refactoring I proposed recently isn't yet = complete here; I want to make sure this is stable and get it committed = before I churn the tree again. ;-) Cheers, Tim [0] I have removed the EXT_COMP part of Warner's patches; they're = unrelated to what I'm trying to accomplish here. --Apple-Mail=_17CC2F48-3F88-47CD-B4C1-D054BE658922 Content-Disposition: attachment; filename=armv6-target-arch.patch Content-Type: application/octet-stream; name="armv6-target-arch.patch" Content-Transfer-Encoding: 7bit Index: usr.bin/xlint/Makefile.inc =================================================================== --- usr.bin/xlint/Makefile.inc (revision 237743) +++ usr.bin/xlint/Makefile.inc (working copy) @@ -8,7 +8,7 @@ # These assignments duplicate much of the functionality of # 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/armeb/arm/} +TARGET_CPUARCH= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/} .else TARGET_CPUARCH= ${MACHINE_CPUARCH} TARGET_ARCH= ${MACHINE_ARCH} Index: gnu/usr.bin/cc/Makefile.inc =================================================================== --- gnu/usr.bin/cc/Makefile.inc (revision 237743) +++ gnu/usr.bin/cc/Makefile.inc (working copy) @@ -26,9 +26,12 @@ CFLAGS+= -DCROSS_COMPILE .endif -.if ${TARGET_ARCH} == "armeb" +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END .endif +.if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb" +CFLAGS += -DFREEBSD_ARCH_armv6 +.endif .if ${TARGET_CPUARCH} == "mips" .if ${TARGET_ARCH:Mmips*el} != "" Index: gnu/usr.bin/cc/Makefile.tgt =================================================================== --- gnu/usr.bin/cc/Makefile.tgt (revision 237743) +++ gnu/usr.bin/cc/Makefile.tgt (working copy) @@ -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/armeb/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif @@ -17,7 +17,7 @@ .if ${TARGET_ARCH} == "sparc64" TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif -.if ${TARGET_ARCH} == "armeb" || \ +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el} == "") TARGET_BIG_ENDIAN=t .endif Index: gnu/usr.bin/binutils/ld/Makefile.arm =================================================================== --- gnu/usr.bin/binutils/ld/Makefile.arm (revision 237743) +++ gnu/usr.bin/binutils/ld/Makefile.arm (working copy) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "armeb" +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" NATIVE_EMULATION= armelfb_fbsd .else NATIVE_EMULATION= armelf_fbsd Index: gnu/usr.bin/binutils/libbfd/Makefile.arm =================================================================== --- gnu/usr.bin/binutils/libbfd/Makefile.arm (revision 237743) +++ gnu/usr.bin/binutils/libbfd/Makefile.arm (working copy) @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "armeb" +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" 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" +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" VECS+= bfd_elf32_littlearm_vec .else VECS+= bfd_elf32_bigarm_vec Index: gnu/usr.bin/binutils/as/Makefile =================================================================== --- gnu/usr.bin/binutils/as/Makefile (revision 237743) +++ gnu/usr.bin/binutils/as/Makefile (working copy) @@ -42,6 +42,10 @@ # DEO: why not used? #SRCS+= itbl-ops.c +.if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb" +CFLAGS+= -DCPU_DEFAULT=ARM_ARCH_V6K +.endif + .if ${TARGET_CPUARCH} == "mips" SRCS+= itbl-ops.c itbl-parse.y itbl-lex.l .if ${TARGET_ARCH:Mmips64*} != "" Index: gnu/usr.bin/binutils/Makefile.inc0 =================================================================== --- gnu/usr.bin/binutils/Makefile.inc0 (revision 237743) +++ gnu/usr.bin/binutils/Makefile.inc0 (working copy) @@ -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/armeb/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(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" || \ +.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ (${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 (revision 237743) +++ gnu/usr.bin/gdb/Makefile.inc (working copy) @@ -20,7 +20,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/armeb/arm/:C/powerpc64/powerpc/} +TARGET_CPUARCH=${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif Index: share/mk/sys.mk =================================================================== --- share/mk/sys.mk (revision 237743) +++ share/mk/sys.mk (working copy) @@ -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/armeb/arm/:C/powerpc64/powerpc/} +MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} .endif # If the special target .POSIX appears (without prerequisites or Index: share/mk/bsd.endian.mk =================================================================== --- share/mk/bsd.endian.mk (revision 237743) +++ share/mk/bsd.endian.mk (working copy) @@ -4,12 +4,14 @@ ${MACHINE_ARCH} == "i386" || \ ${MACHINE_ARCH} == "ia64" || \ ${MACHINE_ARCH} == "arm" || \ + ${MACHINE_ARCH} == "armv6" || \ ${MACHINE_ARCH:Mmips*el} != "" TARGET_ENDIANNESS= 1234 .elif ${MACHINE_ARCH} == "powerpc" || \ ${MACHINE_ARCH} == "powerpc64" || \ ${MACHINE_ARCH} == "sparc64" || \ ${MACHINE_ARCH} == "armeb" || \ + ${MACHINE_ARCH} == "armv6eb" || \ ${MACHINE_ARCH:Mmips*} != "" TARGET_ENDIANNESS= 4321 .endif Index: Makefile =================================================================== --- Makefile (revision 237743) +++ Makefile (working copy) @@ -135,7 +135,7 @@ _TARGET_ARCH= ${TARGET:S/pc98/i386/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/} +_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/} .endif # Legacy names, for another transition period mips:mips(n32|64)?eb -> mips:mips\1 .if defined(TARGET) && defined(TARGET_ARCH) && \ @@ -329,7 +329,7 @@ # .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) TARGETS?=amd64 arm i386 ia64 mips pc98 powerpc sparc64 -TARGET_ARCHES_arm?= arm armeb +TARGET_ARCHES_arm?= arm armeb armv6 armv6eb TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 TARGET_ARCHES_powerpc?= powerpc powerpc64 TARGET_ARCHES_pc98?= i386 Index: contrib/gcc/config/arm/freebsd.h =================================================================== --- contrib/gcc/config/arm/freebsd.h (revision 237743) +++ contrib/gcc/config/arm/freebsd.h (working copy) @@ -55,8 +55,6 @@ /************************[ Target stuff ]***********************************/ -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)"); #ifndef TARGET_ENDIAN_DEFAULT #define TARGET_ENDIAN_DEFAULT 0 @@ -86,8 +84,22 @@ /* We use the GCC defaults here. */ #undef WCHAR_TYPE +#if defined(FREEBSD_ARCH_armv6) #undef SUBTARGET_CPU_DEFAULT +#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm1176jzs +#undef FBSD_TARGET_CPU_CPP_BUILTINS +#define FBSD_TARGET_CPU_CPP_BUILTINS() \ + do { \ + builtin_define ("__FreeBSD_ARCH_armv6__"); \ + } while (0) +#undef TARGET_VERSION +#define TARGET_VERSION fprintf (stderr, " (FreeBSD/armv6 ELF)"); +#else +#undef SUBTARGET_CPU_DEFAULT #define SUBTARGET_CPU_DEFAULT TARGET_CPU_strongarm +#undef TARGET_VERSION +#define TARGET_VERSION fprintf (stderr, " (FreeBSD/StrongARM ELF)"); +#endif /* FreeBSD does its profiling differently to the Acorn compiler. We don't need a word following the mcount call; and to skip it Index: contrib/binutils/config.sub =================================================================== --- contrib/binutils/config.sub (revision 237743) +++ contrib/binutils/config.sub (working copy) @@ -241,7 +241,7 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arm | arm[bl]e | arme[lb] | armv[23456] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ Index: contrib/binutils/bfd/config.bfd =================================================================== --- contrib/binutils/bfd/config.bfd (revision 237743) +++ contrib/binutils/bfd/config.bfd (working copy) @@ -277,6 +277,14 @@ targ_defvec=bfd_elf32_bigarm_vec targ_selvecs=bfd_elf32_littlearm_vec ;; + armv6eb-*-freebsd*) + targ_defvec=bfd_elf32_bigarm_vec + targ_selvecs=bfd_elf32_littlearm_vec + ;; + armv6-*-freebsd*) + targ_defvec=bfd_elf32_littlearm_vec + targ_selvecs=bfd_elf32_bigarm_vec + ;; arm-*-elf | arm-*-freebsd* | arm*-*-linux-* | arm*-*-conix* | \ arm*-*-uclinux* | arm-*-kfreebsd*-gnu | \ arm*-*-eabi* ) Index: Makefile.inc1 =================================================================== --- Makefile.inc1 (revision 237743) +++ Makefile.inc1 (working copy) @@ -136,7 +136,7 @@ VERSION+= ${OSRELDATE} .endif -KNOWN_ARCHES?= amd64 arm armeb/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 +KNOWN_ARCHES?= amd64 arm armeb/arm armv6/arm armv6eb/arm i386 i386/pc98 ia64 mips mipsel/mips mips64el/mips mips64/mips mipsn32el/mips mipsn32/mips powerpc powerpc64/powerpc sparc64 .if ${TARGET} == ${TARGET_ARCH} _t= ${TARGET} .else Index: sys/arm/xscale/std.xscale =================================================================== --- sys/arm/xscale/std.xscale (revision 237743) +++ sys/arm/xscale/std.xscale (working copy) @@ -1,4 +1,3 @@ # $FreeBSD$ options ARM_CACHE_LOCK_ENABLE options NO_EVENTTIMERS -options ARM_WANT_TP_ADDRESS Index: sys/arm/arm/cpufunc_asm_armv7.S =================================================================== --- sys/arm/arm/cpufunc_asm_armv7.S (revision 237743) +++ sys/arm/arm/cpufunc_asm_armv7.S (working copy) @@ -32,6 +32,8 @@ #include __FBSDID("$FreeBSD$"); + .cpu cortex-a8 + .Lcoherency_level: .word _C_LABEL(arm_cache_loc) .Lcache_type: Index: sys/arm/mv/std.mv =================================================================== --- sys/arm/mv/std.mv (revision 237743) +++ sys/arm/mv/std.mv (working copy) @@ -3,4 +3,3 @@ files "../mv/files.mv" cpu CPU_ARM9E makeoptions CONF_CFLAGS="-march=armv5te" -options ARM_WANT_TP_ADDRESS Index: sys/arm/include/asmacros.h =================================================================== --- sys/arm/include/asmacros.h (revision 237743) +++ sys/arm/include/asmacros.h (working copy) @@ -40,6 +40,8 @@ #ifndef _MACHINE_ASMACROS_H_ #define _MACHINE_ASMACROS_H_ +#include + #ifdef _KERNEL #ifdef LOCORE Index: sys/arm/include/sysarch.h =================================================================== --- sys/arm/include/sysarch.h (revision 237743) +++ sys/arm/include/sysarch.h (working copy) @@ -51,7 +51,13 @@ * of ldr/str rm,[rn, #4]). */ -#ifdef ARM_WANT_TP_ADDRESS +/* ARM_TP_ADDRESS is needed for processors that don't support + * the exclusive-access opcodes introduced with ARMv6K. */ +/* TODO: #if !defined(_HAVE_ARMv6K_INSTRUCTIONS) */ +#if !defined (__ARM_ARCH_7__) && \ + !defined (__ARM_ARCH_7A__) && \ + !defined (__ARM_ARCH_6K__) && \ + !defined (__ARM_ARCH_6ZK__) #define ARM_TP_ADDRESS (ARM_VECTORS_HIGH + 0x1000) #define ARM_RAS_START (ARM_TP_ADDRESS + 4) #define ARM_RAS_END (ARM_TP_ADDRESS + 8) Index: sys/arm/include/asm.h =================================================================== --- sys/arm/include/asm.h (revision 237743) +++ sys/arm/include/asm.h (working copy) @@ -130,49 +130,52 @@ .stabs __STRING(_/**/sym),1,0,0,0 #endif /* __STDC__ */ +/* Exactly one of the __ARM_ARCH_*__ macros will be defined by the compiler. */ +/* The _ARM_ARCH_* macros are deprecated and will be removed soon. */ +/* This should be moved into another header so it can be used in + * both asm and C code. machine/asm.h cannot be included in C code. */ #if defined (__ARM_ARCH_7__) || defined (__ARM_ARCH_7A__) #define _ARM_ARCH_7 +#define _HAVE_ARMv7_INSTRUCTIONS 1 #endif -#if defined(_ARM_ARCH_7) || defined (__ARM_ARCH_6__) || \ - defined (__ARM_ARCH_6J__) +#if defined (_HAVE_ARMv7_INSTRUCTIONS) || defined (__ARM_ARCH_6__) || \ + defined (__ARM_ARCH_6J__) || defined (__ARM_ARCH_6K__) || \ + defined (__ARM_ARCH_6Z__) || defined (__ARM_ARCH_6ZK__) #define _ARM_ARCH_6 +#define _HAVE_ARMv6_INSTRUCTIONS 1 #endif -#if defined (_ARM_ARCH_6) || defined (__ARM_ARCH_5__) || \ - defined (__ARM_ARCH_5T__) || defined (__ARM_ARCH_5TE__) || \ +#if defined (_HAVE_ARMv6_INSTRUCTIONS) || defined (__ARM_ARCH_5TE__) || \ defined (__ARM_ARCH_5TEJ__) || defined (__ARM_ARCH_5E__) -#define _ARM_ARCH_5 +#define _ARM_ARCH_5E +#define _HAVE_ARMv5E_INSTRUCTIONS 1 #endif -#if defined (_ARM_ARCH_6) || defined(__ARM_ARCH_5TE__) || \ - defined(__ARM_ARCH_5TEJ__) || defined(__ARM_ARCH_5E__) -#define _ARM_ARCH_5E +#if defined (_HAVE_ARMv5E_INSTRUCTIONS) || defined (__ARM_ARCH_5__) || \ + defined (__ARM_ARCH_5T__) +#define _ARM_ARCH_5 +#define _HAVE_ARMv5_INSTRUCTIONS 1 #endif -#if defined (_ARM_ARCH_5) || defined (__ARM_ARCH_4T__) +#if defined (_HAVE_ARMv5_INSTRUCTIONS) || defined (__ARM_ARCH_4T__) #define _ARM_ARCH_4T +#define _HAVE_ARMv4T_INSTRUCTIONS 1 #endif +/* FreeBSD requires ARMv4, so this is always set. */ +#define _HAVE_ARMv4_INSTRUCTIONS 1 -#if defined (_ARM_ARCH_4T) +#if defined (_HAVE_ARMv4T_INSTRUCTIONS) # define RET bx lr # define RETeq bxeq lr # define RETne bxne lr -# ifdef __STDC__ -# define RETc(c) bx##c lr -# else -# define RETc(c) bx/**/c lr -# endif +# define RETc(c) bx##c lr #else # define RET mov pc, lr # define RETeq moveq pc, lr # define RETne movne pc, lr -# ifdef __STDC__ -# define RETc(c) mov##c pc, lr -# else -# define RETc(c) mov/**/c pc, lr -# endif +# define RETc(c) mov##c pc, lr #endif #endif /* !_MACHINE_ASM_H_ */ Index: sys/arm/include/param.h =================================================================== --- sys/arm/include/param.h (revision 237743) +++ sys/arm/include/param.h (working copy) @@ -56,8 +56,12 @@ #define MACHINE "arm" #endif #ifndef MACHINE_ARCH +#ifdef __FreeBSD_ARCH_armv6__ +#define MACHINE_ARCH "armv6" +#else #define MACHINE_ARCH "arm" #endif +#endif #define MID_MACHINE MID_ARM6 #if defined(SMP) || defined(KLD_MODULE) Index: sys/arm/include/atomic.h =================================================================== --- sys/arm/include/atomic.h (revision 237743) +++ sys/arm/include/atomic.h (working copy) @@ -58,14 +58,24 @@ #define F32_bit (1 << 6) /* FIQ disable */ #endif -/* XXX: Rethink for userland later as those won't be defined */ -#if ARM_ARCH_6 || ARM_ARCH_7A - +/* + * It would be nice to use _HAVE_ARMv6_INSTRUCTIONS from machine/asm.h + * here, but that header can't be included here because this is C + * code. I would like to move the _HAVE_ARMv6_INSTRUCTIONS definition + * out of asm.h so it can be used in both asm and C code. - kientzle@ + */ +#if defined (__ARM_ARCH_7__) || \ + defined (__ARM_ARCH_7A__) || \ + defined (__ARM_ARCH_6__) || \ + defined (__ARM_ARCH_6J__) || \ + defined (__ARM_ARCH_6K__) || \ + defined (__ARM_ARCH_6Z__) || \ + defined (__ARM_ARCH_6ZK__) static __inline void __do_dmb(void) { -#if ARM_ARCH_7A +#if defined (__ARM_ARCH_7__) || defined (__ARM_ARCH_7A__) __asm __volatile("dmb" : : : "memory"); #else __asm __volatile("mcr p15, 0, r0, c7, c10, 5" : : : "memory"); Index: sys/arm/econa/std.econa =================================================================== --- sys/arm/econa/std.econa (revision 237743) +++ sys/arm/econa/std.econa (working copy) @@ -14,4 +14,3 @@ options STARTUP_PAGETABLE_ADDR=0x00100000 options NO_EVENTTIMERS -options ARM_WANT_TP_ADDRESS Index: sys/arm/s3c2xx0/std.s3c2410 =================================================================== --- sys/arm/s3c2xx0/std.s3c2410 (revision 237743) +++ sys/arm/s3c2xx0/std.s3c2410 (working copy) @@ -5,4 +5,3 @@ makeoptions CONF_CFLAGS=-mcpu=arm920t options NO_EVENTTIMERS -options ARM_WANT_TP_ADDRESS Index: sys/arm/ti/std.ti =================================================================== --- sys/arm/ti/std.ti (revision 237743) +++ sys/arm/ti/std.ti (working copy) @@ -1,8 +1,5 @@ # $FreeBSD$ -# This should be armv7-a but current gcc doesn't support it -makeoptions CONF_CFLAGS=-D_ARM_ARCH_6 - cpu CPU_CORTEXA files "../ti/files.ti" Index: sys/arm/sa11x0/std.sa11x0 =================================================================== --- sys/arm/sa11x0/std.sa11x0 (revision 237743) +++ sys/arm/sa11x0/std.sa11x0 (working copy) @@ -6,4 +6,3 @@ makeoptions KERNPHYSADDR=0xc0000000 makeoptions KERNVIRTADDR=0xc0000000 options NO_EVENTTIMERS -options ARM_WANT_TP_ADDRESS Index: sys/arm/lpc/std.lpc =================================================================== --- sys/arm/lpc/std.lpc (revision 237743) +++ sys/arm/lpc/std.lpc (working copy) @@ -12,4 +12,3 @@ options KERNPHYSADDR=0x80100000 makeoptions KERNVIRTADDR=0xc0100000 options KERNVIRTADDR=0xc0100000 -options ARM_WANT_TP_ADDRESS Index: sys/arm/at91/std.at91 =================================================================== --- sys/arm/at91/std.at91 (revision 237743) +++ sys/arm/at91/std.at91 (working copy) @@ -5,4 +5,3 @@ makeoptions CONF_CFLAGS=-mcpu=arm9 options PHYSADDR=0x20000000 options NO_EVENTTIMERS -options ARM_WANT_TP_ADDRESS Index: sys/arm/at91/std.at91sam9 =================================================================== --- sys/arm/at91/std.at91sam9 (revision 237743) +++ sys/arm/at91/std.at91sam9 (working copy) @@ -8,5 +8,4 @@ device at91sam9g20 device at91sam9260 options NO_EVENTTIMERS -options ARM_WANT_TP_ADDRESS Index: sys/conf/kmod.mk =================================================================== --- sys/conf/kmod.mk (revision 237743) +++ sys/conf/kmod.mk (working copy) @@ -61,7 +61,7 @@ # # backwards compat option for older systems. -MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/} +MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} AWK?= awk KMODLOAD?= /sbin/kldload Index: sys/conf/kern.pre.mk =================================================================== --- sys/conf/kern.pre.mk (revision 237743) +++ sys/conf/kern.pre.mk (working copy) @@ -6,7 +6,7 @@ .include # backwards compat option for older systems. -MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/armeb/arm/:C/powerpc64/powerpc/} +MACHINE_CPUARCH?=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} # Can be overridden by makeoptions or /etc/make.conf KERNEL_KO?= kernel --Apple-Mail=_17CC2F48-3F88-47CD-B4C1-D054BE658922 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii --Apple-Mail=_17CC2F48-3F88-47CD-B4C1-D054BE658922--