Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/stand/ofwboot Add `-D' flag to drop to the ...



details:   https://anonhg.NetBSD.org/src/rev/bd7c475badaf
branches:  trunk
changeset: 486620:bd7c475badaf
user:      eeh <eeh%NetBSD.org@localhost>
date:      Fri May 26 22:59:51 2000 +0000

description:
Add `-D' flag to drop to the PROM before jumping to the kernel.

diffstat:

 sys/arch/sparc64/stand/ofwboot/Locore.c |   9 +++++++--
 sys/arch/sparc64/stand/ofwboot/boot.c   |  11 ++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diffs (66 lines):

diff -r 45abb7f27c3c -r bd7c475badaf sys/arch/sparc64/stand/ofwboot/Locore.c
--- a/sys/arch/sparc64/stand/ofwboot/Locore.c   Fri May 26 22:59:31 2000 +0000
+++ b/sys/arch/sparc64/stand/ofwboot/Locore.c   Fri May 26 22:59:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: Locore.c,v 1.6 1998/09/06 21:53:44 eeh Exp $   */
+/*     $NetBSD: Locore.c,v 1.7 2000/05/26 22:59:51 eeh Exp $   */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -378,6 +378,7 @@
        u_int len;
 {
        extern int64_t romp;
+       extern int debug;
        struct {
                cell_t name;
                cell_t nargs;
@@ -398,9 +399,13 @@
        args.arg = ADR2CELL(arg);
        args.len = len;
        openfirmware(&args);
-       printf("OF_chain: prom returned!\n");
+       if (debug) {
+               printf("OF_chain: prom returned!\n");
 
        /* OK, firmware failed us.  Try calling prog directly */
+               printf("Calling entry(0, %p, %x, %lx, %lx)\n", arg, len,
+                       (unsigned long)romp, (unsigned long)romp);
+       }
        entry(0, arg, len, (unsigned long)romp, (unsigned long)romp);
        panic("OF_chain: kernel returned!\n");
        __asm("ta 2" : :);
diff -r 45abb7f27c3c -r bd7c475badaf sys/arch/sparc64/stand/ofwboot/boot.c
--- a/sys/arch/sparc64/stand/ofwboot/boot.c     Fri May 26 22:59:31 2000 +0000
+++ b/sys/arch/sparc64/stand/ofwboot/boot.c     Fri May 26 22:59:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: boot.c,v 1.12 2000/04/05 06:23:33 mrg Exp $    */
+/*     $NetBSD: boot.c,v 1.13 2000/05/26 22:59:51 eeh Exp $    */
 #define DEBUG
 /*
  * Copyright (c) 1997, 1999 Eduardo E. Horvath.  All rights reserved.
@@ -157,10 +157,13 @@
                        break;
                case 'd':
                        *howtop |= RB_KDB;
-                       debug = 1;
+                       if (!debug) debug = 1;
+                       break;
+               case 'D':
+                       debug = 2;
                        break;
                case 'v':
-                       debug = 1;
+                       if (!debug) debug = 1;
                        break;
                }
        }
@@ -218,6 +221,8 @@
        printf("chain: calling OF_chain(%x, %x, %x, %x, %x)\n",
               (void *)RELOC, end - (char *)RELOC, entry, args, l);
 #endif
+       /* if -D is set then pause in the PROM. */
+       if (debug > 1) OF_enter();
        OF_chain((void *)RELOC, ((end - (char *)RELOC)+NBPG)%NBPG, entry, args, l);
        panic("chain");
 }



Home | Main Index | Thread Index | Old Index