Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: armv5 userland broken



On 2021/06/22 6:28, Rin Okuyama wrote:
Oops... Is this v5 or v5hf? Also, does userland fail even if
only kernel is compiled by GCC9?

I could reproduce the problem. Since I don't have evbarmv5 machine,
I hacked to build ``hpcearmv5'' userland with the attached patch.
Then, init(8) died with fsr=0x13 on WZERO3 (xscale).

On the other hand, this userland works just fine on COMPAT_NETBSD32
on aarch64.

Bits 0x1 and 0x2 in fsr indicate alignment fault, and 0x10 is user.

So, GCC10 seems to emit misaligned codes for kernel (and userland?)
for evbarmv5, and for userland for hpcearmv5 (probably difference
comes from compile options specified for kernel).

I've checked again mknative files I committed last week, but they
seem just OK:

http://www.nerv.org/netbsd/changeset.cgi?id=20210615T082344Z.b62c8960f5d3d0ac7f993a9b7a15defa5a1c1c09#src/external/gpl3/gcc/lib/libstdc++-v3/arch/earm/c++config.h

I will examine further...

Thanks,
rin

On 2021/06/22 1:52, Martin Husemann wrote:
After the gcc switch I can't boot my kirkwood based v5 machines any more:

[  22.9299712] root on 192.168.150.188:/hosts/evbarm
[  22.9299712] kern.module.path=/stand/evbarm/9.99.85/modules
[  23.5099833] data_abort_handler: data_aborts fsr=0x1 far=0xbfffe8bc
init: `/bi[  23.8399836] data_abort_handler: data_aborts fsr=0x1 far=0xbfffe5cc
init: fatal signal: Bus error


I get e.g. a sh.core but that just says:

Program terminated with signal SIGBUS, Bus error.
#0  0xbbed53c8 in ?? ()

... so not very helpfull.


Martin

Index: build.sh
===================================================================
RCS file: /home/netbsd/src/build.sh,v
retrieving revision 1.353
diff -p -u -r1.353 build.sh
--- build.sh	7 Jun 2021 17:11:16 -0000	1.353
+++ build.sh	10 Jun 2021 23:52:09 -0000
@@ -668,6 +668,7 @@ MACHINE=ews4800mips	MACHINE_ARCH=mipseb
 MACHINE=hp300		MACHINE_ARCH=m68k
 MACHINE=hppa		MACHINE_ARCH=hppa
 MACHINE=hpcarm		MACHINE_ARCH=earmv4	ALIAS=hpcearm DEFAULT
+MACHINE=hpcarm		MACHINE_ARCH=earmv5	ALIAS=hpcearmv5
 MACHINE=hpcmips		MACHINE_ARCH=mipsel
 MACHINE=hpcsh		MACHINE_ARCH=sh3el
 MACHINE=i386		MACHINE_ARCH=i386
Index: distrib/hpcarm/instkernel/Makefile
===================================================================
RCS file: /home/netbsd/src/distrib/hpcarm/instkernel/Makefile,v
retrieving revision 1.3
diff -p -u -r1.3 Makefile
--- distrib/hpcarm/instkernel/Makefile	4 Sep 2010 01:16:49 -0000	1.3
+++ distrib/hpcarm/instkernel/Makefile	6 Feb 2021 12:00:02 -0000
@@ -8,9 +8,11 @@
 MINIROOTOBJ!=	cd ${DISTRIBDIR}/miniroot && ${PRINTOBJDIR}
 MINIROOT=	${MINIROOTOBJ}/miniroot.fs
 
-MDSETTARGETS=		INSTALL_IPAQ	${MINIROOT}	netbsd-IPAQ \
-			INSTALL_JORNADA720 ${MINIROOT}	netbsd-JORNADA720 \
-			INSTALL_WZERO3	${MINIROOT}	netbsd-WZERO3
+MDSETTARGETS=		INSTALL_WZERO3	${MINIROOT}	netbsd-WZERO3
+.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earmv4"
+MDSETTARGETS+=		INSTALL_IPAQ	${MINIROOT}	netbsd-IPAQ \
+			INSTALL_JORNADA720 ${MINIROOT}	netbsd-JORNADA720
+.endif
 MDSET_RELEASEDIR=	installation
 
 .include "${DISTRIBDIR}/common/Makefile.mdset"
Index: etc/etc.hpcarm/Makefile.inc
===================================================================
RCS file: /home/netbsd/src/etc/etc.hpcarm/Makefile.inc,v
retrieving revision 1.10
diff -p -u -r1.10 Makefile.inc
--- etc/etc.hpcarm/Makefile.inc	4 Sep 2010 01:16:50 -0000	1.10
+++ etc/etc.hpcarm/Makefile.inc	6 Feb 2021 12:00:02 -0000
@@ -6,9 +6,13 @@
 # If you change the list of distributed kernels, don't forget
 # to update the release documentation in distrib/notes/common/contents
 
-KERNEL_SETS=		IPAQ JORNADA720 WZERO3
+KERNEL_SETS=		WZERO3
+BUILD_KERNELS=		INSTALL_WZERO3
 
-BUILD_KERNELS=		INSTALL_IPAQ INSTALL_JORNADA720 INSTALL_WZERO3
+.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "earmv4"
+KERNEL_SETS+=		IPAQ JORNADA720
+BUILD_KERNELS+=		INSTALL_IPAQ INSTALL_JORNADA720
+.endif
 
 INSTALLATION_DIRS+=	installation/miniroot
 
Index: sys/modules/dtrace/lockstat/Makefile
===================================================================
RCS file: /home/netbsd/src/sys/modules/dtrace/lockstat/Makefile,v
retrieving revision 1.9
diff -p -u -r1.9 Makefile
--- sys/modules/dtrace/lockstat/Makefile	25 Jan 2016 21:56:27 -0000	1.9
+++ sys/modules/dtrace/lockstat/Makefile	21 Jun 2021 22:31:30 -0000
@@ -19,7 +19,8 @@ ARMV:= ${MACHINE_ARCH:S/armv//:S/eb//:S/
 ARMV:= 0
 .endif
 
-.if ${ARMV} > 4
+# XXX not yet for hpcarm
+.if ${ARMV} > 4 && ${MACHINE} != "hpcarm"
 CPPFLAGS+=	-D__HAVE_CPU_COUNTER
 .endif
 


Home | Main Index | Thread Index | Old Index