Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm32 Initial commit of wscons for the RiscPC/A7000...



details:   https://anonhg.NetBSD.org/src/rev/293bd866f602
branches:  trunk
changeset: 507358:293bd866f602
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Tue Mar 20 18:20:53 2001 +0000

description:
Initial commit of wscons for the RiscPC/A7000 arm32 family. There is still lots
to do notably the mouse, some issues about 4 bpp modes and most of all Xwscons !

This code will still allow usage of the old vidcconsole complete with X etc.
Note that the wscons code can now only be booted with the new bootloader but
kernels compiled with vidcconsole can still be booted the old way.

diffstat:

 sys/arch/arm32/arm32/machdep.c      |   43 +-
 sys/arch/arm32/conf/RPC_WSCONS      |  304 +++++++++++++
 sys/arch/arm32/conf/files.arm32     |   24 +-
 sys/arch/arm32/dev/rpckbd.c         |  637 +++++++++++++++++++++++++++
 sys/arch/arm32/dev/rpckbdvar.h      |   83 +++
 sys/arch/arm32/dev/wskbdmap_mfii.c  |  553 +++++++++++++++++++++++
 sys/arch/arm32/dev/wskbdmap_mfii.h  |   40 +
 sys/arch/arm32/iomd/iomd.c          |   12 +-
 sys/arch/arm32/iomd/rpckbd_iomd.c   |  123 +++++
 sys/arch/arm32/riscpc/rpc_machdep.c |  315 ++++--------
 sys/arch/arm32/vidc/vidc20config.c  |  812 +++++++++++++++++++++++++++++++++++
 sys/arch/arm32/vidc/vidc20config.h  |   64 ++
 sys/arch/arm32/vidc/vidcvideo.c     |  835 ++++++++++++++++++++++++++++++++++++
 sys/arch/arm32/vidc/vidcvideo.h     |   43 +
 14 files changed, 3674 insertions(+), 214 deletions(-)

diffs (truncated from 4259 to 300 lines):

diff -r 92c07d7f6211 -r 293bd866f602 sys/arch/arm32/arm32/machdep.c
--- a/sys/arch/arm32/arm32/machdep.c    Tue Mar 20 18:01:49 2001 +0000
+++ b/sys/arch/arm32/arm32/machdep.c    Tue Mar 20 18:20:53 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.90 2001/03/15 06:10:36 chs Exp $ */
+/*     $NetBSD: machdep.c,v 1.91 2001/03/20 18:20:53 reinoud Exp $     */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -38,6 +38,7 @@
  * Machine dependant functions for kernel setup
  *
  * Created      : 17/09/94
+ * Updated     : 18/04/01 updated for new wscons
  */
 
 #include "opt_footbridge.h"
@@ -75,10 +76,19 @@
 #include <machine/pte.h>
 #include <machine/bootconfig.h>
 
+#include <arm/mainbus/mainbus.h>
+#include <arm32/iomd/iomdreg.h>
+#include <arm32/dev/rpckbdvar.h>
+#include <machine/vidc.h>
+#include <arm32/vidc/vidcvideo.h>
+
 #include "opt_ipkdb.h"
 #include "md.h"
 #include "opt_mdsize.h"
 
+#include "vidcvideo.h"
+#include "rpckbd.h"
+
 vm_map_t exec_map = NULL;
 vm_map_t mb_map = NULL;
 vm_map_t phys_map = NULL;
@@ -469,6 +479,35 @@
  * Initialise the console
  */
 
+#if ((NVIDCVIDEO>0) && (NRPCKBD>0))
+
+extern videomemory_t videomemory;
+extern struct bus_space iomd_bs_tag;
+extern struct rpckbd_softc console_kbd;
+
+void
+consinit(void)
+{
+       static struct rpckbd_softc *ksc = &console_kbd;
+       static int consinit_called = 0;
+
+       if (consinit_called != 0) return;
+       consinit_called = 1;
+
+       /* set up bus variables for attachment */
+       ksc->sc_iot      = &iomd_bs_tag;
+       ksc->t_isconsole = 1;
+       ksc->data_port   = IOMD_KBDDAT;
+       ksc->cmd_port    = IOMD_KBDCR;
+       ksc->sc_enabled  = 1;
+       bus_space_map(ksc->sc_iot, IOMD_KBDDAT, 8, 0, &(ksc->sc_ioh));
+
+       rpckbd_cnattach((struct device *) ksc);
+       vidcvideo_cnattach(videomemory.vidm_vbase);
+}
+
+#else
+
 void
 consinit(void)
 {
@@ -482,6 +521,8 @@
 }
 #endif
 
+#endif
+
 
 /*
  * Modify the current mapping for zero page to make it read only
diff -r 92c07d7f6211 -r 293bd866f602 sys/arch/arm32/conf/RPC_WSCONS
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm32/conf/RPC_WSCONS    Tue Mar 20 18:20:53 2001 +0000
@@ -0,0 +1,304 @@
+#      $NetBSD: RPC_WSCONS,v 1.1 2001/03/20 18:20:54 reinoud Exp $
+#
+#      RPC_WSCONS -- Full RiscPC config with wscons
+#
+
+include        "arch/arm32/conf/std.arm32"
+
+# estimated number of users
+
+maxusers       32
+
+# Standard system options
+
+options        RTC_OFFSET=0    # hardware clock is this many mins. west of GMT
+#options       NTP             # NTP phase/frequency locked loop
+
+# CPU options
+
+# For standard RiscPC's
+options        CPU_SA110       # Support the SA110 core
+options        CPU_ARM6        # Support the ARM6 core
+options        CPU_ARM7        # Support the ARM7 core
+#options       CPU_ARM8        # Support the ARM8 core
+#options       ARM6_LATE_ABORT # ARM6XX late abort support
+
+# For StrongARM only kernels
+#makeoptions   COPTS="-O2 -march=armv3m -mtune=strongarm"
+
+# For A7000, Stork and other ARM7500 machines
+#options       CPU_ARM7        # Support the ARM7 core
+#options       CPU_ARM7500     # We are actually an ARM7500
+
+# Architecture options
+options        IOMD            # We have an IOMD
+options        RISCPC          # We are a RiscPC
+#options       RC7500          # We are a RC7500
+
+# FPA options
+
+#options       ARMFPE          # ARM Ltd FPE
+
+# File systems
+
+file-system    FFS             # UFS
+#file-system   LFS             # log-structured file system
+file-system    MFS             # memory file system
+file-system    NFS             # Network file system
+file-system    ADOSFS          # AmigaDOS-compatible file system
+file-system    EXT2FS          # second extended file system (linux)
+file-system    CD9660          # ISO 9660 + Rock Ridge file system
+file-system    MSDOSFS         # MS-DOS file system
+file-system    FDESC           # /dev/fd
+file-system    FILECORE        # Acorn filecore file system
+file-system    KERNFS          # /kern
+file-system    NULLFS          # loopback file system
+file-system    PORTAL          # portal filesystem (still experimental)
+file-system    PROCFS          # /proc
+file-system    UMAPFS          # NULLFS + uid and gid remapping
+file-system    UNION           # union file system
+
+# File system options
+options        QUOTA           # UFS quotas
+options        NFSSERVER
+
+# Networking options
+
+options        GATEWAY         # packet forwarding
+options        INET            # IP + ICMP + TCP + UDP
+options        INET6           # IPV6
+#options       IPSEC           # IP security
+#options       IPSEC_ESP       # IP security (encryption part; define w/ IPSEC)
+#options       IPSEC_DEBUG     # debug for IP security
+#options       MROUTING        # IP multicast routing
+#options       NS              # XNS
+#options       NSIP            # XNS tunneling over IP
+#options       ISO,TPIP        # OSI
+#options       EON             # OSI tunneling over IP
+#options       CCITT,LLC,HDLC  # X.25
+options        NETATALK        # AppleTalk networking
+#options       PFIL_HOOKS      # pfil(9) packet filter hooks
+#options       PPP_BSDCOMP     # BSD-Compress compression support for PPP
+#options       PPP_DEFLATE     # Deflate compression support for PPP
+#options       PPP_FILTER      # Active filter support for PPP (requires bpf)
+
+# Compatibility options
+
+options        COMPAT_43       # 4.3BSD compatibility.
+options        COMPAT_14       # NetBSD 1.4 compatibility.
+options        COMPAT_13       # NetBSD 1.3 compatibility.
+options        COMPAT_12       # NetBSD 1.2 compatibility.
+#options       COMPAT_11       # NetBSD 1.1 compatibility.
+#options       COMPAT_10       # NetBSD 1.0 compatibility.
+#options       COMPAT_09       # NetBSD 0.9 compatibility.
+#options       TCP_COMPAT_42   # TCP bug compatibility with 4.2BSD
+
+# Bootloader options
+#options               COMPAT_OLD_BOOTLOADER
+
+# Shared memory options
+
+options        SYSVMSG         # System V-like message queues
+options        SYSVSEM         # System V-like semaphores
+options        SYSVSHM         # System V-like memory sharing
+options        SHMMAXPGS=1024  # 1024 pages is the default
+
+# Device options
+
+options        MEMORY_DISK_HOOKS       # boottime setup of ramdisk
+#options       MEMORY_DISK_SIZE=0      # Size in blocks
+#options       MINIROOTSIZE=3400       # Size in blocks
+#options       MEMORY_DISK_IS_ROOT     # use memory disk as root
+
+# Miscellaneous kernel options
+options        KTRACE          # system call tracing, a la ktrace(1)
+options        IRQSTATS        # manage IRQ statistics
+options        LKM             # loadable kernel modules
+options        KMEMSTATS       # kernel memory statistics
+
+# Development and Debugging options
+
+#options       ARM700BUGTRACK  # track the ARM700 swi bug
+#options       PORTMASTER      # Enable PortMaster only options
+#options       DIAGNOSTIC      # internally consistency checks
+#options       PMAP_DEBUG      # Enable pmap_debug_level code
+#options       IPKDB           # remote kernel debugging
+options        DDB             # in-kernel debugger
+#options       DDB_HISTORY_SIZE=100    # Enable history editing in DDB
+#makeoptions   DEBUG="-g"      # compile full symbol table
+
+config         netbsd  root on ? type ?
+#options       COMCONSOLE=0,CONADDR=0x3f8,CONUNIT=0,CONSPEED=9600
+
+# The main bus device
+mainbus0 at root
+
+# The boot cpu
+cpu0 at mainbus?
+
+# The IOMD
+iomd0  at mainbus?
+
+# system clock via IOMD
+clock* at iomd?
+
+# quadrature mouse via IOMD
+qms*   at iomd?
+
+# IIC bus device
+iic*   at iomd?
+
+# RTC device via IIC bus
+rtc*   at iic? addr 0xa0
+
+# time-of-day device via rtc device
+todclock0      at rtc?
+
+# VIDC device
+vidc0          at mainbus?
+
+# WSCONS             
+# ws console uses DUMB, SUN or VT100 terminal emulation
+#options        WSEMUL_NODUMB
+#options        WSEMUL_SUN
+options         WSEMUL_VT100
+
+#options         FONT_BOLD8x16
+#options         FONT_GALLANT12x22        # Very nice font
+#options         FONT_LUCIDA16x29
+#options         FONT_OMRON12x20         # looks funny
+#options         FONT_QVSS8x15           # broken ?
+options         FONT_SONY12x25          # looks like VT220 font
+options         FONT_SONY8x16           # not tested
+#options         FONT_VT220L8x8          # 8x8 font as in Arch. cons
+#options         FONT_VT220L8x16         # 8x(2x8) font as in Arch. cons
+#options         FONT_VT220L8x10         # not tested
+#options         FONT_VT220L8x20         # not tested
+
+vidcvideo0      at vidc?                 # wscons driver for VIDC
+wsdisplay*      at vidcvideo? console ?  # display itself
+
+rpckbd*         at iomd?                 # based on old `kbd' driver
+wskbd*          at rpckbd?               # wskbd on RiscPC keyboard
+
+pseudo-device  wsmux   2                # why 2 ?
+
+
+# The origional vidcconsole :
+# vidcconsole kbd at IOMD
+# vidcconsole PS2 mouse at IOMD
+#vidcconsole0   at vidc?                 # display + vt100 emulation
+#kbd*           at iomd?                 # PS/2 keyboard for vidcconsole
+#opms*          at iomd?                 # RiscPC mouse for vidcconsole
+
+# generic VT console device
+#vt0     at vidc?
+#vt1     at vidc?
+#vt2     at vidc?
+#vt3     at vidc?
+#vt4     at vidc?
+#vt5     at vidc?
+
+
+# Peripheral IO Controller
+pioc0  at mainbus? base 0x00210000
+
+# IDE disk controller
+wdc0   at pioc? offset 0x01f0 irq 9
+#wdc*  at pioc? offset 0x0170 irq -1
+wd*    at wdc? channel ? drive ?
+atapibus* at wdc? channel ?
+cd*    at atapibus? drive ?
+sd*    at atapibus? drive ?
+
+# Floppy disk controller



Home | Main Index | Thread Index | Old Index