Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/shark - Switch to wscons(4) with MI vga(4), pckbc(4...



details:   https://anonhg.NetBSD.org/src/rev/e917739bc0c7
branches:  trunk
changeset: 572632:e917739bc0c7
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jan 09 15:39:59 2005 +0000

description:
- Switch to wscons(4) with MI vga(4), pckbc(4) and pms(4).
- Reorganize console initialization code like i386 rather than cninit().
Note old pccons/opms and ofcons support still works.

XXX Xserver is not tested because XF86_4 doesn't have support
XXX for IGS CyberPro2010 on shark. (yet?)

diffstat:

 sys/arch/shark/conf/GENERIC                |   63 +++++++++++-
 sys/arch/shark/conf/files.shark            |   16 +-
 sys/arch/shark/conf/majors.shark           |    7 +-
 sys/arch/shark/ofw/com_ofisa_consolehack.c |   87 ----------------
 sys/arch/shark/ofw/consinit.c              |   63 ------------
 sys/arch/shark/shark/conf.c                |   82 ---------------
 sys/arch/shark/shark/consinit.c            |  152 +++++++++++++++++++++++++++++
 7 files changed, 226 insertions(+), 244 deletions(-)

diffs (truncated from 586 to 300 lines):

diff -r a6486043059f -r e917739bc0c7 sys/arch/shark/conf/GENERIC
--- a/sys/arch/shark/conf/GENERIC       Sun Jan 09 15:29:27 2005 +0000
+++ b/sys/arch/shark/conf/GENERIC       Sun Jan 09 15:39:59 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: GENERIC,v 1.37 2005/01/05 09:06:33 tsutsui Exp $
+#      $NetBSD: GENERIC,v 1.38 2005/01/09 15:39:59 tsutsui Exp $
 #
 # Generic Shark configuration.
 #
@@ -7,7 +7,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.37 $"
+#ident         "GENERIC-$Revision: 1.38 $"
 
 # estimated number of users
 maxusers       32
@@ -167,6 +167,48 @@
 #options       KERNEL_DEBUG    # compile in kernel debugging capability
 #makeoptions   DEBUG="-g"      # compile full symbol table
 
+#
+# wscons options
+#
+# builtin terminal emulations
+#options       WSEMUL_SUN              # sun terminal emulation
+options        WSEMUL_VT100            # VT100 / VT220 emulation
+# customization of console and kernel output - see dev/wscons/wsdisplayvar.h
+#options       WSDISPLAY_CUSTOM_OUTPUT # color customization from wsconsctl(8)
+#options       WS_DEFAULT_FG=WSCOL_WHITE
+#options       WS_DEFAULT_BG=WSCOL_BLACK
+#options       WS_DEFAULT_COLATTR="(0)"
+#options       WS_DEFAULT_MONOATTR="(0)"
+options        WS_KERNEL_FG=WSCOL_GREEN
+#options       WS_KERNEL_BG=WSCOL_BLACK
+#options       WS_KERNEL_COLATTR=""
+#options       WS_KERNEL_MONOATTR=""
+# customization of console border color
+#options       WSDISPLAY_CUSTOM_BORDER # border customization from wsconsctl(8)
+#options       WSDISPLAY_BORDER_COLOR=WSCOL_BLUE       # default color
+# compatibility to other console drivers
+options        WSDISPLAY_COMPAT_PCVT           # emulate some ioctls
+options        WSDISPLAY_COMPAT_SYSCONS        # emulate some ioctls
+options        WSDISPLAY_COMPAT_USL            # VT handling
+options        WSDISPLAY_COMPAT_RAWKBD         # can get raw scancodes
+# see dev/pckbc/wskbdmap_mfii.c for implemented layouts
+#options       PCKBD_LAYOUT="(KB_DE | KB_NODEAD)"
+#options       PCKBD_LAYOUT="(KB_US | KB_SWAPCTRLCAPS)"
+# allocate a number of virtual screens at autoconfiguration time
+#options       WSDISPLAY_DEFAULTSCREENS=4
+# use a large software cursor that doesn't blink
+#options       PCDISPLAY_SOFTCURSOR
+# modify the screen type of the console; defaults to "80x25"
+#options       VGA_CONSOLE_SCREENTYPE="\"80x24\""
+# the following enables some functions to get mouse console support.
+# if you want a really secure system, it may be better not to enable them,
+# see wsmoused(8), section SECURITY CONSIDERATIONS for more info.
+#options       WSDISPLAY_CHARFUNCS             # mouse console support
+# console scrolling support.
+#options       WSDISPLAY_SCROLLSUPPORT
+# enable VGA raster mode capable of displaying multilingual text on console
+#options       VGA_RASTERCONSOLE
+
 config         netbsd          root on ? type ?
 
 # The main bus device
@@ -197,15 +239,24 @@
 sd*            at atapibus? drive?
 
 # PCCONS@OFW
-ofisapc*       at ofbus?
-pc*            at ofisapc?
+#ofisapc*      at ofbus?
+#pc*           at ofisapc?
 #options       FRENCH_KBD
 #options       FINNISH_KBD
 #options       GERMAN_KBD
 #options       NORWEGIAN_KBD
 
 # PS/2 Mouse
-opms0          at spckbd? irq 12
+#opms0         at spckbd? irq 12
+
+# wscons
+pckbc*         at ofisa?
+pckbd*         at pckbc?
+pms*           at pckbc?
+vga*           at ofbus?
+wsdisplay*     at vga?
+wskbd*         at pckbd? console ?
+wsmouse*       at pms? mux 0
 
 # CS8900 Ethernet@OFW
 cs*            at ofisa?
@@ -252,6 +303,8 @@
 pseudo-device  openfirm                # /dev/openfirm
 #pseudo-device vcoda   4               # coda kernel <-> cachemanager
 pseudo-device  clockctl                # user control of clock subsystem
+pseudo-device  wsmux                   # mouse & keyboard multiplexor
+pseudo-device  wsfont
 pseudo-device  ksyms                   # /dev/ksyms
 #pseudo-device pf                      # PF packet filter
 #pseudo-device pflog                   # PF log if
diff -r a6486043059f -r e917739bc0c7 sys/arch/shark/conf/files.shark
--- a/sys/arch/shark/conf/files.shark   Sun Jan 09 15:29:27 2005 +0000
+++ b/sys/arch/shark/conf/files.shark   Sun Jan 09 15:39:59 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.shark,v 1.8 2005/01/05 09:13:29 tsutsui Exp $
+#      $NetBSD: files.shark,v 1.9 2005/01/09 15:39:59 tsutsui Exp $
 #
 # First try for arm-specific configuration info
 #
@@ -30,6 +30,9 @@
 include "dev/rasops/files.rasops"
 include "dev/wsfont/files.wsfont"
 
+# Include pckbport stuff
+include "dev/pckbport/files.pckbport"
+
 #
 # Machine-independent ATA drivers
 #
@@ -42,9 +45,8 @@
 file   arch/shark/ofw/ofw.c
 file   arch/shark/ofw/oftodclock.c
 
-# OFW console initialization
-file   arch/shark/ofw/consinit.c
-file   dev/cninit.c
+# console initialization
+file   arch/shark/shark/consinit.c
 
 # ISA DMA glue
 file   arch/shark/isa/isadma_machdep.c         isadma
@@ -53,7 +55,6 @@
 include "dev/ofisa/files.ofisa"
 file   arch/shark/ofw/ofisa_machdep.c          ofisa
 file   arch/shark/ofw/com_ofisa_machdep.c      com_ofisa
-file   arch/shark/ofw/com_ofisa_consolehack.c  com_ofisa       # XXX
 file   arch/shark/ofw/if_cs_ofisa_machdep.c    cs_ofisa
 file   arch/shark/ofw/lpt_ofisa_machdep.c      lpt_ofisa | atppc_ofisa
 file   arch/shark/ofw/wdc_ofisa_machdep.c      wdc_ofisa
@@ -95,7 +96,6 @@
 
 # Generic MD files
 file   arch/shark/shark/autoconf.c
-file   arch/shark/shark/conf.c
 
 file   arch/arm/arm/disksubr.c                 disk
 file   arch/arm/arm/disksubr_acorn.c           disk
@@ -132,6 +132,10 @@
 attach pc at ofisapc
 file   arch/shark/shark/pccons.c               pc needs-flag
 
+# ofbus VGA
+attach vga at ofbus with vga_ofbus
+file   arch/shark/ofw/vga_ofbus.c              vga_ofbus       needs-flag
+
 # Smart Card Reader
 device scr: tty
 file   arch/shark/shark/scr.c                  scr needs-flag
diff -r a6486043059f -r e917739bc0c7 sys/arch/shark/conf/majors.shark
--- a/sys/arch/shark/conf/majors.shark  Sun Jan 09 15:29:27 2005 +0000
+++ b/sys/arch/shark/conf/majors.shark  Sun Jan 09 15:39:59 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: majors.shark,v 1.13 2005/01/05 09:15:19 tsutsui Exp $
+#      $NetBSD: majors.shark,v 1.14 2005/01/09 15:39:59 tsutsui Exp $
 #
 # Device majors for shark
 #
@@ -47,9 +47,14 @@
 device-major   midi            char 57                 midi
 device-major   sequencer       char 58                 sequencer
 device-major   vcoda           char 59                 vcoda
+device-major   wsdisplay       char 60                 wsdisplay
+device-major   wskbd           char 61                 wskbd
+device-major   wsmouse         char 62                 wsmouse
 
 device-major   raid            char 71  block 71       raid
 
+device-major   wsmux           char 73                 wsmux
+
 device-major   openfirm        char 77                 ofwgencfg
 
 device-major   clockctl        char 84                 clockctl
diff -r a6486043059f -r e917739bc0c7 sys/arch/shark/ofw/com_ofisa_consolehack.c
--- a/sys/arch/shark/ofw/com_ofisa_consolehack.c        Sun Jan 09 15:29:27 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*     $NetBSD: com_ofisa_consolehack.c,v 1.4 2003/07/15 03:36:02 lukem Exp $  */
-
-/*
- * Copyright 1997
- * Digital Equipment Corporation. All rights reserved.
- *
- * This software is furnished under license and may be used and
- * copied only in accordance with the following terms and conditions.
- * Subject to these conditions, you may download, copy, install,
- * use, modify and distribute this software in source and/or binary
- * form. No title or ownership is transferred hereby.
- *
- * 1) Any source code used, modified or distributed must reproduce
- *    and retain this copyright notice and list of conditions as
- *    they appear in the source file.
- *
- * 2) No right is granted to use any trade name, trademark, or logo of
- *    Digital Equipment Corporation. Neither the "Digital Equipment
- *    Corporation" name nor any trademark or logo of Digital Equipment
- *    Corporation may be used to endorse or promote products derived
- *    from this software without the prior written permission of
- *    Digital Equipment Corporation.
- *
- * 3) This software is provided "AS-IS" and any express or implied
- *    warranties, including but not limited to, any implied warranties
- *    of merchantability, fitness for a particular purpose, or
- *    non-infringement are disclaimed. In no event shall DIGITAL be
- *    liable for any damages whatsoever, and in particular, DIGITAL
- *    shall not be liable for special, indirect, consequential, or
- *    incidental damages or damages for lost profits, loss of
- *    revenue or loss of use, whether such damages arise in contract,
- *    negligence, tort, under statute, in equity, at law or otherwise,
- *    even if advised of the possibility of such damage.
- */
-
-/*
- *  OFW Attachment for 'com' serial driver
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com_ofisa_consolehack.c,v 1.4 2003/07/15 03:36:02 lukem Exp $");
-
-#include <sys/param.h>
-#include <sys/device.h>
-#include <sys/systm.h>
-#include <sys/tty.h>
-
-#include <machine/intr.h>
-#include <machine/bus.h>
-
-#include <dev/ofw/openfirm.h>
-
-#include <dev/ic/comreg.h>
-#include <dev/ic/comvar.h>
-
-#include <machine/isa_machdep.h>       /* XXX for space tags */
-
-#include <dev/cons.h>
-
-void comcnprobe(struct consdev *);
-void comcninit(struct consdev *);
-
-void
-comcnprobe(cp)
-        struct consdev *cp;
-{
-
-#ifdef  COMCONSOLE
-       cp->cn_pri = CN_REMOTE;         /* Force a serial port console */
-#else
-       cp->cn_pri = CN_NORMAL;
-#endif
-}
-
-void
-comcninit(cp)
-        struct consdev *cp;
-{
-
-#ifndef CONMODE
-#define CONMODE ((TTYDEF_CFLAG & ~(CSIZE | CSTOPB | PARENB)) | CS8) /* 8N1 */
-#endif
-
-       if (comcnattach(&isa_io_bs_tag, 0x3f8, 9600, COM_FREQ, COM_TYPE_NORMAL,
-           CONMODE))
-               panic("can't init serial console @%x", 0x3f8);
-}
diff -r a6486043059f -r e917739bc0c7 sys/arch/shark/ofw/consinit.c
--- a/sys/arch/shark/ofw/consinit.c     Sun Jan 09 15:29:27 2005 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*     $NetBSD: consinit.c,v 1.2 2003/07/15 03:36:02 lukem Exp $       */
-
-/*
- * Copyright (c) 1994-1998 Mark Brinicombe.
- * Copyright (c) 1994 Brini.
- * All rights reserved.
- *
- * This code is derived from software written for Brini by Mark Brinicombe
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:



Home | Main Index | Thread Index | Old Index