summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-09-02 20:14:09 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-09-02 20:14:09 +0000
commit88ae9b1203fff08413b244ee6ba9cd1401d6ca2f (patch)
treee972e9e23543707ac235c1ede65069d7b8cae248 /sys
parenta1378e228180cbf3a34617ccb6a6430e913c91cb (diff)
There is a weird problems related to interrupts - we need to enable them too
early for the console to be reliable, so revert to the bug console for boot -a.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mvme88k/mvme88k/autoconf.c23
-rw-r--r--sys/arch/mvme88k/mvme88k/machdep.c4
2 files changed, 19 insertions, 8 deletions
diff --git a/sys/arch/mvme88k/mvme88k/autoconf.c b/sys/arch/mvme88k/mvme88k/autoconf.c
index f7447e81218..c097685f7dc 100644
--- a/sys/arch/mvme88k/mvme88k/autoconf.c
+++ b/sys/arch/mvme88k/mvme88k/autoconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autoconf.c,v 1.22 2003/09/02 17:32:44 deraadt Exp $ */
+/* $OpenBSD: autoconf.c,v 1.23 2003/09/02 20:14:08 miod Exp $ */
/*
* Copyright (c) 1998 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -47,6 +47,8 @@
#include <machine/disklabel.h>
#include <machine/vmparam.h>
+#include <dev/cons.h>
+
/*
* The following several variables are related to
* the configuration process, and are used in initializing
@@ -73,21 +75,30 @@ struct device *bootdv; /* set by device drivers (if found) */
void
cpu_configure()
{
+ struct consdev *temp;
+ extern struct consdev bootcons;
+
if (config_rootfound("mainbus", "mainbus") == 0)
panic("no mainbus found");
/*
- * Turn external interrupts on. We have all the drivers in
- * place now!
+ * Turn external interrupts on.
+ *
+ * XXX We have a race here. If we enable interrupts after setroot(),
+ * the kernel dies. If we enable interrupts here, console on cl does
+ * not work (for boot -a). So we switch to the boot console for the
+ * time being...
*/
+ temp = cn_tab;
+ cn_tab = &bootcons;
+
enable_interrupt();
spl0();
setroot();
swapconf();
- /*
- * Done with autoconfig!
- */
+ cn_tab = temp;
+
cold = 0;
}
diff --git a/sys/arch/mvme88k/mvme88k/machdep.c b/sys/arch/mvme88k/mvme88k/machdep.c
index 3a89327e1f4..fdccd66759c 100644
--- a/sys/arch/mvme88k/mvme88k/machdep.c
+++ b/sys/arch/mvme88k/mvme88k/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.107 2003/09/01 18:21:23 miod Exp $ */
+/* $OpenBSD: machdep.c,v 1.108 2003/09/02 20:14:08 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -267,7 +267,7 @@ extern void nullcnpollc(dev_t, int);
#define bootcnpollc nullcnpollc
-static struct consdev bootcons = {
+struct consdev bootcons = {
NULL,
NULL,
bootcngetc,