Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/boot/boot Console support for VXT 2000, VAX 400...



details:   https://anonhg.NetBSD.org/src/rev/706be188ba89
branches:  trunk
changeset: 485895:706be188ba89
user:      ragge <ragge%NetBSD.org@localhost>
date:      Mon May 08 17:06:48 2000 +0000

description:
Console support for VXT 2000, VAX 4000/105 and VAX 4000/500.
>From Michael Kukat.

diffstat:

 sys/arch/vax/boot/boot/autoconf.c |   4 +-
 sys/arch/vax/boot/boot/consio.c   |  67 +++++++++++++++++++++++++++++++++++++-
 sys/arch/vax/boot/boot/if_ze.c    |   7 ++-
 3 files changed, 73 insertions(+), 5 deletions(-)

diffs (138 lines):

diff -r 4e41d1563a2e -r 706be188ba89 sys/arch/vax/boot/boot/autoconf.c
--- a/sys/arch/vax/boot/boot/autoconf.c Mon May 08 16:42:36 2000 +0000
+++ b/sys/arch/vax/boot/boot/autoconf.c Mon May 08 17:06:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: autoconf.c,v 1.9 2000/04/24 14:45:30 ragge Exp $ */
+/*     $NetBSD: autoconf.c,v 1.10 2000/05/08 17:06:48 ragge Exp $ */
 /*
  * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -123,6 +123,8 @@
        case VAX_BTYP_650:
        case VAX_BTYP_660:
        case VAX_BTYP_670:
+       case VAX_BTYP_680:
+       case VAX_BTYP_53:
                nuba = 1;
                nuda = 2;
                ubaaddr = uba630;
diff -r 4e41d1563a2e -r 706be188ba89 sys/arch/vax/boot/boot/consio.c
--- a/sys/arch/vax/boot/boot/consio.c   Mon May 08 16:42:36 2000 +0000
+++ b/sys/arch/vax/boot/boot/consio.c   Mon May 08 17:06:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consio.c,v 1.6 1999/08/23 19:09:27 ragge Exp $ */
+/*     $NetBSD: consio.c,v 1.7 2000/05/08 17:06:48 ragge Exp $ */
 /*
  * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -84,6 +84,13 @@
 int ka630_rom_putchar __P((int c));
 int ka630_rom_getchar __P((void));
 int ka630_rom_testchar __P((void));
+/* Also added such a thing for KA53 - MK-991208 */
+unsigned char  *ka53_conspage;
+void ka53_consinit(void);
+int ka53_rom_putchar(int c);
+int ka53_rom_getchar(void);
+int ka53_rom_testchar(void);
+
 
 putchar(c)
        int c;
@@ -135,7 +142,6 @@
        switch (vax_boardtype) {
 
        case VAX_BTYP_690:
-       case VAX_BTYP_1303:
                put_fp = rom_putchar;
                get_fp = rom_getchar;
                test_fp = rom_testchar;
@@ -167,6 +173,10 @@
                rom_getc = 0x20040054;
                break;
 
+       case VAX_BTYP_53:
+               ka53_consinit();
+               break;
+
 #ifdef notdef
        case VAX_BTYP_630:
        case VAX_BTYP_650:
@@ -320,3 +330,56 @@
                jsb     *0x24(r11)      # output character (KA630_PUTC)
                ret                     # we're done
 ");
+
+/*
+ * void ka53_consinit (void)  ==> initialize KA53 ROM console I/O
+ */
+void ka53_consinit()
+{
+       ka53_conspage = (char *) 0x2014044b;
+
+       put_fp = ka53_rom_putchar;
+       get_fp = ka53_rom_getchar;
+       test_fp = ka53_rom_testchar;
+}
+
+
+/*
+ * int ka53_rom_getchar (void)  ==> getchar() using ROM-routines on KA53
+ */
+asm("
+       .globl _ka53_rom_getchar
+       _ka53_rom_getchar:
+               .word 0x802             # save-mask: R1, R11
+               movl    _ka53_conspage,r11      # load location of console page
+       loop53g:                        # do {
+               jsb     *0x64(r11)      #   test for char
+               blbc    r0, loop53g     # } while (R0 == 0)
+               jsb     *0x6c(r11)      # get the char
+               ret                     # we're done
+
+       _ka53_rom_testchar:
+               .word   0
+               movl    _ka53_conspage,r3
+               jsb     *0x64(r3)
+               blbc    r0,1f
+               jsb     *0x6c(r3)       # get the char
+       1:      ret
+");
+
+/*
+ * int ka53_rom_putchar (int c) ==> putchar() using ROM-routines on KA53
+ */
+asm("
+       .globl _ka53_rom_putchar
+       _ka53_rom_putchar:
+               .word 0x802             # save-mask: R1, R11
+               movl    _ka53_conspage,r11      # load location of console page
+       loop53p:                        # do {
+               jsb     *0x20(r11)      #   is rom ready?
+               blbc    r0, loop53p     # } while (R0 == 0)
+               movl    4(ap), r1       # R1 holds char
+               jsb     *0x24(r11)      # output character
+                ret                     # we're done
+");
+
diff -r 4e41d1563a2e -r 706be188ba89 sys/arch/vax/boot/boot/if_ze.c
--- a/sys/arch/vax/boot/boot/if_ze.c    Mon May 08 16:42:36 2000 +0000
+++ b/sys/arch/vax/boot/boot/if_ze.c    Mon May 08 17:06:48 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ze.c,v 1.6 2000/04/28 00:08:51 matt Exp $   */
+/*     $NetBSD: if_ze.c,v 1.7 2000/05/08 17:06:48 ragge Exp $  */
 /*
  * Copyright (c) 1998 James R. Maynard III.  All rights reserved.
  *
@@ -123,7 +123,10 @@
        } else {
                nisa_rom = (u_long *)0x20084000;
                for (i=0; i<ETHER_ADDR_LEN; i++)
-                       ze_myaddr[i] = (nisa_rom[i] & 0x0000ff00) >> 8;
+                       if (vax_boardtype == VAX_BTYP_660)
+                               ze_myaddr[i] = (nisa_rom[i] & 0xff000000) >> 24;
+                       else
+                               ze_myaddr[i] = (nisa_rom[i] & 0x0000ff00) >> 8;
        }
        bcopy(ze_myaddr,desc->myea,ETHER_ADDR_LEN);
 



Home | Main Index | Thread Index | Old Index