Console support for VXT 2000, VAX 4000/105 and VAX 4000/500.

From Michael Kukat.
This commit is contained in:
ragge 2000-05-08 17:06:48 +00:00
parent 827056c9c3
commit c17aed4bdc
3 changed files with 73 additions and 5 deletions

View File

@ -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 @@ autoconf()
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;

View File

@ -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 @@ void ka630_consinit __P((void));
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 @@ consinit()
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 @@ consinit()
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 @@ asm("
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
");

View File

@ -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 @@ ze_init(desc, machdep_hint)
} 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);