diff options
author | Hugh Graham <hugh@cvs.openbsd.org> | 2001-02-24 10:32:00 +0000 |
---|---|---|
committer | Hugh Graham <hugh@cvs.openbsd.org> | 2001-02-24 10:32:00 +0000 |
commit | 741c4a8303aa3223ccd2c6ac2b36578003a4fb20 (patch) | |
tree | 9fa6e40dbe7f7c3bc5518df28aa0601357ed5af6 /sys/arch/vax | |
parent | 90dd6a03cb164222406947bb3ddc717b060a2476 (diff) |
Support for VAX 4000/{2,4,5}00 from Michael Kukat. untested.
Diffstat (limited to 'sys/arch/vax')
-rw-r--r-- | sys/arch/vax/conf/GENERIC | 4 | ||||
-rw-r--r-- | sys/arch/vax/conf/RAMDISK | 4 | ||||
-rw-r--r-- | sys/arch/vax/conf/files.vax | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/ka680.h | 59 | ||||
-rw-r--r-- | sys/arch/vax/vax/conf.c | 5 | ||||
-rw-r--r-- | sys/arch/vax/vax/findcpu.c | 6 | ||||
-rw-r--r-- | sys/arch/vax/vax/gencons.c | 8 | ||||
-rw-r--r-- | sys/arch/vax/vax/ka660.c | 152 | ||||
-rw-r--r-- | sys/arch/vax/vax/ka680.c | 246 | ||||
-rw-r--r-- | sys/arch/vax/vax/locore.c | 16 |
10 files changed, 494 insertions, 14 deletions
diff --git a/sys/arch/vax/conf/GENERIC b/sys/arch/vax/conf/GENERIC index c9264ae7149..d3d380fb790 100644 --- a/sys/arch/vax/conf/GENERIC +++ b/sys/arch/vax/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.20 2001/02/11 06:34:36 hugh Exp $ +# $OpenBSD: GENERIC,v 1.21 2001/02/24 10:31:59 hugh Exp $ # $NetBSD: GENERIC,v 1.61 2000/04/19 06:50:36 itojun Exp $ machine vax # machine type; required @@ -13,7 +13,9 @@ include "../../../conf/GENERIC" #option VAX750 # 11/750 option VAX630 # MV II option VAX650 # MV III, 3300, 3600, 3800, 3900 +option VAX660 # VAX 4000/200 option VAX670 # VAX 4000/300 +option VAX680 # VAX 4000/[45]00 option VAX410 # VS 2000, 3100/{30,} option VAX43 # VS 3100/76 option VAX46 # VS 4000/60 diff --git a/sys/arch/vax/conf/RAMDISK b/sys/arch/vax/conf/RAMDISK index a457c885e60..a37f8704c2b 100644 --- a/sys/arch/vax/conf/RAMDISK +++ b/sys/arch/vax/conf/RAMDISK @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK,v 1.3 2001/02/11 06:34:36 hugh Exp $ +# $OpenBSD: RAMDISK,v 1.4 2001/02/24 10:31:59 hugh Exp $ machine vax # machine type @@ -16,7 +16,9 @@ option MINIROOTSIZE=4352 # LESS THAN RELOC #option VAX750 # 11/750 option VAX630 # MV II option VAX650 # MV III, 3300, 3600, 3800, 3900 +option VAX660 # VAX 4000/200 option VAX670 # VAX 4000/300 +option VAX680 # VAX 4000/[45]00 option VAX410 # VS 2000, 3100/{30,} option VAX43 # VS 3100/76 option VAX46 # VS 4000/60 diff --git a/sys/arch/vax/conf/files.vax b/sys/arch/vax/conf/files.vax index a97e1385259..d38ee3d2716 100644 --- a/sys/arch/vax/conf/files.vax +++ b/sys/arch/vax/conf/files.vax @@ -1,4 +1,4 @@ -# $OpenBSD: files.vax,v 1.19 2001/02/11 06:34:36 hugh Exp $ +# $OpenBSD: files.vax,v 1.20 2001/02/24 10:31:59 hugh Exp $ # $NetBSD: files.vax,v 1.60 1999/08/27 20:04:32 ragge Exp $ # # new style config file for vax architecture @@ -295,11 +295,11 @@ file arch/vax/uba/dh.c dh needs-flag # These are general files needed for compilation. file dev/cons.c file dev/cninit.c -file dev/clock_subr.c vax8200|vax410|vax43|vax630|vax670|vax46|vax48|vax49|vax53 +file dev/clock_subr.c vax8200|vax410|vax43|vax630|vax660|vax670|vax680|vax46|vax48|vax49|vax53 file arch/vax/vax/locore.c file arch/vax/vax/mem.c file arch/vax/vax/clock.c -file arch/vax/vax/gencons.c vax8600|vax8200|vax780|vax750|vax630|vax650|vax670 +file arch/vax/vax/gencons.c vax8600|vax8200|vax780|vax750|vax630|vax650|vax660|vax670|vax680 file arch/vax/vax/pmap.c file arch/vax/vax/machdep.c file arch/vax/vax/ka820.c vax8200 @@ -314,7 +314,9 @@ file arch/vax/vax/ka53.c vax53 file arch/vax/vax/emulate.s insn_emulate file arch/vax/vax/unimpl_emul.s insn_emulate file arch/vax/vax/ka650.c vax650 +file arch/vax/vax/ka660.c vax660 file arch/vax/vax/ka670.c vax670 +file arch/vax/vax/ka680.c vax680 file arch/vax/vax/scb.c file arch/vax/vax/conf.c file arch/vax/vax/urem.s diff --git a/sys/arch/vax/include/ka680.h b/sys/arch/vax/include/ka680.h new file mode 100644 index 00000000000..32618830c12 --- /dev/null +++ b/sys/arch/vax/include/ka680.h @@ -0,0 +1,59 @@ +/* $OpenBSD: ka680.h,v 1.1 2001/02/24 10:31:56 hugh Exp $ */ +/* $NetBSD: ka680.h,v 1.1 2001/02/05 13:20:10 ragge Exp $ */ +/* + * Copyright (c) 1998 Ludd, University of Lule}, Sweden. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed at Ludd, University of + * Lule}, Sweden and its contributors. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Done by Michael Kukat (michael@unixiron.org) */ + +/* + * KA675/680 (VAX4000/[45]00) specific definitions. + */ + + +/* IPR bits definitions */ +#define PCSTS_FLUSH 4 +#define PCSTS_ENABLE 2 +#define PCTAG_PARITY 0x80000000 +#define PCTAG_VALID 1 + +/* memory addresses of interest */ +#define KA680_INVFLT 0x20200000 +#define KA680_INVFLTSZ 32768 +#define KA680_CCR 0x23000000 +#define KA680_TAGST 0x2d000000 +#define KA680_TAGSZ 32768 + +#define CCR_CENA 0x00000001 +#define CCR_SPECIO 0x00000010 + +#define KA680_BWF0 0x20080014 +#define BWF0_FEN 0x01000000 + diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c index 313c373d969..19e96488e9b 100644 --- a/sys/arch/vax/vax/conf.c +++ b/sys/arch/vax/vax/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.22 2000/10/31 02:30:57 hugh Exp $ */ +/* $OpenBSD: conf.c,v 1.23 2001/02/24 10:31:58 hugh Exp $ */ /* $NetBSD: conf.c,v 1.44 1999/10/27 16:38:54 ragge Exp $ */ /*- @@ -221,7 +221,8 @@ cons_decl(smg); #include "smg.h" struct consdev constab[]={ -#if VAX8600 || VAX8200 || VAX780 || VAX750 || VAX650 || VAX630 || VAX670 +#if VAX8600 || VAX8200 || VAX780 || VAX750 || VAX650 || VAX630 || VAX660 || \ + VAX670 || VAX680 #define NGEN 1 cons_init(gen), /* Generic console type; mtpr/mfpr */ #else diff --git a/sys/arch/vax/vax/findcpu.c b/sys/arch/vax/vax/findcpu.c index 2b33cb55bd0..e9274042bee 100644 --- a/sys/arch/vax/vax/findcpu.c +++ b/sys/arch/vax/vax/findcpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: findcpu.c,v 1.5 2001/01/30 17:10:05 hugh Exp $ */ +/* $OpenBSD: findcpu.c,v 1.6 2001/02/24 10:31:58 hugh Exp $ */ /* $NetBSD: findcpu.c,v 1.5 1999/08/23 19:10:43 ragge Exp $ */ /* * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden. @@ -102,11 +102,11 @@ findcpu() vax_bustype = VAX_XMIBUS; break; - case VAX_BTYP_670: - case VAX_BTYP_660: case VAX_BTYP_60: case VAX_BTYP_630: case VAX_BTYP_650: + case VAX_BTYP_660: + case VAX_BTYP_670: case VAX_BTYP_680: case VAX_BTYP_1303: vax_bustype = VAX_IBUS; diff --git a/sys/arch/vax/vax/gencons.c b/sys/arch/vax/vax/gencons.c index d17cb8d38fe..22b7286c2b3 100644 --- a/sys/arch/vax/vax/gencons.c +++ b/sys/arch/vax/vax/gencons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gencons.c,v 1.8 2000/10/10 18:21:28 bjc Exp $ */ +/* $OpenBSD: gencons.c,v 1.9 2001/02/24 10:31:58 hugh Exp $ */ /* $NetBSD: gencons.c,v 1.22 2000/01/24 02:40:33 matt Exp $ */ /* @@ -271,9 +271,11 @@ gencnprobe(cndev) { if ((vax_cputype < VAX_TYP_UV1) || /* All older has MTPR console */ (vax_boardtype == VAX_BTYP_630) || + (vax_boardtype == VAX_BTYP_650) || + (vax_boardtype == VAX_BTYP_660) || (vax_boardtype == VAX_BTYP_670) || - (vax_boardtype == VAX_BTYP_1303) || - (vax_boardtype == VAX_BTYP_650)) { + (vax_boardtype == VAX_BTYP_680) || + (vax_boardtype == VAX_BTYP_1303)) { cndev->cn_dev = makedev(25, 0); cndev->cn_pri = CN_NORMAL; } else diff --git a/sys/arch/vax/vax/ka660.c b/sys/arch/vax/vax/ka660.c new file mode 100644 index 00000000000..9ebf78f71ed --- /dev/null +++ b/sys/arch/vax/vax/ka660.c @@ -0,0 +1,152 @@ +/* $OpenBSD: ka660.c,v 1.1 2001/02/24 10:31:58 hugh Exp $ */ +/* $NetBSD: ka660.c,v 1.3 2000/06/29 07:14:27 mrg Exp $ */ +/* + * Copyright (c) 2000 Ludd, University of Lule}, Sweden. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed at Ludd, University of + * Lule}, Sweden and its contributors. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include <sys/param.h> +#include <sys/types.h> +#include <sys/device.h> +#include <sys/kernel.h> +#include <sys/systm.h> + +#include <vm/vm.h> +#include <vm/vm_kern.h> + +#include <machine/pte.h> +#include <machine/cpu.h> +#include <machine/mtpr.h> +#include <machine/sid.h> +#include <machine/pmap.h> +#include <machine/nexus.h> +#include <machine/uvax.h> +#include <machine/ka410.h> +#include <machine/ka420.h> +#include <machine/clock.h> +#include <machine/vsbus.h> + +#define KA660_CCR 37 /* Cache Control Register */ +#define KA660_CTAG 0x20150000 /* Cache Tags */ +#define KA660_CDATA 0x20150400 /* Cache Data */ +#define KA660_BEHR 0x20150800 /* Bank Enable/Hit Register */ +#define CCR_WWP 8 /* Write Wrong Parity */ +#define CCR_ENA 4 /* Cache Enable */ +#define CCR_FLU 2 /* Cache Flush */ +#define CCR_DIA 1 /* Diagnostic mode */ + +static void ka660_conf(void); +static void ka660_memerr(void); +static int ka660_mchk(caddr_t); +static void ka660_halt(void); +static void ka660_reboot(int); +static void ka660_cache_enable(void); + +struct vs_cpu *ka660_cpu; + +/* + * Declaration of 660-specific calls. + */ +struct cpu_dep ka660_calls = { + ka660_cache_enable, + ka660_mchk, + ka660_memerr, + ka660_conf, + generic_clkread, + generic_clkwrite, + 6, /* ~VUPS */ + 2, /* SCB pages */ + ka660_halt, + ka660_reboot, +}; + + +void +ka660_conf() +{ + printf("cpu0: KA660, microcode Rev. %d\n", vax_cpudata & 0377); +} + +void +ka660_cache_enable() +{ + unsigned int *p; + int cnt, bnk, behrtmp; + + mtpr(0, KA660_CCR); /* Disable cache */ + mtpr(CCR_DIA, KA660_CCR); /* Switch to diag mode */ + bnk = 1; + behrtmp = 0; + while(bnk <= 0x80) + { + *(int *)KA660_BEHR = bnk; + p = (int *)KA660_CDATA; + *p = 0x55aaff00L; + if(*p == 0x55aaff00L) behrtmp |= bnk; + *p = 0xffaa0055L; + if(*p != 0xffaa0055L) behrtmp &= ~bnk; + cnt = 256; + while(cnt--) *p++ = 0L; + p = (int *) KA660_CTAG; + cnt =128; + while(cnt--) { *p++ = 0x80000000L; p++; } + bnk <<= 1; + } + *(int *)KA660_BEHR = behrtmp; + + mtpr(CCR_DIA|CCR_FLU, KA660_CCR); /* Flush tags */ + mtpr(CCR_ENA, KA660_CCR); /* Enable cache */ +} + +void +ka660_memerr() +{ + printf("Memory err!\n"); +} + +int +ka660_mchk(addr) + caddr_t addr; +{ + panic("Machine check"); + return 0; +} + +static void +ka660_halt() +{ + asm("halt"); +} + +static void +ka660_reboot(int arg) +{ + asm("halt"); +} + diff --git a/sys/arch/vax/vax/ka680.c b/sys/arch/vax/vax/ka680.c new file mode 100644 index 00000000000..7c60a4fa529 --- /dev/null +++ b/sys/arch/vax/vax/ka680.c @@ -0,0 +1,246 @@ +/* $OpenBSD: ka680.c,v 1.1 2001/02/24 10:31:58 hugh Exp $ */ +/* $NetBSD: ka680.c,v 1.3 2001/01/28 21:01:53 ragge Exp $ */ +/* + * Copyright (c) 2000 Ludd, University of Lule}, Sweden. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed at Ludd, University of + * Lule}, Sweden and its contributors. + * 4. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* Done by Michael Kukat (michael@unixiron.org) */ + +#include <sys/param.h> +#include <sys/types.h> +#include <sys/device.h> +#include <sys/kernel.h> +#include <sys/systm.h> + +#include <machine/pte.h> +#include <machine/cpu.h> +#include <machine/mtpr.h> +#include <machine/sid.h> +#include <machine/nexus.h> +#include <machine/uvax.h> +#include <machine/ka680.h> +#include <machine/clock.h> +#include <machine/scb.h> + +static void ka680_conf __P((void)); +static void ka680_cache_enable __P((void)); +static void ka680_softmem __P((void *)); +static void ka680_hardmem __P((void *)); +static void ka680_steal_pages __P((void)); +static void ka680_memerr __P((void)); +static int ka680_mchk __P((caddr_t)); +static void ka680_halt __P((void)); +static void ka680_reboot __P((int)); + +extern int cold; /* cold-start flag */ + +/* + * KA680-specific IPRs. KA680 has the funny habit to control all caches + * via IPRs. + */ +#define PR_CCTL 0xa0 +#define CCTL_ENABLE 0x00000001 +#define CCTL_SW_ETM 0x40000000 +#define CCTL_HW_ETM 0x80000000 + +#define PR_BCETSTS 0xa3 +#define PR_BCEDSTS 0xa6 +#define PR_NESTS 0xae + +#define PR_VMAR 0xd0 +#define PR_VTAG 0xd1 +#define PR_ICSR 0xd3 +#define ICSR_ENABLE 0x01 + +#define PR_PCCTL 0xf8 +#define PCCTL_P_EN 0x10 +#define PCCTL_I_EN 0x02 +#define PCCTL_D_EN 0x01 + + +/* + * Declaration of KA680-specific calls. + */ +struct cpu_dep ka680_calls = { + ka680_steal_pages, + ka680_mchk, + ka680_memerr, + ka680_conf, + generic_clkread, + generic_clkwrite, + 24, /* ~VUPS */ + 2, /* SCB pages */ + ka680_halt, + ka680_reboot, +}; + + +void +ka680_conf() +{ + char *cpuname; + + /* Don't ask why, but we seem to need this... */ + + volatile int *hej = (void *)mfpr(PR_ISP); + *hej = *hej; + hej[-1] = hej[-1]; + + switch((vax_siedata & 0xff00) >> 8) { + case VAX_STYP_675: cpuname = "KA675"; break; + case VAX_STYP_680: cpuname = "KA680"; break; + default: cpuname = "unknown NVAX"; + } + printf("cpu0: %s, ucode rev %d\n", cpuname, vax_cpudata & 0xff); +} + +void +ka680_cache_enable() +{ + int start, slut; + + /* + * Turn caches off. + */ + mtpr(0, PR_ICSR); + mtpr(0, PR_PCCTL); + mtpr(mfpr(PR_CCTL) | CCTL_SW_ETM, PR_CCTL); + + /* + * Invalidate caches. + */ + mtpr(mfpr(PR_CCTL) | 6, PR_CCTL); /* Set cache size and speed */ + mtpr(mfpr(PR_BCETSTS), PR_BCETSTS); /* Clear error bits */ + mtpr(mfpr(PR_BCEDSTS), PR_BCEDSTS); /* Clear error bits */ + mtpr(mfpr(PR_NESTS), PR_NESTS); /* Clear error bits */ + + + start = 0x01400000; + slut = 0x01420000; + + /* Flush cache lines */ + for (; start < slut; start += 0x20) + mtpr(0, start); + + mtpr((mfpr(PR_CCTL) & ~(CCTL_SW_ETM|CCTL_ENABLE)) | CCTL_HW_ETM, + PR_CCTL); + + start = 0x01000000; + slut = 0x01020000; + + /* clear tag and valid */ + for (; start < slut; start += 0x20) + mtpr(0, start); + + mtpr(mfpr(PR_CCTL) | 6 | CCTL_ENABLE, PR_CCTL); /* enab. bcache */ + + start = 0x01800000; + slut = 0x01802000; + + /* Clear primary cache */ + for (; start < slut; start += 0x20) + mtpr(0, start); + + /* Flush the pipes (via REI) */ + asm("movpsl -(sp); movab 1f,-(sp); rei; 1:;"); + + /* Enable primary cache */ + mtpr(PCCTL_P_EN|PCCTL_I_EN|PCCTL_D_EN, PR_PCCTL); + + /* Enable the VIC */ + if(((vax_siedata & 0xff00) >> 8) == VAX_STYP_680) { + start = 0; + slut = 0x800; + for (; start < slut; start += 0x20) { + mtpr(start, PR_VMAR); + mtpr(0, PR_VTAG); + } + mtpr(ICSR_ENABLE, PR_ICSR); + } +} + +/* + * Why may we get memory errors during startup??? + */ + +void +ka680_hardmem(void *arg) +{ + if (cold == 0) + printf("Hard memory error\n"); + splhigh(); +} + +void +ka680_softmem(void *arg) +{ + if (cold == 0) + printf("Soft memory error\n"); + splhigh(); +} + +void +ka680_steal_pages() +{ + /* + * Get the soft and hard memory error vectors now. + */ + scb_vecalloc(0x54, ka680_softmem, 0, 0); + scb_vecalloc(0x60, ka680_hardmem, 0, 0); + + /* Turn on caches (to speed up execution a bit) */ + ka680_cache_enable(); +} + +void +ka680_memerr() +{ + printf("Memory err!\n"); +} + +int +ka680_mchk(caddr_t addr) +{ + panic("Machine check"); + return 0; +} + +static void +ka680_halt() +{ + asm("halt"); +} + +static void +ka680_reboot(int arg) +{ + asm("halt"); +} + diff --git a/sys/arch/vax/vax/locore.c b/sys/arch/vax/vax/locore.c index d3aeffb4dee..de9d48cc143 100644 --- a/sys/arch/vax/vax/locore.c +++ b/sys/arch/vax/vax/locore.c @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.c,v 1.12 2001/01/30 17:10:05 hugh Exp $ */ +/* $OpenBSD: locore.c,v 1.13 2001/02/24 10:31:58 hugh Exp $ */ /* $NetBSD: locore.c,v 1.43 2000/03/26 11:39:45 ragge Exp $ */ /* * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden. @@ -75,6 +75,7 @@ extern struct cpu_dep ka630_calls; extern struct cpu_dep ka650_calls; extern struct cpu_dep ka660_calls; extern struct cpu_dep ka670_calls; +extern struct cpu_dep ka680_calls; /* * Start is called from boot; the first routine that is called @@ -223,6 +224,19 @@ start() strcpy(cpu_model,"VAX 4000/300"); break; #endif +#if VAX680 + case VAX_BTYP_680: + dep_call = &ka680_calls; + switch((vax_siedata & 0xff00) >> 8) { + case VAX_STYP_675: + strcpy(cpu_model,"VAX 4000/400"); break; + case VAX_STYP_680: + strcpy(cpu_model,"VAX 4000/500"); break; + default: + strcpy(cpu_model,"VAX - Unknown Omega Class"); + } + break; +#endif #if VAX8200 case VAX_BTYP_8000: mastercpu = mfpr(PR_BINID); |