Source-Changes-HG archive

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

[src/trunk]: src Switch NetBSD/hp300 to wscons with rasops. Simply ported fro...



details:   https://anonhg.NetBSD.org/src/rev/d426801b89a1
branches:  trunk
changeset: 761736:d426801b89a1
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Feb 06 18:26:51 2011 +0000

description:
Switch NetBSD/hp300 to wscons with rasops. Simply ported from OpenBSD/hp300.

- Only A1416 Kathmandu (topcat) framebuffer on 425t is tested, but
  all other variants (TigerShark, Hyperion, DaVinci, GatorBox, Renaissance)
  should also work if they are working on OpenBSD/hp300.
- sti(4) and SGC bus support are not pulled because I don't have 425e
  and I can't confirm that 362 and 382 actually have SGC bus.
  (I'll commit a DIO based dumb driver for 362 and 382 framebuffers later)
- Xorg server with wsfb driver will also be integrated soon
  once after keycode with NoSymbol problem is addressed.
  (We have to re-think what code should be used on WSDISPLAY_COMPAT_RAWKBD)
- MI HIL keyboard and mouse drivers are working fine though
  cngetc via hilkbd has some problem (still we can input commands).
- No old HP-UX like HIL ioctl compatibility (we removed COMPAT_HPUX anyway).
  grfinfo(8) and hilinfo(8) will be removed shortly.

Demonstrated on NetBSD booth at Open Source Conference 2011 Kagawa.

diffstat:

 distrib/hp300/miniroot/dot.profile   |     4 +-
 distrib/hp300/miniroot/install.md    |     6 +-
 distrib/hp300/ramdisk/dot.profile    |     3 +-
 etc/etc.hp300/MAKEDEV.conf           |    33 +-
 etc/etc.hp300/ttys                   |     9 +-
 sys/arch/hp300/conf/INSTALL          |    35 +-
 sys/arch/hp300/conf/files.hp300      |    80 +-
 sys/arch/hp300/conf/majors.hp300     |    14 +-
 sys/arch/hp300/dev/diofb.c           |   529 ++++++++++
 sys/arch/hp300/dev/diofb_mono.c      |   275 +++++
 sys/arch/hp300/dev/diofbreg.h        |    93 +
 sys/arch/hp300/dev/diofbvar.h        |   152 ++
 sys/arch/hp300/dev/dvbox.c           |   481 +++++++++
 sys/arch/hp300/dev/dvboxreg.h        |   165 +++
 sys/arch/hp300/dev/gbox.c            |   500 +++++++++
 sys/arch/hp300/dev/gboxreg.h         |   106 ++
 sys/arch/hp300/dev/grf.c             |   400 -------
 sys/arch/hp300/dev/grf_dv.c          |   670 ------------
 sys/arch/hp300/dev/grf_dvreg.h       |   227 ----
 sys/arch/hp300/dev/grf_gb.c          |   619 -----------
 sys/arch/hp300/dev/grf_gbreg.h       |   160 ---
 sys/arch/hp300/dev/grf_hy.c          |   758 --------------
 sys/arch/hp300/dev/grf_hyreg.h       |   118 --
 sys/arch/hp300/dev/grf_rb.c          |   617 -----------
 sys/arch/hp300/dev/grf_rbreg.h       |   179 ---
 sys/arch/hp300/dev/grf_subr.c        |   109 --
 sys/arch/hp300/dev/grf_tc.c          |   715 -------------
 sys/arch/hp300/dev/grf_tcreg.h       |   179 ---
 sys/arch/hp300/dev/grfioctl.h        |   158 ---
 sys/arch/hp300/dev/grfreg.h          |   123 --
 sys/arch/hp300/dev/grfvar.h          |   174 ---
 sys/arch/hp300/dev/hil.c             |  1772 ----------------------------------
 sys/arch/hp300/dev/hil_intio.c       |    97 +
 sys/arch/hp300/dev/hil_keymaps.c     |   376 -------
 sys/arch/hp300/dev/hilioctl.h        |   234 ----
 sys/arch/hp300/dev/hilreg.h          |   213 ----
 sys/arch/hp300/dev/hilvar.h          |   173 ---
 sys/arch/hp300/dev/hyper.c           |   299 +++++
 sys/arch/hp300/dev/hyperreg.h        |    51 +
 sys/arch/hp300/dev/ite.c             |  1063 --------------------
 sys/arch/hp300/dev/ite_subr.c        |   183 ---
 sys/arch/hp300/dev/itereg.h          |    93 -
 sys/arch/hp300/dev/itevar.h          |   260 ----
 sys/arch/hp300/dev/kbdmap.h          |    53 -
 sys/arch/hp300/dev/maskbits.h        |    66 +-
 sys/arch/hp300/dev/rbox.c            |   441 ++++++++
 sys/arch/hp300/dev/rboxreg.h         |   120 ++
 sys/arch/hp300/dev/topcat.c          |   576 +++++++++++
 sys/arch/hp300/dev/topcatreg.h       |   117 ++
 sys/arch/hp300/dev/tvrx.c            |   238 ++++
 sys/arch/hp300/hp300/autoconf.c      |    48 +-
 sys/arch/hp300/hp300/machdep.c       |     8 +-
 sys/arch/hp300/include/autoconf.h    |     7 +-
 sys/arch/hp300/include/hil_machdep.h |    55 +
 sys/dev/hil/Makefile                 |    11 +
 sys/dev/hil/devlist2h.awk            |    86 +
 sys/dev/hil/files.hil                |    21 +
 sys/dev/hil/hil.c                    |   884 ++++++++++++++++
 sys/dev/hil/hildevs                  |    49 +
 sys/dev/hil/hildevs.h                |    73 +
 sys/dev/hil/hilid.c                  |   101 +
 sys/dev/hil/hilkbd.c                 |   496 +++++++++
 sys/dev/hil/hilkbdmap.c              |   613 +++++++++++
 sys/dev/hil/hilkbdmap.h              |    36 +
 sys/dev/hil/hilms.c                  |   335 ++++++
 sys/dev/hil/hilreg.h                 |   158 +++
 sys/dev/hil/hilvar.h                 |   111 ++
 sys/dev/wscons/wsconsio.h            |    10 +-
 68 files changed, 7410 insertions(+), 9808 deletions(-)

diffs (truncated from 17811 to 300 lines):

diff -r de5db814ae7b -r d426801b89a1 distrib/hp300/miniroot/dot.profile
--- a/distrib/hp300/miniroot/dot.profile        Sun Feb 06 18:25:48 2011 +0000
+++ b/distrib/hp300/miniroot/dot.profile        Sun Feb 06 18:26:51 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dot.profile,v 1.7 2003/07/26 17:06:41 salo Exp $
+# $NetBSD: dot.profile,v 1.8 2011/02/06 18:26:51 tsutsui Exp $
 #
 # Copyright (c) 1995 Jason R. Thorpe
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -35,7 +35,7 @@
 
 PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
 export PATH
-TERM=hp300h
+TERM=vt100
 export TERM
 HOME=/
 export HOME
diff -r de5db814ae7b -r d426801b89a1 distrib/hp300/miniroot/install.md
--- a/distrib/hp300/miniroot/install.md Sun Feb 06 18:25:48 2011 +0000
+++ b/distrib/hp300/miniroot/install.md Sun Feb 06 18:26:51 2011 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $NetBSD: install.md,v 1.14 2009/05/08 17:18:06 tsutsui Exp $
+#      $NetBSD: install.md,v 1.15 2011/02/06 18:26:51 tsutsui Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -41,8 +41,8 @@
        if [ ! -z "$TERM" ]; then
                return
        fi
-       echo -n "Specify terminal type [hp300h]: "
-       getresp "hp300h"
+       echo -n "Specify terminal type [vt100]: "
+       getresp "vt100"
        TERM="$resp"
        export TERM
        # XXX call tset?
diff -r de5db814ae7b -r d426801b89a1 distrib/hp300/ramdisk/dot.profile
--- a/distrib/hp300/ramdisk/dot.profile Sun Feb 06 18:25:48 2011 +0000
+++ b/distrib/hp300/ramdisk/dot.profile Sun Feb 06 18:26:51 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: dot.profile,v 1.5 2006/03/21 03:38:22 tsutsui Exp $
+#      $NetBSD: dot.profile,v 1.6 2011/02/06 18:26:51 tsutsui Exp $
 #
 # Copyright (c) 1997 Perry E. Metzger
 # Copyright (c) 1994 Christopher G. Demetriou
@@ -56,7 +56,6 @@
                echo "" >& 2
                echo "Setting terminal type.  Options:" >& 2
                echo "" >& 2
-               echo "  hp300h  for graphics console" >& 2
                echo "  vt100   for dumb serial terminal" >& 2
                echo "  xterm   for xterm." >& 2
                echo "" >& 2
diff -r de5db814ae7b -r d426801b89a1 etc/etc.hp300/MAKEDEV.conf
--- a/etc/etc.hp300/MAKEDEV.conf        Sun Feb 06 18:25:48 2011 +0000
+++ b/etc/etc.hp300/MAKEDEV.conf        Sun Feb 06 18:26:51 2011 +0000
@@ -1,10 +1,9 @@
-#      $NetBSD: MAKEDEV.conf,v 1.11 2007/01/15 23:35:12 hubertf Exp $
+#      $NetBSD: MAKEDEV.conf,v 1.12 2011/02/06 18:26:51 tsutsui Exp $
 
 all_md)
        makedev ct0 ct1 rd0 rd1 rd2
-#      makedev wscons # should be after 'std'
+       makedev wscons
        makedev sd0 sd1 sd2 cd0 cd1 st0 st1 ch0
-       makedev hil grf0 ite0
        makedev ttyC0 ttyC1 ttyC2 ttyC3
        makedev ttyM0 ttyM1 ttyM2 ttyM3 ttyM4 ttyM5 ttyM6 ttyM7
        makedev ttyM8 ttyM9 ttyMa ttyMb ttyMc ttyMd ttyMe ttyMf
@@ -43,34 +42,6 @@
        esac
        ;;
 
-hil)
-       for unit in 0 1 2 3 4 5 6 7
-       do
-               mkdev hil${unit} c 14 ${unit} 666
-               if [ -f /usr/sbin/hilinfo ]; then
-                       case $(/usr/sbin/hilinfo -t hil${unit}) in
-                       mouse)
-                               if [ ! -f locator ]; then
-                                       lndev hil${unit} locator
-                               fi
-                               ;;
-                       keyboard)
-                               if [ ! -f keyboard ]; then
-                                       lndev hil${unit} keyboard
-                               fi
-                               ;;
-                       *)
-                               ;;
-                       esac
-               fi
-       done
-       if [ ! -f /usr/sbin/hilinfo ]; then
-               lndev hil1 keyboard
-               lndev hil3 locator
-       fi
-#      warn "hil: use $0.hpux to make HP-UX names for devices"
-       ;;
-
 rd*)
        name=rd; unit=${i#rd}; blk=2; chr=9
        %MKDISK% $name $unit $blk $chr
diff -r de5db814ae7b -r d426801b89a1 etc/etc.hp300/ttys
--- a/etc/etc.hp300/ttys        Sun Feb 06 18:25:48 2011 +0000
+++ b/etc/etc.hp300/ttys        Sun Feb 06 18:26:51 2011 +0000
@@ -1,12 +1,15 @@
-#      $NetBSD: ttys,v 1.14 2008/10/07 10:00:01 abs Exp $
+#      $NetBSD: ttys,v 1.15 2011/02/06 18:26:51 tsutsui Exp $
 #      from: @(#)ttys  5.1 (Berkeley) 4/17/89
 #
 # name getty                           type    status          comments
 #
 # If the console is marked insecure, single-user requires
 # the root password.
-console "/usr/libexec/getty Pc"                hp300h  on secure
-constty "/usr/libexec/getty Pc"                hp300h  off secure
+console "/usr/libexec/getty Pc"                vt220   on  secure
+constty "/usr/libexec/getty Pc"                vt220   off secure
+
+# Workstation console
+ttyE0  "/usr/libexec/getty Pc"         vt220   off secure
 
 # Hardwired lines are marked off, by default, so getty(8)
 # is quiet when they don't exist.
diff -r de5db814ae7b -r d426801b89a1 sys/arch/hp300/conf/INSTALL
--- a/sys/arch/hp300/conf/INSTALL       Sun Feb 06 18:25:48 2011 +0000
+++ b/sys/arch/hp300/conf/INSTALL       Sun Feb 06 18:26:51 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.41 2010/04/16 13:48:31 pooka Exp $
+# $NetBSD: INSTALL,v 1.42 2011/02/06 18:26:53 tsutsui Exp $
 #
 # INSTALL machine description file
 #
@@ -120,6 +120,15 @@
 # (Warning: this compiles in a large string table)
 #options       DIOVERBOSE      # recognize "unknown" DIO devices
 
+# workstation console options
+options        WSEMUL_VT100            # VT100 / VT220 emulation
+#options       WSDISPLAY_COMPAT_RAWKBD
+options        WS_KERNEL_FG=WSCOL_GREEN
+#options       WS_KERNEL_BG=WSCOL_BLACK
+
+#options       FONT_GALLANT12x22
+options        FONT_VT220ISO8x16
+
 config         netbsd root on ? type ?
 
 mainbus0       at root         # root "bus"
@@ -134,45 +143,45 @@
 dma*           at intio?
 
 # Human Interface Loop
-hil*           at intio?
-#options       UK_KEYBOARD     # include United Kingdom HIL keymap
-#options       SE_KEYBOARD     # include Swedish HIL keymap
+hil0           at intio?               # HIL controller
+hilkbd*                at hil?                 # keyboards
+wskbd*         at hilkbd? mux 1
 
 # Frodo utility chip found on 4xx's
 frodo*         at intio?
 
 # 8250-like serial ports found on Frodo ASIC
 #dnkbd0                at frodo? offset 0x0    # Domain keyboard flavor
+#wskbd*                at dnkbd? mux 1
 com*           at frodo? offset ?      # tty flavor
 
 # Davinci framebuffer
 dvbox*         at intio?
 dvbox*         at dio? scode ?
+wsdisplay*     at dvbox?
 
 # Gatorbox framebuffer
 gbox*          at intio?
 gbox*          at dio? scode ?
+wsdisplay*     at gbox?
 
 # Hyperion framebuffer
 hyper*         at dio? scode ?
+wsdisplay*     at hyper?
 
 # Renaissance framebuffer
 rbox*          at intio?
 rbox*          at dio? scode ?
+wsdisplay*     at rbox?
 
 # Topcat/catseye framebuffers
 topcat*                at intio?
 topcat*                at dio? scode ?
+wsdisplay*     at topcat?
 
-# Framebuffer abstraction
-grf*           at dvbox?
-grf*           at gbox?
-grf*           at hyper?
-grf*           at rbox?
-grf*           at topcat?
-
-# Internal Terminal Emulator
-ite*           at grf?
+# TurboVRX framebuffer
+tvrx*          at dio? scode ?
+wsdisplay*     at tvrx?
 
 com*           at dio0 scode 9         # DCA serial interfaces
 com*           at dio? scode ?
diff -r de5db814ae7b -r d426801b89a1 sys/arch/hp300/conf/files.hp300
--- a/sys/arch/hp300/conf/files.hp300   Sun Feb 06 18:25:48 2011 +0000
+++ b/sys/arch/hp300/conf/files.hp300   Sun Feb 06 18:26:51 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.hp300,v 1.78 2007/12/31 13:38:48 ad Exp $
+#      $NetBSD: files.hp300,v 1.79 2011/02/06 18:26:53 tsutsui Exp $
 #
 # hp300-specific configuration info
 
@@ -52,10 +52,10 @@
 file   arch/hp300/dev/rtc.c                    rtc
 
 # Human (Hilarious) Interface Loop
-device hil { }
-attach hil at intio
-file   arch/hp300/dev/hil.c                    hil     needs-flag
-file   arch/hp300/dev/hil_keymaps.c            hil
+include "dev/hil/files.hil"
+
+attach hil at intio with hil_intio
+file   arch/hp300/dev/hil_intio.c              hil_intio
 
 # 98620 DMA controller
 device dma
@@ -71,54 +71,52 @@
 attach com at frodo with com_frodo
 file   arch/hp300/dev/com_frodo.c      com_frodo needs-flag
 
-# Frame buffer attribute
-define grfdev { }
-
-# Frame buffer devices
-device dvbox: grfdev
-file   arch/hp300/dev/grf_dv.c         dvbox needs-flag
+# Apollo Keyboard and mouse
+#device        dnkbd: wskbddev, wsmousedev
+#attach        dnkbd at frodo
+#file  arch/hp300/dev/dnkbd.c                  dnkbd   needs-flag
+#file  arch/hp300/dev/dnkbdmap.c               dnkbd
 
-device gbox: grfdev
-file   arch/hp300/dev/grf_gb.c         gbox needs-flag
+#
+# Frame buffer devices on Internal I/O and the DIO bus
+#
+define diofb
+define diofb_mono
+file   arch/hp300/dev/diofb.c                  diofb | diofb_mono
+file   arch/hp300/dev/diofb_mono.c             diofb_mono
 
-device hyper: grfdev
-file   arch/hp300/dev/grf_hy.c         hyper needs-flag
-
-device rbox: grfdev
-file   arch/hp300/dev/grf_rb.c         rbox needs-flag
+device dvbox: wsemuldisplaydev, diofb, rasops8
+attach dvbox at intio with dvbox_intio
+attach dvbox at dio with dvbox_dio
+file   arch/hp300/dev/dvbox.c                  dvbox   needs-flag
 
-device topcat: grfdev
-file   arch/hp300/dev/grf_tc.c         topcat needs-flag
+device gbox: wsemuldisplaydev, diofb, rasops8
+attach gbox at intio with gbox_intio
+attach gbox at dio with gbox_dio
+file   arch/hp300/dev/gbox.c                   gbox    needs-flag
 
-# `grf' framebuffer abstraction
-device grf { }
-attach grf at grfdev
-file   arch/hp300/dev/grf.c            grf needs-flag
-file   arch/hp300/dev/grf_subr.c       grf
+device hyper: wsemuldisplaydev, diofb_mono, rasops1
+attach hyper at dio
+file   arch/hp300/dev/hyper.c                  hyper   needs-flag
 
-# Internal Terminal Emulator
-device ite: tty
-attach ite at grf
-file   arch/hp300/dev/ite.c            ite needs-flag
-file   arch/hp300/dev/ite_subr.c       ite
+device rbox: wsemuldisplaydev, diofb, rasops8
+attach rbox at intio with rbox_intio
+attach rbox at dio with rbox_dio
+file   arch/hp300/dev/rbox.c                   rbox    needs-flag
 
-# Internal i/o framebuffer attachments



Home | Main Index | Thread Index | Old Index