summaryrefslogtreecommitdiff
path: root/sys/arch/mvme68k
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/mvme68k
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/mvme68k')
-rw-r--r--sys/arch/mvme68k/mvme68k/machdep.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/arch/mvme68k/mvme68k/machdep.c b/sys/arch/mvme68k/mvme68k/machdep.c
index 2eb6a6b45aa..c8002d34884 100644
--- a/sys/arch/mvme68k/mvme68k/machdep.c
+++ b/sys/arch/mvme68k/mvme68k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.55 2001/11/07 01:18:00 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.56 2001/11/24 17:53:41 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -665,17 +665,22 @@ halt_establish(fn, pri)
}
}
-void
+__dead void
boot(howto)
register int howto;
{
+ /* If system is cold, just halt. */
+ if (cold) {
+ howto |= RB_HALT;
+ goto haltsys;
+ }
/* take a snap shot before clobbering any registers */
if (curproc && curproc->p_addr)
savectx(curproc->p_addr);
boothowto = howto;
- if ((howto&RB_NOSYNC) == 0 && waittime < 0) {
+ if ((howto & RB_NOSYNC) == 0 && waittime < 0) {
extern struct proc proc0;
/* do that another panic fly away */
if (curproc == NULL)
@@ -701,10 +706,11 @@ boot(howto)
if (howto & RB_DUMP)
dumpsys();
+haltsys:
/* Run any shutdown hooks. */
doshutdownhooks();
- if (howto&RB_HALT) {
+ if (howto & RB_HALT) {
printf("halted\n\n");
} else {
struct haltvec *hv;