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 | |
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')
-rw-r--r-- | sys/arch/mvme88k/dev/cl.c | 6 | ||||
-rw-r--r-- | sys/arch/mvme88k/dev/dart.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c index 713e66f638b..c1f6af2fdd4 100644 --- a/sys/arch/mvme88k/dev/cl.c +++ b/sys/arch/mvme88k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.38 2004/02/10 10:06:48 miod Exp $ */ +/* $OpenBSD: cl.c,v 1.39 2004/02/10 10:30:25 miod Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -39,6 +39,7 @@ #include <machine/autoconf.h> #include <machine/conf.h> #include <machine/cpu.h> +#include <machine/locore.h> #include <machine/psl.h> #include <dev/cons.h> @@ -920,10 +921,11 @@ clcnprobe(cp) int maj; /* bomb if it'a a MVME188 */ - if (brdtyp == BRD_188) { + if (brdtyp == BRD_188 || badaddr(CD2400_BASE_ADDR, 1) != 0) { cp->cn_pri = CN_DEAD; return; } + /* locate the major number */ for (maj = 0; maj < nchrdev; maj++) if (cdevsw[maj].d_open == clopen) 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) |