Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x68k/stand Fix "Error occurs, please reset" boot pr...



details:   https://anonhg.NetBSD.org/src/rev/dbad78f65c42
branches:  trunk
changeset: 770287:dbad78f65c42
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Tue Oct 11 13:07:06 2011 +0000

description:
Fix "Error occurs, please reset" boot problem on
X68030 + 060turbo in 060 mode, found on NetBSD booth
at OSC 2011 Hiroshima:

- use -D__daddr_t=int32_t for all bootloader files
  to avoid 64 bit ops in FFS
- explicitly specify -m68020-60 to avoid 64 bit mulsl/mulul
  instructions which need to be handled by 060SP emulation
  but not available in 060turbo IPL ROM
  (LFS still has uint64_t members even with 32bit daddr_t)

The problem was investigated (at least 1.6.2 bootloaders worked)
by Yasushi Oshima at OSC booth, and fixes have been confirmed
by Y.Sugahara on his 060turbo.  Thanks everyone!

Should also be pulled up to netbsd-5.

diffstat:

 sys/arch/x68k/stand/Makefile.booters    |  4 +++-
 sys/arch/x68k/stand/boot_ufs/Makefile   |  5 +++--
 sys/arch/x68k/stand/boot_ustar/Makefile |  3 ++-
 sys/arch/x68k/stand/libsa/Makefile      |  4 +++-
 4 files changed, 11 insertions(+), 5 deletions(-)

diffs (73 lines):

diff -r 2340b0f52a36 -r dbad78f65c42 sys/arch/x68k/stand/Makefile.booters
--- a/sys/arch/x68k/stand/Makefile.booters      Tue Oct 11 12:25:56 2011 +0000
+++ b/sys/arch/x68k/stand/Makefile.booters      Tue Oct 11 13:07:06 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.booters,v 1.6 2011/04/11 15:20:30 tsutsui Exp $
+#      $NetBSD: Makefile.booters,v 1.7 2011/10/11 13:07:06 tsutsui Exp $
 
 S?=    ${.CURDIR}/../../../..
 
@@ -7,6 +7,8 @@
 CFLAGS+= -Wno-pointer-sign
 CFLAGS+= -Werror
 
+CPPFLAGS+=     -D__daddr_t=int32_t
+
 .include <bsd.klinks.mk>
 
 # XXX SHOULD NOT NEED TO DEFINE THESE!
diff -r 2340b0f52a36 -r dbad78f65c42 sys/arch/x68k/stand/boot_ufs/Makefile
--- a/sys/arch/x68k/stand/boot_ufs/Makefile     Tue Oct 11 12:25:56 2011 +0000
+++ b/sys/arch/x68k/stand/boot_ufs/Makefile     Tue Oct 11 13:07:06 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.25 2011/01/22 19:19:24 joerg Exp $
+#      $NetBSD: Makefile,v 1.26 2011/10/11 13:07:06 tsutsui Exp $
 
 NOMAN=         # defined
 
@@ -38,12 +38,13 @@
            ${.ALLSRC} ${MACHINE} ${NEWVERSWHAT}
 
 CFLAGS=        -Os -fomit-frame-pointer
+CFLAGS+= -m68020-60
 CFLAGS+= -W -Wall -Wstrict-prototypes -Wmissing-prototypes
 CPPFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT_TEXTADDR="0x$(BOOT_TEXT)"
 CPPFLAGS+= -DBOOT=\"$(BOOT)\" -DBOOT_VERS=\"$(VERSION)\"
 CPPFLAGS+= -DSCSI_ADHOC_BOOTPART
 #CPPFLAGS+= -DBOOT_DEBUG
-CPPFLAGS+= -DUSE_FFS -DUSE_LFS -DUSE_UFS1 -DUSE_UFS2 -D__daddr_t=int32_t
+CPPFLAGS+= -DUSE_FFS -DUSE_LFS -DUSE_UFS1 -DUSE_UFS2
 CPPFLAGS+= -I${COMMONDIR} -I${LIBIOCS} -I${S} -I. -D_STANDALONE
 AFLAGS=           ${CFLAGS:M-[ID]*}
 LINKFLAGS=   -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript -M
diff -r 2340b0f52a36 -r dbad78f65c42 sys/arch/x68k/stand/boot_ustar/Makefile
--- a/sys/arch/x68k/stand/boot_ustar/Makefile   Tue Oct 11 12:25:56 2011 +0000
+++ b/sys/arch/x68k/stand/boot_ustar/Makefile   Tue Oct 11 13:07:06 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.18 2011/01/22 19:19:24 joerg Exp $
+#      $NetBSD: Makefile,v 1.19 2011/10/11 13:07:06 tsutsui Exp $
 
 NOMAN=         # defined
 
@@ -35,6 +35,7 @@
 CPPFLAGS+= -DTEXTADDR="0x$(TEXT)" -DBOOT_TEXTADDR="0x$(BOOT_TEXT)"
 CPPFLAGS+= -DBOOT=\"$(BOOT)\" -DBOOT_VERS=\"$(VERSION)\"
 CPPFLAGS+= -I${COMMONDIR} -I${LIBIOCS} -I${S} -I. -D_STANDALONE
+CFLAGS+=   -m68020-60
 AFLAGS=           ${CFLAGS:M-[ID]*}
 AFLAGS+=   -Wa,-mc68000
 LINKFLAGS=   -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript -M
diff -r 2340b0f52a36 -r dbad78f65c42 sys/arch/x68k/stand/libsa/Makefile
--- a/sys/arch/x68k/stand/libsa/Makefile        Tue Oct 11 12:25:56 2011 +0000
+++ b/sys/arch/x68k/stand/libsa/Makefile        Tue Oct 11 13:07:06 2011 +0000
@@ -1,7 +1,9 @@
-#      $NetBSD: Makefile,v 1.26 2011/04/12 14:07:35 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.27 2011/10/11 13:07:06 tsutsui Exp $
 
 S=             ${.CURDIR}/../../../..
 
+CFLAGS+=       -m68020-60
+
 CPPFLAGS+=     -nostdinc -I${.OBJDIR} -I. -I${S}
 CPPFLAGS+=     -I${.CURDIR}/../libiocs -I${.CURDIR}/../common
 CPPFLAGS+=     -D_STANDALONE



Home | Main Index | Thread Index | Old Index