Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/news68k Make sure to return PROM prompt even if loa...



details:   https://anonhg.NetBSD.org/src/rev/ccae4e2efc71
branches:  trunk
changeset: 499634:ccae4e2efc71
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sat Nov 25 04:42:06 2000 +0000

description:
Make sure to return PROM prompt even if loading kernel fails halfway.

diffstat:

 sys/arch/news68k/include/romcall.h       |   3 ++-
 sys/arch/news68k/stand/boot/boot.c       |  10 ++++++++--
 sys/arch/news68k/stand/boot/locore.S     |  10 +++++-----
 sys/arch/news68k/stand/bootxx/start.S    |   5 +++--
 sys/arch/news68k/stand/common/romcalls.S |   4 ++--
 5 files changed, 20 insertions(+), 12 deletions(-)

diffs (108 lines):

diff -r 1af258989918 -r ccae4e2efc71 sys/arch/news68k/include/romcall.h
--- a/sys/arch/news68k/include/romcall.h        Sat Nov 25 03:03:35 2000 +0000
+++ b/sys/arch/news68k/include/romcall.h        Sat Nov 25 04:42:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: romcall.h,v 1.1 1999/12/09 14:53:13 tsutsui Exp $      */
+/*     $NetBSD: romcall.h,v 1.2 2000/11/25 04:42:06 tsutsui Exp $      */
 
 /*-
  * Copyright (C) 1999 Tsubai Masanari.  All rights reserved.
@@ -54,6 +54,7 @@
 #define BOOTDEV_ST     6       /* SCSI TAPE */
 
 #ifndef _LOCORE
+void rom_halt(void);
 int rom_open(const char * ,int);
 int rom_close(int);
 int rom_read(int, void *, int);
diff -r 1af258989918 -r ccae4e2efc71 sys/arch/news68k/stand/boot/boot.c
--- a/sys/arch/news68k/stand/boot/boot.c        Sat Nov 25 03:03:35 2000 +0000
+++ b/sys/arch/news68k/stand/boot/boot.c        Sat Nov 25 04:42:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.2 2000/02/08 16:17:34 tsutsui Exp $ */
+/*     $NetBSD: boot.c,v 1.3 2000/11/25 04:42:06 tsutsui Exp $ */
 
 /*-
  * Copyright (C) 1999 Izumi Tsutsui.  All rights reserved.
@@ -102,8 +102,14 @@
                if (fd != -1)
                        break;
        }
-       if (fd == -1)
+       if (fd == -1) {
+#if 0 /* bootxx() may be overrided by loaded kernel */
                return;
+#else
+               rom_halt();
+               /* NOTREACHED */
+#endif
+       }
 
        DPRINTF("entry = 0x%x\n", (int)marks[MARK_ENTRY]);
        DPRINTF("ssym = 0x%x\n", (int)marks[MARK_SYM]);
diff -r 1af258989918 -r ccae4e2efc71 sys/arch/news68k/stand/boot/locore.S
--- a/sys/arch/news68k/stand/boot/locore.S      Sat Nov 25 03:03:35 2000 +0000
+++ b/sys/arch/news68k/stand/boot/locore.S      Sat Nov 25 04:42:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.2 2000/02/08 16:17:34 tsutsui Exp $       */
+/*     $NetBSD: locore.S,v 1.3 2000/11/25 04:42:07 tsutsui Exp $       */
 
 /*-
  * Copyright (C) 1999 Izumi Tsutsui.  All rights reserved.
@@ -27,7 +27,8 @@
  */
 
 #include <m68k/asm.h>
-#include <m68k/cpu.h>
+
+       .set    IC_CLEAR,0x9
 
        .text
        .align  4
@@ -42,9 +43,8 @@
        dbra    %d0,1b
 
        jra     _C_LABEL(boot)
-       jra     _ASM_LABEL(halt)
 
 ENTRY_NOPROFILE(ICIA)
-       movl    #0x9, %d0       | IC_CLEAR
-       movc    %d0, %cacr
+       movl    #IC_CLEAR,%d0
+       movc    %d0,%cacr
        rts
diff -r 1af258989918 -r ccae4e2efc71 sys/arch/news68k/stand/bootxx/start.S
--- a/sys/arch/news68k/stand/bootxx/start.S     Sat Nov 25 03:03:35 2000 +0000
+++ b/sys/arch/news68k/stand/bootxx/start.S     Sat Nov 25 04:42:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: start.S,v 1.1 1999/12/09 14:53:23 tsutsui Exp $        */
+/*     $NetBSD: start.S,v 1.2 2000/11/25 04:42:07 tsutsui Exp $        */
 
 /*-
  * Copyright (C) 1999 Izumi Tsutsui. All rights reserved.
@@ -52,5 +52,6 @@
        movl    %d4,%sp@-       | %d4: physmem
 
        jbsr    _C_LABEL(bootxx)
+       lea     %sp@(16),%sp
 
-       jra     _ASM_LABEL(halt)
+       jra     _C_LABEL(rom_halt)
diff -r 1af258989918 -r ccae4e2efc71 sys/arch/news68k/stand/common/romcalls.S
--- a/sys/arch/news68k/stand/common/romcalls.S  Sat Nov 25 03:03:35 2000 +0000
+++ b/sys/arch/news68k/stand/common/romcalls.S  Sat Nov 25 04:42:06 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: romcalls.S,v 1.1 1999/12/09 14:53:24 tsutsui Exp $     */
+/*     $NetBSD: romcalls.S,v 1.2 2000/11/25 04:42:07 tsutsui Exp $     */
 
 /*-
  * Copyright (C) 1999 Izumi Tsutsui.  All rights reserved.
@@ -32,7 +32,7 @@
        .text
        .align  4
 
-ASENTRY_NOPROFILE(halt)
+ENTRY_NOPROFILE(rom_halt)
        moveq   #8, %d7         | RB_HALT
        trap    #15
 



Home | Main Index | Thread Index | Old Index