diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1997-08-08 08:27:49 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1997-08-08 08:27:49 +0000 |
commit | c6af50ae96c114059441edde31a2879102e32d99 (patch) | |
tree | e77d44cd72b4d881fb3461d76bdd50f77adc0966 /sys/arch/sparc/dev/cons.c | |
parent | c1492b0f5209b759b0ab6624db56b310c28e48e2 (diff) |
Mostly sync to NetBSD-current 970804.
GENERIC currently compiles and runs; some devices (isp) are not complete and
not yet enabled.
Diffstat (limited to 'sys/arch/sparc/dev/cons.c')
-rw-r--r-- | sys/arch/sparc/dev/cons.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/sys/arch/sparc/dev/cons.c b/sys/arch/sparc/dev/cons.c index 11a1606bae8..fba5c2e4eb1 100644 --- a/sys/arch/sparc/dev/cons.c +++ b/sys/arch/sparc/dev/cons.c @@ -1,5 +1,5 @@ -/* $OpenBSD: cons.c,v 1.5 1996/08/13 08:05:24 downsj Exp $ */ -/* $NetBSD: cons.c,v 1.23.4.1 1996/06/02 09:07:53 mrg Exp $ */ +/* $OpenBSD: cons.c,v 1.6 1997/08/08 08:24:56 downsj Exp $ */ +/* $NetBSD: cons.c,v 1.30 1997/07/07 23:30:23 pk Exp $ */ /* * Copyright (c) 1992, 1993 @@ -70,6 +70,11 @@ #include <machine/autoconf.h> #include <machine/conf.h> +#ifdef RASTERCONSOLE +#include <machine/fbio.h> +#include <machine/fbvar.h> +#endif + #include "zs.h" struct tty *constty = 0; /* virtual console output device */ @@ -286,20 +291,30 @@ cnopen(dev, flag, mode, p) /* output queue doesn't need quoting */ clalloc(&tp->t_outq, 1024, 0); tty_attach(tp); + /* * get the console struct winsize. */ +#ifdef RASTERCONSOLE + if (fbconstty) { + rows = fbrcons_rows(); + cols = fbrcons_cols(); + } +#endif + if (CPU_ISSUN4COR4M) { int i; char *prop; - if ((prop = getpropstring(optionsnode, "screen-#rows"))) { + if (rows == 0 && + (prop = getpropstring(optionsnode, "screen-#rows"))) { i = 0; while (*prop != '\0') i = i * 10 + *prop++ - '0'; rows = (unsigned short)i; } - if ((prop = getpropstring(optionsnode, "screen-#columns"))) { + if (cols == 0 && + (prop = getpropstring(optionsnode, "screen-#columns"))) { i = 0; while (*prop != '\0') i = i * 10 + *prop++ - '0'; @@ -310,8 +325,10 @@ cnopen(dev, flag, mode, p) struct eeprom *ep = (struct eeprom *)eeprom_va; if (ep) { - rows = (u_short)ep->ee_diag.eed_rowsize; - cols = (u_short)ep->ee_diag.eed_colsize; + if (rows == 0) + rows = (u_short)ep->eeTtyRows; + if (cols == 0) + cols = (u_short)ep->eeTtyCols; } } firstopen = 0; |