Index: build.sh
===================================================================
RCS file: /cvsroot/src/build.sh,v
retrieving revision 1.325
diff -p -u -u -r1.325 build.sh
--- build.sh 1 Apr 2018 04:35:01 -0000 1.325
+++ build.sh 11 Apr 2018 02:25:14 -0000
@@ -615,6 +615,7 @@ level of source directory"
#
valid_MACHINE_ARCH='
MACHINE=acorn32 MACHINE_ARCH=arm
+MACHINE=acorn32 MACHINE_ARCH=earmv4 ALIAS=eacorn32 DEFAULT
MACHINE=algor MACHINE_ARCH=mips64el ALIAS=algor64
MACHINE=algor MACHINE_ARCH=mipsel DEFAULT
MACHINE=alpha MACHINE_ARCH=alpha
@@ -633,6 +634,7 @@ MACHINE=cobalt MACHINE_ARCH=mipsel DEFA
MACHINE=dreamcast MACHINE_ARCH=sh3el
MACHINE=emips MACHINE_ARCH=mipseb
MACHINE=epoc32 MACHINE_ARCH=arm
+MACHINE=epoc32 MACHINE_ARCH=earmv4 ALIAS=eepoc32 DEFAULT
MACHINE=evbarm MACHINE_ARCH=arm ALIAS=evboarm-el
MACHINE=evbarm MACHINE_ARCH=armeb ALIAS=evboarm-eb
MACHINE=evbarm MACHINE_ARCH=earm ALIAS=evbearm-el DEFAULT
@@ -651,7 +653,7 @@ MACHINE=evbarm MACHINE_ARCH=earmv7 ALIA
MACHINE=evbarm MACHINE_ARCH=earmv7eb ALIAS=evbearmv7-eb
MACHINE=evbarm MACHINE_ARCH=earmv7hf ALIAS=evbearmv7hf-el
MACHINE=evbarm MACHINE_ARCH=earmv7hfeb ALIAS=evbearmv7hf-eb
-MACHINE=evbarm MACHINE_ARCH=aarch64 ALIAS=evbarm64-el DEFAULT
+MACHINE=evbarm MACHINE_ARCH=aarch64 ALIAS=evbarm64-el ALIAS=evbarm64 DEFAULT
MACHINE=evbarm MACHINE_ARCH=aarch64eb ALIAS=evbarm64-eb
MACHINE=evbcf MACHINE_ARCH=coldfire
MACHINE=evbmips MACHINE_ARCH= NO_DEFAULT
Index: external/gpl3/gcc/dist/gcc/config.gcc
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/gcc/config.gcc,v
retrieving revision 1.41
diff -p -u -u -r1.41 config.gcc
--- external/gpl3/gcc/dist/gcc/config.gcc 8 Apr 2018 15:10:53 -0000 1.41
+++ external/gpl3/gcc/dist/gcc/config.gcc 11 Apr 2018 02:25:26 -0000
@@ -974,6 +974,13 @@ aarch64*-*-freebsd*)
tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-freebsd.h"
tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-freebsd"
;;
+aarch64*-*-netbsd*)
+ tm_file="${tm_file} dbxelf.h elfos.h ${nbsd_tm_file}"
+ tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-netbsd.h"
+ tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-netbsd"
+ extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+ # XXX big endian
+ ;;
aarch64*-*-linux*)
tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h"
Index: external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h
===================================================================
RCS file: external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h
diff -N external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-netbsd.h 11 Apr 2018 02:25:26 -0000
@@ -0,0 +1,98 @@
+/* Definitions for AArch64 running NetBSD
+ Copyright (C) 2016-2017 Free Software Foundation, Inc.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GCC is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ . */
+
+#ifndef GCC_AARCH64_NETBSD_H
+#define GCC_AARCH64_NETBSD_H
+
+#undef SUBTARGET_EXTRA_SPECS
+#define SUBTARGET_EXTRA_SPECS \
+ NETBSD_SUBTARGET_EXTRA_SPECS
+
+#define TARGET_LINKER_BIG_EMULATION "aarch64nbsdb"
+#define TARGET_LINKER_LITTLE_EMULATION "aarch64nbsd"
+
+#if TARGET_BIG_ENDIAN_DEFAULT
+#define TARGET_LINKER_EMULATION TARGET_LINKER_BIG_EMULATION
+#else
+#define TARGET_LINKER_EMULATION TARGET_LINKER_LITTLE_EMULATION
+#endif
+
+#undef SUBTARGET_EXTRA_LINK_SPEC
+#define SUBTARGET_EXTRA_LINK_SPEC " -m" TARGET_LINKER_EMULATION
+
+#define NETBSD_TARGET_LINK_SPEC "%{h*} \
+ -X %{mbig-endian:-EB -m " TARGET_LINKER_BIG_EMULATION "} \
+ %{mlittle-endian:-EL -m " TARGET_LINKER_LITTLE_EMULATION "} \
+ %(netbsd_link_spec)"
+
+#if TARGET_FIX_ERR_A53_835769_DEFAULT
+#define CA53_ERR_835769_SPEC \
+ " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#else
+#define CA53_ERR_835769_SPEC \
+ " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#endif
+
+#ifdef TARGET_FIX_ERR_A53_843419_DEFAULT
+#define CA53_ERR_843419_SPEC \
+ " %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}"
+#else
+#define CA53_ERR_843419_SPEC \
+ " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}"
+#endif
+
+#undef LINK_SPEC
+#define LINK_SPEC NETBSD_TARGET_LINK_SPEC \
+ CA53_ERR_835769_SPEC \
+ CA53_ERR_843419_SPEC
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS() \
+ do \
+ { \
+ NETBSD_OS_CPP_BUILTINS_ELF(); \
+ } \
+ while (0)
+
+#undef SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC NETBSD_CPP_SPEC
+
+#if 0
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
+#endif
+
+#if 0
+/* Uninitialized common symbols in non-PIE executables, even with
+ strong definitions in dependent shared libraries, will resolve
+ to COPY relocated symbol in the executable. See PR65780. */
+#undef TARGET_BINDS_LOCAL_P
+#define TARGET_BINDS_LOCAL_P default_binds_local_p_2
+#endif
+
+/* Use the AAPCS type for wchar_t, override the one from
+ config/netbsd.h. */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "unsigned int"
+
+#if 0
+#undef MCOUNT_NAME
+#define MCOUNT_NAME ".mcount"
+#endif
+
+#endif /* GCC_AARCH64_NETBSD_H */
Index: external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64,v
retrieving revision 1.1.1.3
diff -p -u -u -r1.1.1.3 t-aarch64
--- external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64 2 Feb 2018 01:59:49 -0000 1.1.1.3
+++ external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64 11 Apr 2018 02:25:26 -0000
@@ -26,6 +26,8 @@ OPTIONS_H_EXTRA += $(srcdir)/config/aarc
$(srcdir)/config/aarch64/aarch64-tune.md: $(srcdir)/config/aarch64/gentune.sh \
$(srcdir)/config/aarch64/aarch64-cores.def
+ @echo "NOT REBUILDING $@"
+NetBSD_DISABLED_aarch64-tune.md:
$(SHELL) $(srcdir)/config/aarch64/gentune.sh \
$(srcdir)/config/aarch64/aarch64-cores.def > \
$(srcdir)/config/aarch64/aarch64-tune.md
Index: external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd
===================================================================
RCS file: external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd
diff -N external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ external/gpl3/gcc/dist/gcc/config/aarch64/t-aarch64-netbsd 11 Apr 2018 02:25:26 -0000
@@ -0,0 +1,21 @@
+# Machine description for AArch64 architecture.
+# Copyright (C) 2016-2017 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# .
+
+LIB1ASMSRC = aarch64/lib1funcs.asm
+LIB1ASMFUNCS = _aarch64_sync_cache_range
Index: external/gpl3/gcc/dist/libgcc/config.host
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/dist/libgcc/config.host,v
retrieving revision 1.17
diff -p -u -u -r1.17 config.host
--- external/gpl3/gcc/dist/libgcc/config.host 2 Feb 2018 03:41:07 -0000 1.17
+++ external/gpl3/gcc/dist/libgcc/config.host 11 Apr 2018 02:25:26 -0000
@@ -344,6 +344,11 @@ aarch64*-*-freebsd*)
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
;;
+aarch64*-*-netbsd*)
+ extra_parts="$extra_parts crtfastmath.o"
+ tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
+ tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm"
+ ;;
aarch64*-*-linux*)
extra_parts="$extra_parts crtfastmath.o"
md_unwind_header=aarch64/linux-unwind.h
Index: share/mk/bsd.own.mk
===================================================================
RCS file: /cvsroot/src/share/mk/bsd.own.mk,v
retrieving revision 1.1055
diff -p -u -u -r1.1055 bsd.own.mk
--- share/mk/bsd.own.mk 7 Apr 2018 21:38:30 -0000 1.1055
+++ share/mk/bsd.own.mk 11 Apr 2018 02:25:31 -0000
@@ -50,11 +50,14 @@ NEED_OWN_INSTALL_TARGET?= yes
TOOLCHAIN_MISSING?= no
+# XXX make some other way to default to clang?
+.if 0
.if ${MACHINE_CPU} == "aarch64" && !defined(EXTERNAL_TOOLCHAIN) && ${MKLLVM:Uyes} != "no"
MKLLVM?= yes
HAVE_LLVM?= yes
MKGCC?= no
.endif
+.endif
#
# GCC Using platforms.
@@ -64,12 +67,7 @@ MKGCC?= no
#
# What GCC is used?
#
-.if \
- ${MACHINE_CPU} == "aarch64"
-HAVE_GCC?= 0
-.else
HAVE_GCC?= 6
-.endif
#
# Platforms that can't run a modern GCC natively
Index: sys/altq/altq_priq.c
===================================================================
RCS file: /cvsroot/src/sys/altq/altq_priq.c,v
retrieving revision 1.24
diff -p -u -u -r1.24 altq_priq.c
--- sys/altq/altq_priq.c 28 Jul 2017 13:53:17 -0000 1.24
+++ sys/altq/altq_priq.c 11 Apr 2018 02:25:31 -0000
@@ -317,8 +317,10 @@ priq_class_create(struct priq_if *pif, i
cl->cl_q = malloc(sizeof(class_queue_t), M_DEVBUF,
M_WAITOK|M_ZERO);
- if (cl->cl_q == NULL)
- goto err_ret;
+ if (cl->cl_q == NULL) {
+ free(cl, M_DEVBUF);
+ return (NULL);
+ }
}
pif->pif_classes[pri] = cl;
@@ -372,22 +374,6 @@ priq_class_create(struct priq_if *pif, i
#endif /* ALTQ_RED */
return (cl);
-
- err_ret:
- if (cl->cl_red != NULL) {
-#ifdef ALTQ_RIO
- if (q_is_rio(cl->cl_q))
- rio_destroy((rio_t *)cl->cl_red);
-#endif
-#ifdef ALTQ_RED
- if (q_is_red(cl->cl_q))
- red_destroy(cl->cl_red);
-#endif
- }
- if (cl->cl_q != NULL)
- free(cl->cl_q, M_DEVBUF);
- free(cl, M_DEVBUF);
- return (NULL);
}
static int
Index: sys/arch/aarch64/aarch64/aarch64_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/aarch64/aarch64/aarch64_machdep.c,v
retrieving revision 1.2
diff -p -u -u -r1.2 aarch64_machdep.c
--- sys/arch/aarch64/aarch64/aarch64_machdep.c 1 Apr 2018 04:35:03 -0000 1.2
+++ sys/arch/aarch64/aarch64/aarch64_machdep.c 11 Apr 2018 02:25:31 -0000
@@ -114,7 +114,7 @@ initarm_common(vaddr_t kvm_base, vsize_t
psize_t memsize_total;
vaddr_t kernstart, kernend;
vaddr_t kernstart_l2, kernend_l2; /* L2 table 2MB aligned */
- paddr_t kstartp, kendp; /* physical page of kernel */
+ //paddr_t kstartp, kendp; /* physical page of kernel */
int i;
aarch64_getcacheinfo();
@@ -169,7 +169,7 @@ initarm_common(vaddr_t kvm_base, vsize_t
*/
physical_end -= round_page(MSGBUFSIZE);
bootconfig.dram[0].pages -= atop(round_page(MSGBUFSIZE));
- initmsgbuf(AARCH64_PA_TO_KVA(physical_end), MSGBUFSIZE);
+ initmsgbuf((void *)AARCH64_PA_TO_KVA(physical_end), MSGBUFSIZE);
#ifdef DDB
db_machdep_init();
@@ -179,8 +179,8 @@ initarm_common(vaddr_t kvm_base, vsize_t
/* register free physical memory blocks */
memsize_total = 0;
- kstartp = atop(kernstart_phys);
- kendp = atop(kernend_phys);
+ //kstartp = atop(kernstart_phys);
+ //kendp = atop(kernend_phys);
KASSERT(bp != NULL || nbp == 0);
KASSERT(bp == NULL || nbp != 0);
@@ -239,7 +239,7 @@ initarm_common(vaddr_t kvm_base, vsize_t
/*
* setup lwp0
*/
- uvm_lwp_setuarea(&lwp0, lwp0uspace);
+ uvm_lwp_setuarea(&lwp0, (vaddr_t)lwp0uspace);
memset(&lwp0.l_md, 0, sizeof(lwp0.l_md));
memset(lwp_getpcb(&lwp0), 0, sizeof(struct pcb));
@@ -248,7 +248,7 @@ initarm_common(vaddr_t kvm_base, vsize_t
tf->tf_spsr = SPSR_M_EL0T;
lwp0.l_md.md_utf = lwp0.l_md.md_ktf = tf;
- return tf;
+ return (vaddr_t)tf;
}
Index: sys/arch/aarch64/aarch64/aarch64_reboot.c
===================================================================
RCS file: /cvsroot/src/sys/arch/aarch64/aarch64/aarch64_reboot.c,v
retrieving revision 1.1
diff -p -u -u -r1.1 aarch64_reboot.c
--- sys/arch/aarch64/aarch64/aarch64_reboot.c 1 Apr 2018 04:35:03 -0000 1.1
+++ sys/arch/aarch64/aarch64/aarch64_reboot.c 11 Apr 2018 02:25:31 -0000
@@ -142,7 +142,7 @@ void (*cpu_reset_address0)(void);
void (*cpu_reset_address)(void);
void (*cpu_powerdown_address)(void);
-static int
+static void
docpureset(int howto)
{
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
Index: sys/arch/aarch64/conf/Makefile.aarch64
===================================================================
RCS file: /cvsroot/src/sys/arch/aarch64/conf/Makefile.aarch64,v
retrieving revision 1.9
diff -p -u -u -r1.9 Makefile.aarch64
--- sys/arch/aarch64/conf/Makefile.aarch64 1 Apr 2018 04:35:03 -0000 1.9
+++ sys/arch/aarch64/conf/Makefile.aarch64 11 Apr 2018 02:25:31 -0000
@@ -33,7 +33,7 @@ GENASSYM_CONF= ${A64}/aarch64/genassym.c
## (2) compile settings
##
# CPPFLAGS set by platform-specific Makefile fragment.
-CFLAGS+= -march=armv8-a+nofp+nosimd
+#CFLAGS+= -march=armv8-a+nofp+nosimd
#CFLAGS+= -fomit-frame-pointer
CFLAGS+= -fno-omit-frame-pointer
CFLAGS+= -mno-omit-leaf-frame-pointer
Index: sys/arch/aarch64/include/armreg.h
===================================================================
RCS file: /cvsroot/src/sys/arch/aarch64/include/armreg.h,v
retrieving revision 1.9
diff -p -u -u -r1.9 armreg.h
--- sys/arch/aarch64/include/armreg.h 1 Apr 2018 04:35:03 -0000 1.9
+++ sys/arch/aarch64/include/armreg.h 11 Apr 2018 02:25:31 -0000
@@ -355,11 +355,11 @@ AARCH64REG_WRITE_INLINE(cpacr_el1)
static const uintmax_t
CPACR_TTA = __BIT(28), // System Register Access Traps
- CPACR_FPEN = __BITS(21,20),
- CPACR_FPEN_NONE = __SHIFTIN(0, CPACR_FPEN),
- CPACR_FPEN_EL1 = __SHIFTIN(1, CPACR_FPEN),
- CPACR_FPEN_NONE_2 = __SHIFTIN(2, CPACR_FPEN),
- CPACR_FPEN_ALL = __SHIFTIN(3, CPACR_FPEN);
+ CPACR_FPEN = 0x300000 /*__BITS(21,20)*/,
+ CPACR_FPEN_NONE = /*__SHIFTIN(0,*/ /*(0 + CPACR_FPEN)*/ 0x300000,
+ CPACR_FPEN_EL1 = /*__SHIFTIN(1,*/ /*(1 + CPACR_FPEN)*/ 0x300001,
+ CPACR_FPEN_NONE_2 = /*__SHIFTIN(2,*/ /*(2 + CPACR_FPEN)*/ 0x300002,
+ CPACR_FPEN_ALL = /*__SHIFTIN(3,*/ /*(3 + CPACR_FPEN)*/ 0x300003;
AARCH64REG_READ_INLINE(csselr_el1) // Cache Size Selection Register
AARCH64REG_WRITE_INLINE(csselr_el1)
@@ -853,16 +853,16 @@ AARCH64REG_WRITE_INLINE(cntkctl_el1)
static const uintmax_t
CNTKCTL_EL0PTEN = __BIT(9), // EL0 access for CNTP CVAL/TVAL/CTL
- CNTKCTL_PL0PTEN = CNTKCTL_EL0PTEN,
+ CNTKCTL_PL0PTEN = __BIT(9) /*CNTKCTL_EL0PTEN*/,
CNTKCTL_EL0VTEN = __BIT(8), // EL0 access for CNTV CVAL/TVAL/CTL
- CNTKCTL_PL0VTEN = CNTKCTL_EL0VTEN,
+ CNTKCTL_PL0VTEN = __BIT(8) /*CNTKCTL_EL0VTEN*/,
CNTKCTL_ELNTI = __BITS(7,4),
CNTKCTL_EVNTDIR = __BIT(3),
CNTKCTL_EVNTEN = __BIT(2),
CNTKCTL_EL0VCTEN = __BIT(1), // EL0 access for CNTVCT and CNTFRQ
- CNTKCTL_PL0VCTEN = CNTKCTL_EL0VCTEN,
+ CNTKCTL_PL0VCTEN = __BIT(1) /*CNTKCTL_EL0VCTEN*/,
CNTKCTL_EL0PCTEN = __BIT(0), // EL0 access for CNTPCT and CNTFRQ
- CNTKCTL_PL0PCTEN = CNTKCTL_EL0PCTEN;
+ CNTKCTL_PL0PCTEN = __BIT(0) /*CNTKCTL_EL0PCTEN*/;
AARCH64REG_READ_INLINE(cntp_ctl_el0)
AARCH64REG_WRITE_INLINE(cntp_ctl_el0)
Index: sys/arch/arm/arm32/arm32_reboot.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/arm32/arm32_reboot.c,v
retrieving revision 1.10
diff -p -u -u -r1.10 arm32_reboot.c
--- sys/arch/arm/arm32/arm32_reboot.c 11 Nov 2015 14:50:08 -0000 1.10
+++ sys/arch/arm/arm32/arm32_reboot.c 11 Apr 2018 02:25:32 -0000
@@ -138,7 +138,7 @@ __KERNEL_RCSID(0, "$NetBSD: arm32_reboot
void (*cpu_powerdown_address)(void);
-static int
+static void
docpureset(int howto)
{
if ((howto & RB_POWERDOWN) == RB_POWERDOWN) {
Index: sys/arch/arm/arm32/bus_dma.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/arm32/bus_dma.c,v
retrieving revision 1.107
diff -p -u -u -r1.107 bus_dma.c
--- sys/arch/arm/arm32/bus_dma.c 1 Apr 2018 04:35:03 -0000 1.107
+++ sys/arch/arm/arm32/bus_dma.c 11 Apr 2018 02:25:32 -0000
@@ -1496,7 +1496,7 @@ _bus_dmamem_mmap(bus_dma_tag_t t, bus_dm
for (i = 0; i < nsegs; i++) {
KASSERTMSG((off & PAGE_MASK) == 0,
- "off %#qx (%#x)", off, (int)off & PAGE_MASK);
+ "off %#" PRIx64 " (%#x)", off, (int)off & PAGE_MASK);
KASSERTMSG((segs[i].ds_addr & PAGE_MASK) == 0,
"ds_addr %#lx (%#x)", segs[i].ds_addr,
(int)segs[i].ds_addr & PAGE_MASK);
Index: sys/arch/arm/broadcom/bcm283x_platform.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/broadcom/bcm283x_platform.c,v
retrieving revision 1.4
diff -p -u -u -r1.4 bcm283x_platform.c
--- sys/arch/arm/broadcom/bcm283x_platform.c 1 Apr 2018 04:35:03 -0000 1.4
+++ sys/arch/arm/broadcom/bcm283x_platform.c 11 Apr 2018 02:25:32 -0000
@@ -585,7 +585,7 @@ bcm283x_uartinit(bus_space_tag_t iot, bu
uint32_t res;
bcm2835_mbox_write(iot, ioh, BCMMBOX_CHANARM2VC,
- KERN_VTOPHYS(&vb_uart));
+ KERN_VTOPHYS((vaddr_t)&vb_uart));
bcm2835_mbox_read(iot, ioh, BCMMBOX_CHANARM2VC, &res);
@@ -649,7 +649,7 @@ bcm283x_bootparams(bus_space_tag_t iot,
#endif
0) << 4);
- bcm2835_mbox_write(iot, ioh, BCMMBOX_CHANARM2VC, KERN_VTOPHYS(&vb));
+ bcm2835_mbox_write(iot, ioh, BCMMBOX_CHANARM2VC, KERN_VTOPHYS((vaddr_t)&vb));
bcm2835_mbox_read(iot, ioh, BCMMBOX_CHANARM2VC, &res);
@@ -697,13 +697,13 @@ bcm283x_bootparams(bus_space_tag_t iot,
printf("%s: board model %x\n", __func__,
vb.vbt_boardmodel.model);
if (vcprop_tag_success_p(&vb.vbt_macaddr.tag))
- printf("%s: mac-address %llx\n", __func__,
+ printf("%s: mac-address %" PRIx64 "\n", __func__,
vb.vbt_macaddr.addr);
if (vcprop_tag_success_p(&vb.vbt_boardrev.tag))
printf("%s: board rev %x\n", __func__,
vb.vbt_boardrev.rev);
if (vcprop_tag_success_p(&vb.vbt_serial.tag))
- printf("%s: board serial %llx\n", __func__,
+ printf("%s: board serial %" PRIx64 "\n", __func__,
vb.vbt_serial.sn);
if (vcprop_tag_success_p(&vb.vbt_dmachan.tag))
printf("%s: DMA channel mask 0x%08x\n", __func__,
Index: sys/arch/arm/include/int_fmtio.h
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/include/int_fmtio.h,v
retrieving revision 1.9
diff -p -u -u -r1.9 int_fmtio.h
--- sys/arch/arm/include/int_fmtio.h 13 Aug 2014 19:48:17 -0000 1.9
+++ sys/arch/arm/include/int_fmtio.h 11 Apr 2018 02:25:32 -0000
@@ -58,7 +58,11 @@
#define PRIi8 "i" /* int8_t */
#define PRIi16 "i" /* int16_t */
#define PRIi32 "i" /* int32_t */
+#ifdef __clang__
#define PRIi64 "lli" /* int64_t */
+#else
+#define PRIi64 "li" /* int64_t */
+#endif
#define PRIiLEAST8 "i" /* int_least8_t */
#define PRIiLEAST16 "i" /* int_least16_t */
#define PRIiLEAST32 "i" /* int_least32_t */
@@ -105,7 +109,11 @@
#define PRIx8 "x" /* uint8_t */
#define PRIx16 "x" /* uint16_t */
#define PRIx32 "x" /* uint32_t */
+#ifdef __clang__
#define PRIx64 "llx" /* uint64_t */
+#else
+#define PRIx64 "lx" /* uint64_t */
+#endif
#define PRIxLEAST8 "x" /* uint_least8_t */
#define PRIxLEAST16 "x" /* uint_least16_t */
#define PRIxLEAST32 "x" /* uint_least32_t */