From 2f019a2701aec06e8be32ab24163e625ca09ff5b Mon Sep 17 00:00:00 2001 From: ragge Date: Tue, 24 Apr 2001 20:16:36 +0000 Subject: [PATCH] Support for KA681 (4000/500A) from Michael Kukat. --- sys/arch/vax/include/sid.h | 3 ++- sys/arch/vax/vax/findcpu.c | 3 ++- sys/arch/vax/vax/gencons.c | 3 ++- sys/arch/vax/vax/ka680.c | 21 ++++++++++++++++----- sys/arch/vax/vax/locore.c | 6 +++++- 5 files changed, 27 insertions(+), 9 deletions(-) diff --git a/sys/arch/vax/include/sid.h b/sys/arch/vax/include/sid.h index 3adb7cba051e..db50334755f9 100644 --- a/sys/arch/vax/include/sid.h +++ b/sys/arch/vax/include/sid.h @@ -1,4 +1,4 @@ -/* $NetBSD: sid.h,v 1.17 2001/03/21 21:11:13 ragge Exp $ */ +/* $NetBSD: sid.h,v 1.18 2001/04/24 20:16:36 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -167,6 +167,7 @@ #define VAX_STYP_53 0x0b /* VAX 4000 model 105A */ #define VAX_STYP_55 0x08 /* MicroVAX 3100 model 85 */ #define VAX_BTYP_49 0x13000004 /* MicroVAX 3100 model 90 */ +#define VAX_BTYP_681 0x13000005 /* VAX 4000 model 500A */ /* * SOC chip series (1991) diff --git a/sys/arch/vax/vax/findcpu.c b/sys/arch/vax/vax/findcpu.c index 909975fbfb3f..4b7cb2fe2a32 100644 --- a/sys/arch/vax/vax/findcpu.c +++ b/sys/arch/vax/vax/findcpu.c @@ -1,4 +1,4 @@ -/* $NetBSD: findcpu.c,v 1.9 2000/07/26 11:50:51 ragge Exp $ */ +/* $NetBSD: findcpu.c,v 1.10 2001/04/24 20:16:36 ragge Exp $ */ /* * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -105,6 +105,7 @@ findcpu(void) case VAX_BTYP_660: case VAX_BTYP_60: case VAX_BTYP_680: + case VAX_BTYP_681: case VAX_BTYP_630: case VAX_BTYP_650: case VAX_BTYP_53: diff --git a/sys/arch/vax/vax/gencons.c b/sys/arch/vax/vax/gencons.c index a648f5e37c96..799802fae17b 100644 --- a/sys/arch/vax/vax/gencons.c +++ b/sys/arch/vax/vax/gencons.c @@ -1,4 +1,4 @@ -/* $NetBSD: gencons.c,v 1.29 2001/01/28 21:01:53 ragge Exp $ */ +/* $NetBSD: gencons.c,v 1.30 2001/04/24 20:16:36 ragge Exp $ */ /* * Copyright (c) 1994 Gordon W. Ross @@ -245,6 +245,7 @@ gencnprobe(struct consdev *cndev) (vax_boardtype == VAX_BTYP_660) || (vax_boardtype == VAX_BTYP_670) || (vax_boardtype == VAX_BTYP_680) || + (vax_boardtype == VAX_BTYP_681) || (vax_boardtype == VAX_BTYP_650)) { cndev->cn_dev = makedev(25, 0); cndev->cn_pri = CN_NORMAL; diff --git a/sys/arch/vax/vax/ka680.c b/sys/arch/vax/vax/ka680.c index 691596032472..9ed7280f3659 100644 --- a/sys/arch/vax/vax/ka680.c +++ b/sys/arch/vax/vax/ka680.c @@ -1,4 +1,4 @@ -/* $NetBSD: ka680.c,v 1.4 2001/03/31 11:50:12 ragge Exp $ */ +/* $NetBSD: ka680.c,v 1.5 2001/04/24 20:16:37 ragge Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -114,12 +114,15 @@ ka680_conf() *hej = *hej; hej[-1] = hej[-1]; - switch((vax_siedata & 0xff00) >> 8) { + if((vax_boardtype & 0xff) == 1) switch((vax_siedata & 0xff00) >> 8) { case VAX_STYP_675: cpuname = "KA675"; break; case VAX_STYP_680: cpuname = "KA680"; break; case VAX_STYP_690: cpuname = "KA690"; break; - default: cpuname = "unknown NVAX"; - } + default: cpuname = "unknown KA680-class"; + } else if((vax_boardtype & 0xff) == 5) { + cpuname = "KA681"; + } else cpuname = "unknown NVAX class"; + printf("cpu0: %s, ucode rev %d\n", cpuname, vax_cpudata & 0xff); } @@ -145,7 +148,7 @@ ka680_cache_enable() start = 0x01400000; - switch ((vax_siedata & 0xff00) >> 8) { + if((vax_boardtype & 0xff) == 1) switch ((vax_siedata & 0xff00) >> 8) { case VAX_STYP_675: fslut = 0x01420000; cslut = 0x01020000; @@ -161,6 +164,14 @@ ka680_cache_enable() cslut = 0x01040000; havevic = 1; break; + } else if((vax_boardtype & 0xff) == 5) { + fslut = 0x01420000; + cslut = 0x01020000; + havevic = 1; + } else { + fslut = 0x01420000; + cslut = 0x01020000; + havevic = 0; } /* Flush cache lines */ diff --git a/sys/arch/vax/vax/locore.c b/sys/arch/vax/vax/locore.c index 46bc49d1aeef..c2e61ff686ae 100644 --- a/sys/arch/vax/vax/locore.c +++ b/sys/arch/vax/vax/locore.c @@ -1,4 +1,4 @@ -/* $NetBSD: locore.c,v 1.56 2001/03/31 11:50:45 ragge Exp $ */ +/* $NetBSD: locore.c,v 1.57 2001/04/24 20:16:37 ragge Exp $ */ /* * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -239,6 +239,10 @@ _start(struct rpb *prpb) strcpy(cpu_model,"unknown 1301"); } break; + case VAX_BTYP_681: + dep_call = &ka680_calls; + strcpy(cpu_model,"VAX 4000/500A"); break; + break; #endif #if VAX8200 case VAX_BTYP_8000: