diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2007-12-14 16:16:29 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2007-12-14 16:16:29 +0000 |
commit | a52591745fbd69b99f4983026ad4d7e284b9522b (patch) | |
tree | d648d13a377619c1b2dd4a44aaf2ef16cfeefe80 /sys/arch/sgi | |
parent | 8cb833e766600e98ee5d3833ca1967b837b5ffe8 (diff) |
Enable console support for SGI O2 workstations. Switch between the serial
and graphical console based on the selection made in the ARCBIOS.
Early attachment of gbe(4) is still required, otherwise we have a working
graphical console.
ok miod@
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r-- | sys/arch/sgi/conf/files.sgi | 6 | ||||
-rw-r--r-- | sys/arch/sgi/dev/wscons_machdep.c | 32 |
2 files changed, 28 insertions, 10 deletions
diff --git a/sys/arch/sgi/conf/files.sgi b/sys/arch/sgi/conf/files.sgi index 70dd2fd625d..0ce6823dca3 100644 --- a/sys/arch/sgi/conf/files.sgi +++ b/sys/arch/sgi/conf/files.sgi @@ -1,4 +1,4 @@ -# $OpenBSD: files.sgi,v 1.15 2007/11/27 15:31:00 jsing Exp $ +# $OpenBSD: files.sgi,v 1.16 2007/12/14 16:16:28 jsing Exp $ # # maxpartitions must be first item in files.${ARCH} # @@ -112,14 +112,14 @@ file arch/sgi/dev/mavb.c mavb include "dev/pckbc/files.pckbc" device mkbc: pckbcslot attach mkbc at macebus -file arch/sgi/dev/mkbc.c mkbc +file arch/sgi/dev/mkbc.c mkbc needs-flag # Raster operations include "dev/rasops/files.rasops" include "dev/wsfont/files.wsfont" # -# wscons console +# wscons console # include "dev/wscons/files.wscons" diff --git a/sys/arch/sgi/dev/wscons_machdep.c b/sys/arch/sgi/dev/wscons_machdep.c index e51ccdcd8b1..e5142925404 100644 --- a/sys/arch/sgi/dev/wscons_machdep.c +++ b/sys/arch/sgi/dev/wscons_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wscons_machdep.c,v 1.5 2007/11/13 12:01:45 jsing Exp $ */ +/* $OpenBSD: wscons_machdep.c,v 1.6 2007/12/14 16:16:28 jsing Exp $ */ /* * Copyright (c) 2001 Aaron Campbell @@ -36,15 +36,23 @@ #include <machine/autoconf.h> #include <machine/bus.h> +#include <mips64/arcbios.h> + +#include <sgi/dev/mkbcreg.h> +#include <sgi/localbus/macebus.h> + #include <dev/cons.h> +#include <dev/ic/pckbcvar.h> +#include <dev/usb/ukbdvar.h> +#include <dev/wscons/wskbdvar.h> +#include <dev/wscons/wsconsio.h> + +#include "mkbc.h" #include "wsdisplay.h" #if NWSDISPLAY > 0 #include <dev/wscons/wsdisplayvar.h> #endif -#include <dev/wscons/wskbdvar.h> -#include <dev/wscons/wsconsio.h> -#include <dev/usb/ukbdvar.h> cons_decl(ws); @@ -53,19 +61,25 @@ wscnprobe(struct consdev *cp) { int maj; - /* locate the major number */ + /* Locate the major number. */ for (maj = 0; maj < nchrdev; maj++) { if (cdevsw[maj].d_open == wsdisplayopen) break; } if (maj == nchrdev) { - /* we are not in cdevsw[], give up */ + /* We are not in cdevsw[], give up. */ panic("wsdisplay is not in cdevsw[]"); } cp->cn_dev = makedev(maj, 0); - cp->cn_pri = CN_INTERNAL; + + /* Attach as console if necessary. */ + if (strncmp(bios_console, "video", 5) == 0) { + cp->cn_pri = CN_REMOTE; + } else { + cp->cn_pri = CN_INTERNAL; + } } void @@ -78,6 +92,10 @@ static int initted; initted = 1; +#if NMKBC > 0 + if (!mkbc_cnattach(&macebus_tag, 0x00320000, PCKBC_KBD_SLOT)) + return; +#endif #if notyet ukbd_cnattach(); #endif |