summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-11-24 17:53:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-11-24 17:53:42 +0000
commit7a90d5732b29d7724f332d8639860539b423c9cd (patch)
tree6a97252c3014aa8bd0b577885f4717cb997feac9 /sys/arch/sparc
parentb50e76635844355014ba05285dc1afbbc97c1e9d (diff)
Harmonize boot() logic across arches:
- ensure RB_DUMP | RB_HALT will cause a dump - or RB_HALT if (cold) While there, honor RB_TIMEBAD on sparc64.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/machdep.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index a1a272fbc87..26afa435d6d 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.70 2001/11/22 09:49:43 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.71 2001/11/24 17:53:41 miod Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -675,9 +675,10 @@ boot(howto)
int i;
static char str[4]; /* room for "-sd\0" */
+ /* If system is cold, just halt. */
if (cold) {
- printf("halted\n\n");
- romhalt();
+ howto |= RB_HALT;
+ goto haltsys;
}
fb_unblank();
@@ -703,8 +704,15 @@ boot(howto)
}
}
(void) splhigh(); /* ??? */
+
+ if (howto & RB_DUMP)
+ dumpsys();
+
+haltsys:
+ /* Run any shutdown hooks */
+ doshutdownhooks();
+
if ((howto & RB_HALT) || (howto & RB_POWERDOWN)) {
- doshutdownhooks();
#if defined(SUN4M)
if (howto & RB_POWERDOWN) {
#if NPOWER > 0 || NTCTRL >0
@@ -722,10 +730,7 @@ boot(howto)
printf("halted\n\n");
romhalt();
}
- if (howto & RB_DUMP)
- dumpsys();
- doshutdownhooks();
printf("rebooting\n\n");
i = 1;
if (howto & RB_SINGLE)