Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/arch/mvme68k Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/9db24a4e9166
branches:  netbsd-6
changeset: 776463:9db24a4e9166
user:      riz <riz%NetBSD.org@localhost>
date:      Mon Sep 23 14:20:42 2013 +0000

description:
Pull up following revision(s) (requested by tsutsui in ticket #954):
        sys/arch/mvme68k/stand/libbug/outln.c: revision 1.4
        sys/arch/mvme68k/stand/libsa/Makefile.inc: revision 1.6
        sys/arch/mvme68k/stand/Makefile.booters: revision 1.24
        sys/arch/mvme68k/include/prom.h: revision 1.18
        sys/arch/mvme68k/stand/libsa/Makefile: revision 1.34
        sys/arch/mvme68k/stand/libbug/outstr.c: revision 1.4
Explicitly link SRT0.o (Standalone RunTime startup code) first.
This is my fault on changes to make mvme68k bootloaders use MI libsa:
http://mail-index.netbsd.org/source-changes/2011/01/02/msg016539.html
MVME PROM requires raw binaries (by objcopy -O binary) so we have to
make sure the entry point is located at the first address of the binaries.
The problem (6.1 netboot fails with an illegal instruction message)
is reported by Andrew Gillham on port-mvme68k@:
http://mail-index.netbsd.org/port-mvme68k/2013/09/17/msg000082.html
Note mvme68k bootloadres in netbsd-6 still have another bug triggered
by gcc-4.5.
Should be pulled up to netbsd-6 branches.
Make MVMEPROM_ARG2() macro take two args in a single asm statement.
Fixes a problem that a wrong address is passed to the MVMEPROM outstr
function (then caused garbages on screen) after we switched to gcc-4.5.
Reported and confirmed by Andrew Gillham on port-mvme68k@:
http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html
http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html
No error on "build.sh -m mvme68k build" builds.
Should be pulled up to netbsd-6 branches.

diffstat:

 sys/arch/mvme68k/include/prom.h           |  8 +++++---
 sys/arch/mvme68k/stand/Makefile.booters   |  4 +++-
 sys/arch/mvme68k/stand/libbug/outln.c     |  5 ++---
 sys/arch/mvme68k/stand/libbug/outstr.c    |  5 ++---
 sys/arch/mvme68k/stand/libsa/Makefile     |  6 ++++--
 sys/arch/mvme68k/stand/libsa/Makefile.inc |  5 ++---
 6 files changed, 18 insertions(+), 15 deletions(-)

diffs (115 lines):

diff -r b0768d8d0de8 -r 9db24a4e9166 sys/arch/mvme68k/include/prom.h
--- a/sys/arch/mvme68k/include/prom.h   Sun Sep 22 20:30:55 2013 +0000
+++ b/sys/arch/mvme68k/include/prom.h   Mon Sep 23 14:20:42 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: prom.h,v 1.17 2005/12/24 23:24:01 perry Exp $  */
+/*     $NetBSD: prom.h,v 1.17.118.1 2013/09/23 14:20:42 riz Exp $      */
 
 /*
  * Copyright (c) 1995 Theo de Raadt
@@ -155,8 +155,10 @@
        __asm volatile ("clrl %sp@-")
 #define MVMEPROM_ARG1(arg) \
        __asm volatile ("movel %0, %%sp@-"::"d" (arg))
-#define MVMEPROM_ARG2(arg) \
-       __asm volatile ("movel %0, %%sp@-"::"d" (arg))
+#define MVMEPROM_ARG2(arg0, arg1)                              \
+       __asm volatile ("movel %0, %%sp@-;"                     \
+                       "movel %1, %%sp@-;"                     \
+                       :: "d" (arg0), "d" (arg1):)
 #define MVMEPROM_GETRES(ret) \
        __asm volatile ("movel %%sp@+,%0": "=d" (ret):)
 #define MVMEPROM_GETSR(ret) \
diff -r b0768d8d0de8 -r 9db24a4e9166 sys/arch/mvme68k/stand/Makefile.booters
--- a/sys/arch/mvme68k/stand/Makefile.booters   Sun Sep 22 20:30:55 2013 +0000
+++ b/sys/arch/mvme68k/stand/Makefile.booters   Mon Sep 23 14:20:42 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.booters,v 1.22 2011/01/22 19:19:20 joerg Exp $
+#      $NetBSD: Makefile.booters,v 1.22.10.1 2013/09/23 14:20:42 riz Exp $
 
 S?=            ${.CURDIR}/../../../..
 MDEC_DIR?=     /usr/mdec
@@ -59,6 +59,8 @@
 LIBSA=         ${LIBSA_DIR}/lib/sa/libsa.a
 LIBKERN=       ${LIBSA_DIR}/lib/kern/libkern.a
 
+SRTOBJ?= ${LIBSA_DIR}/SRT0.o
+
 LIB_BUG_DIR=   ${.CURDIR}/../libbug
 LIBBUG_DIR!=   cd ${LIB_BUG_DIR} && ${PRINTOBJDIR}
 LIBBUG=${LIBBUG_DIR}/libbug.a
diff -r b0768d8d0de8 -r 9db24a4e9166 sys/arch/mvme68k/stand/libbug/outln.c
--- a/sys/arch/mvme68k/stand/libbug/outln.c     Sun Sep 22 20:30:55 2013 +0000
+++ b/sys/arch/mvme68k/stand/libbug/outln.c     Mon Sep 23 14:20:42 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: outln.c,v 1.3 2008/01/12 09:54:31 tsutsui Exp $        */
+/*     $NetBSD: outln.c,v 1.3.50.1 2013/09/23 14:20:42 riz Exp $       */
 
 /*
  * bug routines -- assumes that the necessary sections of memory
@@ -13,7 +13,6 @@
 mvmeprom_outln(char *start, char *end)
 {
 
-       MVMEPROM_ARG1(end);
-       MVMEPROM_ARG2(start);
+       MVMEPROM_ARG2(end, start);
        MVMEPROM_CALL(MVMEPROM_OUTSTRCRLF);
 }
diff -r b0768d8d0de8 -r 9db24a4e9166 sys/arch/mvme68k/stand/libbug/outstr.c
--- a/sys/arch/mvme68k/stand/libbug/outstr.c    Sun Sep 22 20:30:55 2013 +0000
+++ b/sys/arch/mvme68k/stand/libbug/outstr.c    Mon Sep 23 14:20:42 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: outstr.c,v 1.3 2008/01/12 09:54:31 tsutsui Exp $       */
+/*     $NetBSD: outstr.c,v 1.3.50.1 2013/09/23 14:20:42 riz Exp $      */
 
 /*
  * bug routines -- assumes that the necessary sections of memory
@@ -13,7 +13,6 @@
 mvmeprom_outstr(char *start, char *end)
 {
 
-       MVMEPROM_ARG1(end);
-       MVMEPROM_ARG2(start);
+       MVMEPROM_ARG2(end, start);
        MVMEPROM_CALL(MVMEPROM_OUTSTR);
 }
diff -r b0768d8d0de8 -r 9db24a4e9166 sys/arch/mvme68k/stand/libsa/Makefile
--- a/sys/arch/mvme68k/stand/libsa/Makefile     Sun Sep 22 20:30:55 2013 +0000
+++ b/sys/arch/mvme68k/stand/libsa/Makefile     Mon Sep 23 14:20:42 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.33 2011/01/02 05:30:12 tsutsui Exp $
+#      $NetBSD: Makefile,v 1.33.14.1 2013/09/23 14:20:42 riz Exp $
 
 S!= cd ${.CURDIR}/../../../..; pwd
 
@@ -31,7 +31,9 @@
 
 LIBS= ${LIBSA} ${LIBKERN}
 
-all realall: ${LIBS}
+CLEANFILES+= SRT0.o
+
+all realall: ${LIBS} SRT0.o
 
 cleandir distclean: .WAIT cleanlibdir
 
diff -r b0768d8d0de8 -r 9db24a4e9166 sys/arch/mvme68k/stand/libsa/Makefile.inc
--- a/sys/arch/mvme68k/stand/libsa/Makefile.inc Sun Sep 22 20:30:55 2013 +0000
+++ b/sys/arch/mvme68k/stand/libsa/Makefile.inc Mon Sep 23 14:20:42 2013 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.5 2011/01/02 05:30:12 tsutsui Exp $
+#      $NetBSD: Makefile.inc,v 1.5.14.1 2013/09/23 14:20:42 riz Exp $
 
 S!= cd ${SA_EXTRADIR}/../../../..; pwd
 
@@ -9,8 +9,7 @@
 
 SRC_mvme= exec_mvme.c
 
-SRC_here= SRT0.S \
-         bugdev.c \
+SRC_here= bugdev.c \
          chiptotime.c clock.c \
          parse_args.c
 



Home | Main Index | Thread Index | Old Index