diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 05:29:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 05:29:32 +0000 |
commit | 86b4fdd623d3c50d7bfd9427c2c9208454cd0da7 (patch) | |
tree | 5d95abcaf58d01703a30c7ab600537d3b8f67989 /sys/arch/vax/include | |
parent | e2cd6c399798843e13e76f49dc8ee048b51f99f1 (diff) |
update from netbsd (verbatim)
Diffstat (limited to 'sys/arch/vax/include')
-rw-r--r-- | sys/arch/vax/include/frame.h (renamed from sys/arch/vax/include/loconf.h) | 47 | ||||
-rw-r--r-- | sys/arch/vax/include/ioa.h | 36 | ||||
-rw-r--r-- | sys/arch/vax/include/ka750.h | 15 | ||||
-rw-r--r-- | sys/arch/vax/include/kg.h | 36 | ||||
-rw-r--r-- | sys/arch/vax/include/nexus.h | 21 | ||||
-rw-r--r-- | sys/arch/vax/include/param.h | 27 | ||||
-rw-r--r-- | sys/arch/vax/include/pmap.h | 17 | ||||
-rw-r--r-- | sys/arch/vax/include/pte.h | 37 | ||||
-rw-r--r-- | sys/arch/vax/include/scb.h | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/sid.h | 3 | ||||
-rw-r--r-- | sys/arch/vax/include/trap.h | 23 | ||||
-rw-r--r-- | sys/arch/vax/include/types.h | 3 |
12 files changed, 103 insertions, 170 deletions
diff --git a/sys/arch/vax/include/loconf.h b/sys/arch/vax/include/frame.h index 62fb2f2b802..0031315aa5d 100644 --- a/sys/arch/vax/include/loconf.h +++ b/sys/arch/vax/include/frame.h @@ -1,7 +1,6 @@ -/* $NetBSD: loconf.h,v 1.2 1994/10/26 08:02:13 cgd Exp $ */ - +/* $NetBSD: frame.h,v 1.1 1995/11/12 15:07:30 ragge Exp $ */ /* - * Copyright (c) 1994 Ludd, University of Lule}, Sweden. + * Copyright (c) 1995 Ludd, University of Lule}, Sweden. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -14,7 +13,8 @@ * 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}. + * 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 * @@ -30,28 +30,21 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /* All bugs are subject to removal without further notice */ - - - - - -#define ISTACK_SIZE 4*NBPG - -/* XXX If kernel never crashes with kernel stack overflow trap - * kstack can be removed altogether. (Was 4*NBPG) +/* + * Description of calls frame on stack. This is the + * standard way of making procedure calls on vax systems. */ +struct callsframe { + unsigned int ca_cond; /* condition handler */ + unsigned int ca_maskpsw; /* register mask and saved psw */ + unsigned int ca_ap; /* argument pointer */ + unsigned int ca_fp; /* frame pointer */ + unsigned int ca_pc; /* program counter */ + unsigned int ca_argno; /* argument count on stack */ + unsigned int ca_arg1; /* first arg on stack */ + /* This can be followed by more arguments */ +}; + +/* Offset to beginning of calls frame from first arg */ +#define FRAMEOFFSET(arg1) ((struct callsframe *)((unsigned int)&(arg1) - 24)) -#define PROC_PAGES 0 - -#define MAX_UCODE 1024*1024*6 -#define MAX_UDATA 1024*1024*32 -#define MAX_USTCK 1024*1024*8 - -#define MAX_PROCESSES 32 - -#define PROCOFFSET (MAX_UCODE+MAX_UDATA+MAX_USTCK)/16384 - -/* Add 1 to USERPAGES if (MAX_PROCESSES mod 8) != 0 */ - -#define USERPAGES (MAX_UCODE+MAX_UDATA+MAX_USTCK)*MAX_PROCESSES/(512*128*128) diff --git a/sys/arch/vax/include/ioa.h b/sys/arch/vax/include/ioa.h deleted file mode 100644 index b09da95056f..00000000000 --- a/sys/arch/vax/include/ioa.h +++ /dev/null @@ -1,36 +0,0 @@ -/* $NetBSD: ioa.h,v 1.2 1994/10/26 08:02:09 cgd Exp $ */ - -/* - * Copyright (c) 1994 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}. - * 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. - */ - - /* All bugs are subject to removal without further notice */ - - - diff --git a/sys/arch/vax/include/ka750.h b/sys/arch/vax/include/ka750.h index c6c0b494fa4..9b5f71b0745 100644 --- a/sys/arch/vax/include/ka750.h +++ b/sys/arch/vax/include/ka750.h @@ -1,4 +1,4 @@ -/* $NetBSD: ka750.h,v 1.2 1994/10/26 08:02:10 cgd Exp $ */ +/* $NetBSD: ka750.h,v 1.3 1995/11/12 14:37:20 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -30,12 +30,15 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /* All bugs are subject to removal without further notice */ - - - -/* ka750.h - definitioner enbart f|r VAX 750 940328/ragge */ +#include "machine/nexus.h" #define V750UCODE(x) ((x>>8)&255) #define V750HARDW(x) (x&255) +#define NNEX750 NNEXSBI +#define NEX750 (0xf20000) +#define NEX750SZ (NNEX750 * sizeof(struct nexus)) + +/* 11/750 specific pages needed to be stolen when bootstrapping */ +#define V750PGS 4 + diff --git a/sys/arch/vax/include/kg.h b/sys/arch/vax/include/kg.h deleted file mode 100644 index e37e6f94c2c..00000000000 --- a/sys/arch/vax/include/kg.h +++ /dev/null @@ -1,36 +0,0 @@ -/* $NetBSD: kg.h,v 1.2 1994/10/26 08:02:11 cgd Exp $ */ - -/* - * Copyright (c) 1994 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}. - * 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. - */ - - /* All bugs are subject to removal without further notice */ - - - diff --git a/sys/arch/vax/include/nexus.h b/sys/arch/vax/include/nexus.h index a4c9a8ce678..9586ae7f41b 100644 --- a/sys/arch/vax/include/nexus.h +++ b/sys/arch/vax/include/nexus.h @@ -1,4 +1,4 @@ -/* $NetBSD: nexus.h,v 1.4 1995/02/23 17:51:42 ragge Exp $ */ +/* $NetBSD: nexus.h,v 1.5 1995/11/12 14:37:22 ragge Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. @@ -57,14 +57,6 @@ #define NNEX780 NNEXSBI #define NEX780 ((struct nexus *)0x20000000) #endif -#if VAX750 -#define NNEX750 NNEXSBI -#ifndef ASSEMBLER -#define NEX750 ((struct nexus*)0xf20000) -#else -#define NEX750 (0xF20000) -#endif -#endif #if VAX730 #define NNEX730 NNEXSBI #define NEX730 ((struct nexus *)0xf20000) @@ -94,9 +86,10 @@ struct nexus { }; struct sbi_attach_args { - u_int nexnum; - u_int type; - void *nexaddr; + u_int nexnum; /* This nexus TR number */ + u_int type; /* This nexus type */ + int nexinfo; /* Some info sent between attach & match */ + void *nexaddr; /* Virtual address of this nexus */ }; struct iobus { @@ -177,3 +170,7 @@ extern caddr_t *nex_vec; #define NEX_MEM256U 0x72 /* 256K chips, non-interleaved, upper */ #define NEX_MEM256UI 0x73 /* 256K chips, ext-interleaved, upper */ #define NEX_MEM256I 0x74 /* 256K chips, interleaved */ + +#ifndef ASSEMBLER +struct nexus *nexus; +#endif diff --git a/sys/arch/vax/include/param.h b/sys/arch/vax/include/param.h index 208a254711a..9829484dddd 100644 --- a/sys/arch/vax/include/param.h +++ b/sys/arch/vax/include/param.h @@ -1,11 +1,9 @@ -/* $NetBSD: param.h,v 1.12 1995/08/13 00:45:21 mycroft Exp $ */ +/* $NetBSD: param.h,v 1.13 1995/12/04 22:32:53 ragge Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * - * Modified for VAX 940213/Ragge - * * This code is derived from software contributed to Berkeley by * William Jolitz. * @@ -44,15 +42,15 @@ #define _VAX_PARAM_H_ #include "machine/macros.h" -#include "psl.h" +#include "machine/psl.h" /* * Machine dependent constants for VAX. */ #define MACHINE "vax" +#define MACHINE_ARCH "vax" #define MID_MACHINE MID_VAX -#define UNIX "vmunix" /* * Round p (pointer or byte index) up to a correctly-aligned value @@ -132,6 +130,7 @@ /* clicks to bytes */ #define ctob(x) ((x) << PGSHIFT) #define btoc(x) (((x) + PGOFSET) >> PGSHIFT) +#define btop(x) (((unsigned)(x)) >> PGSHIFT) /* bytes to disk blocks */ #define btodb(x) ((x) >> DEV_BSHIFT) @@ -146,19 +145,6 @@ #define bdbtofsb(bn) ((bn) / (BLKDEV_IOSIZE/DEV_BSIZE)) -/* - * Mach derived conversion macros - */ - -#define vax_round_pdr(x) ((((unsigned)(x)) + NBPDR - 1) & ~(NBPDR-1)) -#define vax_trunc_pdr(x) ((unsigned)(x) & ~(NBPDR-1)) -#define vax_round_page(x) ((((unsigned)(x)) + NBPG - 1) & ~(NBPG-1)) -#define vax_trunc_page(x) ((unsigned)(x) & ~(NBPG-1)) -#define vax_btod(x) ((unsigned)(x) >> PDRSHIFT) -#define vax_dtob(x) ((unsigned)(x) << PDRSHIFT) -#define vax_btop(x) ((unsigned)(x) >> PGSHIFT) -#define vax_ptob(x) ((unsigned)(x) << PGSHIFT) - #define splx(reg) \ ({ \ register int val; \ @@ -187,9 +173,6 @@ #define vmapbuf(p,q) #define vunmapbuf(p,q) -#if !defined(VAX630) && !defined(VAX410) -#define todr() mfpr(PR_TODR) -#endif -#define DELAY(x) {int N=todr()+(x/1000)+1;while(todr()!=N);} +#define DELAY(x) delay(x) #endif /* _VAX_PARAM_H_ */ diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h index a753c873e51..bfc1996e920 100644 --- a/sys/arch/vax/include/pmap.h +++ b/sys/arch/vax/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.10 1995/05/11 16:53:14 jtc Exp $ */ +/* $NetBSD: pmap.h,v 1.11 1995/11/12 14:41:41 ragge Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -83,6 +83,21 @@ typedef struct pv_entry { #define PHYS_TO_PV(phys_page) (&pv_table[((phys_page)>>PAGE_SHIFT)]) +/* ROUND_PAGE used before vm system is initialized */ +#define ROUND_PAGE(x) (((uint)(x) + PAGE_SIZE-1)& ~(PAGE_SIZE - 1)) + +/* Mapping macros used when allocating SPT */ +#define MAPVIRT(ptr, count) \ + (vm_offset_t)ptr = virtual_avail; \ + virtual_avail += (count) * NBPG; + +#define MAPPHYS(ptr, count, perm) \ + pmap_map(virtual_avail, avail_start, avail_start + \ + (count) * NBPG, perm); \ + (vm_offset_t)ptr = virtual_avail; \ + virtual_avail += (count) * NBPG; \ + avail_start += (count) * NBPG; + #ifdef _KERNEL pv_entry_t pv_table; /* array of entries, one per LOGICAL page */ diff --git a/sys/arch/vax/include/pte.h b/sys/arch/vax/include/pte.h index f99839e1931..fb5bd91a5aa 100644 --- a/sys/arch/vax/include/pte.h +++ b/sys/arch/vax/include/pte.h @@ -1,4 +1,4 @@ -/* $NetBSD: pte.h,v 1.5 1995/08/21 03:28:50 ragge Exp $ */ +/* $NetBSD: pte.h,v 1.6 1995/11/12 14:40:26 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -30,10 +30,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /* All bugs are subject to removal without further notice */ - - -#include "vax/include/param.h" +#include "machine/param.h" #ifndef ASSEMBLER @@ -41,19 +38,19 @@ * VAX page table entries */ struct pte { - unsigned int pg_pfn:21; /* Page Frame Number or 0 */ - unsigned int pg_u:1; /* Uniform bit, does WHAT?? XXX */ - unsigned int pg_w:1; /* Wired bit */ - unsigned int pg_sref:1; /* Help for ref simulation */ - unsigned int pg_ref:1; /* Simulated reference bit */ - unsigned int pg_z:1; /* Zero DIGITAL = 0 */ - unsigned int pg_m:1; /* Modify DIGITAL */ - unsigned int pg_prot:4; /* reserved at zero */ - unsigned int pg_v:1; /* valid bit */ + unsigned int pg_pfn:21; /* Page Frame Number or 0 */ + unsigned int pg_u:1; /* Uniform bit, does WHAT?? XXX */ + unsigned int pg_w:1; /* Wired bit */ + unsigned int pg_sref:1; /* Help for ref simulation */ + unsigned int pg_ref:1; /* Simulated reference bit */ + unsigned int pg_z:1; /* Zero DIGITAL = 0 */ + unsigned int pg_m:1; /* Modify DIGITAL */ + unsigned int pg_prot:4; /* reserved at zero */ + unsigned int pg_v:1; /* valid bit */ }; -typedef unsigned int pt_entry_t; /* Mach page table entry */ +typedef struct pte pt_entry_t; /* Mach page table entry */ #endif ASSEMBLER @@ -74,11 +71,7 @@ typedef unsigned int pt_entry_t; /* Mach page table entry */ #define PG_W 0x00400000 #define PG_U 0x00200000 #define PG_FRAME 0x001fffff -#define PG_SHIFT 9 -#define PG_PFNUM(x) ((x) >> PG_SHIFT) - - -#define VAX_MAX_KPTSIZE VM_KERNEL_PT_PAGES +#define PG_PFNUM(x) ((x) >> PGSHIFT) #ifndef ASSEMBLER extern pt_entry_t *Sysmap; @@ -88,8 +81,8 @@ extern pt_entry_t *Sysmap; #endif #define kvtopte(va) \ - (&Sysmap[((unsigned)(va) - KERNBASE) >> PGSHIFT]) + (&Sysmap[((unsigned)(va) & ~KERNBASE) >> PGSHIFT]) #define ptetokv(pt) \ ((((pt_entry_t *)(pt) - Sysmap) << PGSHIFT) + 0x80000000) #define kvtophys(va) \ - ((kvtopte(va)->pg_pfnum << PGSHIFT) | ((int)(va) & PGOFSET)) + (((kvtopte(va))->pg_pfn << PGSHIFT) | ((int)(va) & PGOFSET)) diff --git a/sys/arch/vax/include/scb.h b/sys/arch/vax/include/scb.h index f5663183149..6d5234088b7 100644 --- a/sys/arch/vax/include/scb.h +++ b/sys/arch/vax/include/scb.h @@ -1,4 +1,4 @@ -/* $NetBSD: scb.h,v 1.2 1994/10/26 08:02:26 cgd Exp $ */ +/* $NetBSD: scb.h,v 1.3 1995/11/12 14:38:31 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -30,10 +30,10 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /* All bugs are subject to removal without further notice */ - - struct scb { }; +#ifdef _KERNEL +extern struct scb *scb; +#endif diff --git a/sys/arch/vax/include/sid.h b/sys/arch/vax/include/sid.h index 91f89399156..2888b904525 100644 --- a/sys/arch/vax/include/sid.h +++ b/sys/arch/vax/include/sid.h @@ -1,4 +1,4 @@ -/* $NetBSD: sid.h,v 1.5 1995/02/23 17:51:44 ragge Exp $ */ +/* $NetBSD: sid.h,v 1.6 1995/11/12 14:37:18 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -48,7 +48,6 @@ #define MACHID(x) ((x>>24)&255) #define V750UCODE(x) ((x>>8)&255) -#define V750HARDW(x) (cpu_type&255) /* * The MicroVAXII CPU chip (78032) is used on more than one type of system diff --git a/sys/arch/vax/include/trap.h b/sys/arch/vax/include/trap.h index b1cafc13785..2eb245a4de4 100644 --- a/sys/arch/vax/include/trap.h +++ b/sys/arch/vax/include/trap.h @@ -1,4 +1,4 @@ -/* $NetBSD: trap.h,v 1.8 1995/06/16 15:17:40 ragge Exp $ */ +/* $NetBSD: trap.h,v 1.9 1995/11/12 14:33:11 ragge Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -104,6 +104,27 @@ struct trapframe { u_int pc; /* User pc */ u_int psl; /* User psl */ }; + +/* + * This struct is used when setting up interrupt vectors dynamically. + * It pushes a longword between 0-63 on the stack; this number is + * normally used as the ctlr number on devices. This use effectively + * limits the number of interruptable ctlrs on the unibus to 64. + */ +struct ivec_dsp { + char pushr; /* pushr */ + char pushrarg; /* $3f */ + char pushl; /* pushl */ + char pushlarg; /* $? */ + char nop; /* nop, for foolish gcc */ + char calls[3]; /* calls $1,? */ + u_int hoppaddr; /* jump for calls */ + char popr; /* popr $0x3f */ + char poprarg; + char rei; /* rei */ + char pad; /* sizeof(struct ivec_dsp) == 16 */ +}; + #endif /* ASSEMBLER */ #endif _VAX_TRAP_H_ diff --git a/sys/arch/vax/include/types.h b/sys/arch/vax/include/types.h index dbf36014062..89497fc4862 100644 --- a/sys/arch/vax/include/types.h +++ b/sys/arch/vax/include/types.h @@ -1,4 +1,4 @@ -/* $NetBSD: types.h,v 1.5 1995/07/06 03:39:45 cgd Exp $ */ +/* $NetBSD: types.h,v 1.6 1995/12/09 04:41:57 mycroft Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -73,5 +73,6 @@ typedef unsigned long long u_int64_t; typedef int32_t register_t; #define __BDEVSW_DUMP_OLD_TYPE +#define __FORK_BRAINDAMAGE #endif /* _MACHTYPES_H_ */ |