support for display drivers as console
authorMarc Teitelbaum <marc@ucbvax.Berkeley.EDU>
Tue, 7 Jun 1988 06:48:01 +0000 (22:48 -0800)
committerMarc Teitelbaum <marc@ucbvax.Berkeley.EDU>
Tue, 7 Jun 1988 06:48:01 +0000 (22:48 -0800)
SCCS-vsn: sys/vax/stand/prf.c 7.5
SCCS-vsn: sys/vax/stand/Makefile 7.9
SCCS-vsn: sys/vax/stand/autoconf.c 7.5
SCCS-vsn: sys/vax/stand/qdcons.c 1.2
SCCS-vsn: sys/vax/stand/qvcons.c 7.2
SCCS-vsn: sys/vax/stand/qfont.c 1.2

usr/src/sys/vax/stand/Makefile
usr/src/sys/vax/stand/autoconf.c
usr/src/sys/vax/stand/prf.c
usr/src/sys/vax/stand/qdcons.c
usr/src/sys/vax/stand/qfont.c
usr/src/sys/vax/stand/qvcons.c

index 4875bed..32c7ac1 100644 (file)
@@ -9,7 +9,7 @@
 # software without specific prior written permission. This software
 # is provided ``as is'' without express or implied warranty.
 #
 # software without specific prior written permission. This software
 # is provided ``as is'' without express or implied warranty.
 #
-#      @(#)Makefile    7.8 (Berkeley) %G%
+#      @(#)Makefile    7.9 (Berkeley) %G%
 #
 DESTDIR=/
 INCPATH=-I. -I../stand -I../h
 #
 DESTDIR=/
 INCPATH=-I. -I../stand -I../h
@@ -23,11 +23,12 @@ LIBSA=      libsa.a
 
 SRCS=  autoconf.c boot.c bootxx.c cat.c copy.c dev.c drtest.c drtest.c \
        format.c format.c getfile.c gets.c hp.c hpmaptype.c ht.c idc.c \
 
 SRCS=  autoconf.c boot.c bootxx.c cat.c copy.c dev.c drtest.c drtest.c \
        format.c format.c getfile.c gets.c hp.c hpmaptype.c ht.c idc.c \
-       machdep.c mba.c mt.c prf.c printn.c rk.c rl.c sys.c tm.c tmscp.c \
-       ts.c uba.c uda.c up.c upmaptype.c ut.c conf.c ../vax/dkbad.c
+       machdep.c mba.c mt.c prf.c printn.c qdcons.c qvcons.c qfont.c rk.c \
+       rl.c sys.c tm.c tmscp.c ts.c uba.c uda.c up.c upmaptype.c ut.c conf.c \
+       ../vax/dkbad.c
 DUMMIES=confxx.c
 DUMMIES=confxx.c
-DRIVERS=autoconf.o hp.o hpmaptype.o ht.o idc.o mba.o mt.o rk.o rl.o \
-       tm.o tmscp.o ts.o up.o upmaptype.o uba.o uda.o ut.o
+DRIVERS=autoconf.o hp.o hpmaptype.o ht.o idc.o mba.o mt.o qdcons.o qvcons.o \
+       rk.o rl.o tm.o tmscp.o ts.o up.o upmaptype.o uba.o uda.o ut.o
 
 # These drivers don't have ecc correction and bad sector forwarding;
 # they are placed in the file system boot area for 750's.  If your
 
 # These drivers don't have ecc correction and bad sector forwarding;
 # they are placed in the file system boot area for 750's.  If your
@@ -40,7 +41,7 @@ ALL=  boot tpboot cat copy tpcopy format tpformat drtest boothp boothk \
 all: ${ALL}
 
 ${LIBSA}: conf.o dev.o dkbad.o getfile.o gets.o machdep.o prf.o printn.o \
 all: ${ALL}
 
 ${LIBSA}: conf.o dev.o dkbad.o getfile.o gets.o machdep.o prf.o printn.o \
-       sys.o ${DRIVERS}
+       qfont.o sys.o ${DRIVERS}
        ar crv ${LIBSA} $?
        ranlib ${LIBSA}
 
        ar crv ${LIBSA} $?
        ranlib ${LIBSA}
 
@@ -284,17 +285,15 @@ autoconf.o: ../vax/mtpr.h savax.h
 boot.o: boot.c ../h/param.h /usr/include/sys/types.h ../h/signal.h
 boot.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 boot.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/vm.h
 boot.o: boot.c ../h/param.h /usr/include/sys/types.h ../h/signal.h
 boot.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 boot.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/vm.h
-boot.o: /usr/include/sys/vmparam.h /usr/include/machine/vmparam.h
-boot.o: /usr/include/sys/vmmac.h /usr/include/sys/vmmeter.h
-boot.o: /usr/include/sys/vmsystm.h ../h/reboot.h /usr/include/a.out.h
+boot.o: ../h/vmparam.h ../h/../machine/vmparam.h ../h/vmmac.h ../h/vmmeter.h
+boot.o: ../h/vmsystm.h ../h/reboot.h /usr/include/a.out.h
 boot.o: /usr/include/sys/exec.h ../stand/saio.h ../stand/saioctl.h
 boot.o: ../stand/saerrno.h
 bootxx.o: bootxx.c ../h/param.h /usr/include/sys/types.h ../h/signal.h
 bootxx.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 bootxx.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/vm.h
 boot.o: /usr/include/sys/exec.h ../stand/saio.h ../stand/saioctl.h
 boot.o: ../stand/saerrno.h
 bootxx.o: bootxx.c ../h/param.h /usr/include/sys/types.h ../h/signal.h
 bootxx.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 bootxx.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/vm.h
-bootxx.o: /usr/include/sys/vmparam.h /usr/include/machine/vmparam.h
-bootxx.o: /usr/include/sys/vmmac.h /usr/include/sys/vmmeter.h
-bootxx.o: /usr/include/sys/vmsystm.h ../h/reboot.h /usr/include/a.out.h
+bootxx.o: ../h/vmparam.h ../h/../machine/vmparam.h ../h/vmmac.h ../h/vmmeter.h
+bootxx.o: ../h/vmsystm.h ../h/reboot.h /usr/include/a.out.h
 bootxx.o: /usr/include/sys/exec.h ../stand/saio.h ../stand/saioctl.h
 bootxx.o: ../stand/saerrno.h
 cat.o: ../stand/cat.c
 bootxx.o: /usr/include/sys/exec.h ../stand/saio.h ../stand/saioctl.h
 bootxx.o: ../stand/saerrno.h
 cat.o: ../stand/cat.c
@@ -349,11 +348,10 @@ machdep.o: /usr/include/machine/endian.h ../vax/mtpr.h
 mba.o: mba.c ../machine/pte.h ../h/param.h /usr/include/sys/types.h
 mba.o: ../h/signal.h /usr/include/machine/trap.h
 mba.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h
 mba.o: mba.c ../machine/pte.h ../h/param.h /usr/include/sys/types.h
 mba.o: ../h/signal.h /usr/include/machine/trap.h
 mba.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h
-mba.o: ../h/inode.h ../h/fs.h ../h/vm.h /usr/include/sys/vmparam.h
-mba.o: /usr/include/machine/vmparam.h /usr/include/sys/vmmac.h
-mba.o: /usr/include/sys/vmmeter.h /usr/include/sys/vmsystm.h ../vax/mtpr.h
-mba.o: ../vaxmba/mbareg.h ../vaxmba/hpreg.h ../stand/saio.h ../stand/saioctl.h
-mba.o: ../stand/saerrno.h savax.h
+mba.o: ../h/inode.h ../h/fs.h ../h/vm.h ../h/vmparam.h
+mba.o: ../h/../machine/vmparam.h ../h/vmmac.h ../h/vmmeter.h ../h/vmsystm.h
+mba.o: ../vax/mtpr.h ../vaxmba/mbareg.h ../vaxmba/hpreg.h ../stand/saio.h
+mba.o: ../stand/saioctl.h ../stand/saerrno.h savax.h
 mt.o: mt.c ../machine/pte.h ../h/param.h /usr/include/sys/types.h ../h/signal.h
 mt.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 mt.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../vaxmba/mtreg.h
 mt.o: mt.c ../machine/pte.h ../h/param.h /usr/include/sys/types.h ../h/signal.h
 mt.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 mt.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../vaxmba/mtreg.h
@@ -365,6 +363,14 @@ prf.o: /usr/include/machine/endian.h ../vax/mtpr.h ../vax/cons.h
 printn.o: ../stand/printn.c ../h/param.h /usr/include/sys/types.h ../h/signal.h
 printn.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 printn.o: /usr/include/machine/endian.h
 printn.o: ../stand/printn.c ../h/param.h /usr/include/sys/types.h ../h/signal.h
 printn.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 printn.o: /usr/include/machine/endian.h
+qdcons.o: qdcons.c ../h/types.h ../vax/cpu.h ../ultrix/qdioctl.h
+qdcons.o: ../ultrix/../h/ioctl.h ../ultrix/../h/ttychars.h
+qdcons.o: ../ultrix/../h/ttydev.h ../ultrix/qevent.h ../ultrix/qduser.h
+qdcons.o: ../ultrix/qevent.h ../ultrix/qdreg.h
+qvcons.o: qvcons.c ../h/types.h ../ultrix/qvioctl.h ../ultrix/qevent.h
+qvcons.o: ../ultrix/../h/ioctl.h ../ultrix/../h/ttychars.h
+qvcons.o: ../ultrix/../h/ttydev.h ../ultrix/qvreg.h ../vax/cpu.h
+qfont.o: qfont.c
 rk.o: rk.c ../h/param.h /usr/include/sys/types.h ../h/signal.h
 rk.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 rk.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/disklabel.h
 rk.o: rk.c ../h/param.h /usr/include/sys/types.h ../h/signal.h
 rk.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h
 rk.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/disklabel.h
@@ -397,11 +403,10 @@ ts.o: savax.h
 uba.o: uba.c ../machine/pte.h ../h/param.h /usr/include/sys/types.h
 uba.o: ../h/signal.h /usr/include/machine/trap.h
 uba.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h
 uba.o: uba.c ../machine/pte.h ../h/param.h /usr/include/sys/types.h
 uba.o: ../h/signal.h /usr/include/machine/trap.h
 uba.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h
-uba.o: ../h/inode.h ../h/vm.h /usr/include/sys/vmparam.h
-uba.o: /usr/include/machine/vmparam.h /usr/include/sys/vmmac.h
-uba.o: /usr/include/sys/vmmeter.h /usr/include/sys/vmsystm.h ../h/fs.h
-uba.o: ../vax/cpu.h ../vaxuba/ubareg.h ../stand/saio.h ../stand/saioctl.h
-uba.o: ../stand/saerrno.h savax.h
+uba.o: ../h/inode.h ../h/vm.h ../h/vmparam.h ../h/../machine/vmparam.h
+uba.o: ../h/vmmac.h ../h/vmmeter.h ../h/vmsystm.h ../h/fs.h ../vax/cpu.h
+uba.o: ../vaxuba/ubareg.h ../stand/saio.h ../stand/saioctl.h ../stand/saerrno.h
+uba.o: savax.h
 uda.o: uda.c ../machine/pte.h ../h/param.h /usr/include/sys/types.h
 uda.o: ../h/signal.h /usr/include/machine/trap.h
 uda.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h
 uda.o: uda.c ../machine/pte.h ../h/param.h /usr/include/sys/types.h
 uda.o: ../h/signal.h /usr/include/machine/trap.h
 uda.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h
index 47c8e15..0141a75 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)autoconf.c  7.4 (Berkeley) %G%
+ *     @(#)autoconf.c  7.5 (Berkeley) %G%
  */
 
 #include "../machine/pte.h"
  */
 
 #include "../machine/pte.h"
@@ -95,6 +95,18 @@ caddr_t      uioaddr730[] = { UMA };
 struct uba_regs *ubaddr630[] =
        { (struct uba_regs *)((caddr_t)QBAMAP630 - 0x800) };
 caddr_t        uioaddr630[] = { (caddr_t)QIOPAGE630 };
 struct uba_regs *ubaddr630[] =
        { (struct uba_regs *)((caddr_t)QBAMAP630 - 0x800) };
 caddr_t        uioaddr630[] = { (caddr_t)QIOPAGE630 };
+/*
+ * Virtual console configuration tables.
+ */
+extern qv_init(),qd_init();
+
+int (*vcons_init[])() = {
+       qd_init,
+       qv_init,
+       0
+};
+int (*v_getc)()=0,
+    (*v_putc)()=0;
 #endif
 
 int cpuspeed = 1;
 #endif
 
 int cpuspeed = 1;
@@ -233,4 +245,11 @@ configure()
        /* give unibus devices a chance to recover... */
        if (nuba > 0)
                DELAY(2000000);
        /* give unibus devices a chance to recover... */
        if (nuba > 0)
                DELAY(2000000);
+#if VAX630
+       /*
+        * configure the console
+        */
+       for(i = 0; vcons_init[i] && !(*vcons_init[i])(); i++)
+               ;
+#endif
 }
 }
index 7978a27..52c31c2 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *     @(#)prf.c       7.4 (Berkeley) %G%
+ *     @(#)prf.c       7.5 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -115,7 +115,16 @@ putchar(c)
        register c;
 {
        register s, timo;
        register c;
 {
        register s, timo;
+#if VAX630
+       extern (*v_putc)();
 
 
+       if (v_putc) {
+               (*v_putc)(c);
+               if (c == '\n')
+                       (*v_putc)('\r');
+               return;
+       }
+#endif
        timo = 30000;
        /*
         * Try waiting for the console tty to come ready,
        timo = 30000;
        /*
         * Try waiting for the console tty to come ready,
@@ -138,10 +147,19 @@ putchar(c)
 getchar()
 {
        register c;
 getchar()
 {
        register c;
+#if VAX630
+       extern (*v_getc)();
 
 
+       if (v_getc) {
+               c = (*v_getc)();
+       } else {
+#endif
        while((mfpr(RXCS)&RXCS_DONE) == 0)
                ;
        c = mfpr(RXDB)&0177;
        while((mfpr(RXCS)&RXCS_DONE) == 0)
                ;
        c = mfpr(RXDB)&0177;
+#if VAX630
+       }
+#endif
        if (c=='\r')
                c = '\n';
        if (c != '\b' && c != '\177')
        if (c=='\r')
                c = '\n';
        if (c != '\b' && c != '\177')
index c14e896..105cb09 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *             @(#)qdcons.c    1.1  Berkeley  %G%
+ *             @(#)qdcons.c    1.2  Berkeley  %G%
  *
  *     derived from: @(#)qdcons.c  4.1 (ULTRIX    11/23/87
  */
  *
  *     derived from: @(#)qdcons.c  4.1 (ULTRIX    11/23/87
  */
@@ -35,7 +35,7 @@
 *   of its software on equipment which is not supplied by Digital.     *
 *                                                                      *
 *************************************************************************
 *   of its software on equipment which is not supplied by Digital.     *
 *                                                                      *
 *************************************************************************
-*      revision history: (moved into sccs comments)
+* revision history: (should be moved into sccs comments)
 *************************************************************************
 *
 * 09 oct 85  longo  added uVAXII console ROM cursor reset to bottom of
 *************************************************************************
 *
 * 09 oct 85  longo  added uVAXII console ROM cursor reset to bottom of
index ae4cfc7..2509720 100644 (file)
@@ -1,3 +1,10 @@
+/*
+ * Copyright (c) 1982, 1986 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ *
+ *             @(#)qfont.c     1.2  Berkeley  %G%
+ */
 /*
  *     @(#)qfont.c     1.1 (ULTRIX) 8/21/85
  *
 /*
  *     @(#)qfont.c     1.1 (ULTRIX) 8/21/85
  *
index da45751..443c646 100644 (file)
@@ -3,7 +3,7 @@
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
  * All rights reserved.  The Berkeley software License Agreement
  * specifies the terms and conditions for redistribution.
  *
- *             @(#)qvcons.c    7.1  Berkeley  %G%
+ *             @(#)qvcons.c    7.2  Berkeley  %G%
  *
  *     derived from: @(#)qvcons.c      4.1 11/23/87
  */
  *
  *     derived from: @(#)qvcons.c      4.1 11/23/87
  */