Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sun3 On sun3x, cpu_reboot() calls sunmon_abort() fo...



details:   https://anonhg.NetBSD.org/src/rev/662236cb4713
branches:  trunk
changeset: 499042:662236cb4713
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Thu Nov 09 14:38:44 2000 +0000

description:
On sun3x, cpu_reboot() calls sunmon_abort() for PROM bug work-around,
but sunmon_abort() does not restore mon_crp so it causes problems.
Instead, call romVectorPtr->abortEntry (via trap14) from sunmon_halt()
and call it from cpu_reboot().

Now PROM boot command works properly even after halt on my 3/80.

diffstat:

 sys/arch/sun3/sun3/sunmon.c   |   8 +++++++-
 sys/arch/sun3/sun3x/machdep.c |  14 ++------------
 2 files changed, 9 insertions(+), 13 deletions(-)

diffs (50 lines):

diff -r 09de824eaadb -r 662236cb4713 sys/arch/sun3/sun3/sunmon.c
--- a/sys/arch/sun3/sun3/sunmon.c       Thu Nov 09 14:17:19 2000 +0000
+++ b/sys/arch/sun3/sun3/sunmon.c       Thu Nov 09 14:38:44 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sunmon.c,v 1.10 2000/09/24 12:32:39 jdolecek Exp $     */
+/*     $NetBSD: sunmon.c,v 1.11 2000/11/09 14:38:44 tsutsui Exp $      */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -117,6 +117,12 @@
        *romVectorPtr->vector_cmd = sunmon_vcmd;
 #ifdef _SUN3X_
        loadcrp(&mon_crp);
+       /*
+        * The PROM monitor "exit_to_mon" function appears to have problems...
+        * SunOS uses the "abort" function when you halt (bug work-around?)
+        * so we might as well do the same.
+        */
+       asm(" trap #14"); /* mon_exit_to_mon() provokes PROM monitor bug */
 #endif
        mon_exit_to_mon();
        /*NOTREACHED*/
diff -r 09de824eaadb -r 662236cb4713 sys/arch/sun3/sun3x/machdep.c
--- a/sys/arch/sun3/sun3x/machdep.c     Thu Nov 09 14:17:19 2000 +0000
+++ b/sys/arch/sun3/sun3x/machdep.c     Thu Nov 09 14:38:44 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.60 2000/09/13 15:00:23 thorpej Exp $     */
+/*     $NetBSD: machdep.c,v 1.61 2000/11/09 14:38:44 tsutsui Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -519,17 +519,7 @@
        if (howto & RB_HALT) {
        haltsys:
                printf("Kernel halted.\n");
-#if 0
-               /*
-                * This calls the PROM monitor "exit_to_mon" function
-                * which appears to have problems...  SunOS uses the
-                * "abort" function when you halt (bug work-around?)
-                * so we might as well do the same.
-                */
-               sunmon_halt(); /* provokes PROM monitor bug */
-#else
-               sunmon_abort();
-#endif
+               sunmon_halt();
        }
 
        /*



Home | Main Index | Thread Index | Old Index