diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-09-03 23:20:43 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-09-03 23:20:43 +0000 |
commit | 6efc2e4f99a95259b48a2b919df68078a94935a8 (patch) | |
tree | b768733cbba74326fce3a1619e37e1c839473bd6 /sys/arch/sparc | |
parent | 246ab260eef5bdcbb7d8140f01b91a1c077c8af3 (diff) |
Old (rev 1) OpenPROM will always report as the "fb" node, the first
framebuffer found, even if the PROM environment is set to serial console.
Hence, make sure we won't consider this "fb" node as valid until we are
really using a graphics console.
Will makes drahn@'s IPC happy, and ok jason@
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/dev/zs.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/autoconf.c | 18 |
2 files changed, 16 insertions, 6 deletions
diff --git a/sys/arch/sparc/dev/zs.c b/sys/arch/sparc/dev/zs.c index d04916989e6..bdeb232bed7 100644 --- a/sys/arch/sparc/dev/zs.c +++ b/sys/arch/sparc/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.36 2002/08/12 10:44:04 miod Exp $ */ +/* $OpenBSD: zs.c,v 1.37 2002/09/03 23:20:40 miod Exp $ */ /* $NetBSD: zs.c,v 1.50 1997/10/18 00:00:40 gwr Exp $ */ /*- @@ -1059,7 +1059,7 @@ setup_console: inSource = PROMDEV_KBD; /* FALLTHROUGH */ - case 0: /* keyboard/display */ + case PROMDEV_KBD: /* keyboard/display */ #if NZSKBD > 0 zs_unit = 1; channel = 0; diff --git a/sys/arch/sparc/sparc/autoconf.c b/sys/arch/sparc/sparc/autoconf.c index d5b1f319b2e..47faf351f00 100644 --- a/sys/arch/sparc/sparc/autoconf.c +++ b/sys/arch/sparc/sparc/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.53 2002/08/12 10:44:04 miod Exp $ */ +/* $OpenBSD: autoconf.c,v 1.54 2002/09/03 23:20:42 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.73 1997/07/29 09:41:53 fair Exp $ */ /* @@ -1221,9 +1221,19 @@ mainbus_attach(parent, dev, aux) node = ca->ca_ra.ra_node; /* re-init root node */ - if (promvec->pv_romvec_vers <= 2) - /* remember which frame buffer, if any, is to be /dev/fb */ - fbnode = getpropint(node, "fb", 0); + if (promvec->pv_romvec_vers <= 2) { + /* + * Revision 1 prom will always return a framebuffer device + * node if a framebuffer is installed, even if console is + * set to serial. + */ + if (*promvec->pv_stdout != PROMDEV_SCREEN) + fbnode = 0; + else { + /* remember which frame buffer is the console */ + fbnode = getpropint(node, "fb", 0); + } + } /* Find the "options" node */ node0 = firstchild(node); |