diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-02-10 10:30:26 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-02-10 10:30:26 +0000 |
commit | 95d9486163b5e0ee7ad41709467c83170b154ae0 (patch) | |
tree | c3ba398410dfc22acee1954e845626b86d168252 /sys/arch/mvme88k/dev/dart.c | |
parent | 04fc09e9697c3885bb44b66d1eb64b908c5eceb4 (diff) |
Check for the device existence in cnprobe() as done in match(), to be sure
we don't try to attach a phantom console.
It seems that some late 187 models do not have cl0 at the expected address...
Diffstat (limited to 'sys/arch/mvme88k/dev/dart.c')
-rw-r--r-- | sys/arch/mvme88k/dev/dart.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c index 23ef06d271a..32f1835cd10 100644 --- a/sys/arch/mvme88k/dev/dart.c +++ b/sys/arch/mvme88k/dev/dart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dart.c,v 1.28 2004/02/10 10:06:48 miod Exp $ */ +/* $OpenBSD: dart.c,v 1.29 2004/02/10 10:30:25 miod Exp $ */ /* * Mach Operating System @@ -42,6 +42,7 @@ #include <machine/conf.h> #include <machine/cpu.h> #include <machine/cpu_number.h> +#include <machine/locore.h> #include <machine/psl.h> #include <dev/cons.h> @@ -1144,10 +1145,11 @@ dartcnprobe(cp) { int maj; - if (brdtyp != BRD_188) { + if (brdtyp != BRD_188 || badaddr(DART_BASE, 2) != 0) { cp->cn_pri = CN_DEAD; return; } + /* locate the major number */ for (maj = 0; maj < nchrdev; maj++) if (cdevsw[maj].d_open == dartopen) |