diff options
-rw-r--r-- | sys/arch/vax/include/clock.h | 38 | ||||
-rw-r--r-- | sys/arch/vax/include/cpu.h | 22 | ||||
-rw-r--r-- | sys/arch/vax/include/db_machdep.h | 4 | ||||
-rw-r--r-- | sys/arch/vax/include/disklabel.h | 6 | ||||
-rw-r--r-- | sys/arch/vax/include/ka410.h | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/ka43.h | 95 | ||||
-rw-r--r-- | sys/arch/vax/include/ka650.h | 12 | ||||
-rw-r--r-- | sys/arch/vax/include/ka750.h | 5 | ||||
-rw-r--r-- | sys/arch/vax/include/macros.h | 8 | ||||
-rw-r--r-- | sys/arch/vax/include/param.h | 15 | ||||
-rw-r--r-- | sys/arch/vax/include/rpb.h | 26 | ||||
-rw-r--r-- | sys/arch/vax/include/sid.h | 17 | ||||
-rw-r--r-- | sys/arch/vax/include/trap.h | 42 | ||||
-rw-r--r-- | sys/arch/vax/include/uvax.h | 21 | ||||
-rw-r--r-- | sys/arch/vax/include/vmparam.h | 58 |
15 files changed, 221 insertions, 156 deletions
diff --git a/sys/arch/vax/include/clock.h b/sys/arch/vax/include/clock.h index 5e55f4d56d8..cd496e6bdd5 100644 --- a/sys/arch/vax/include/clock.h +++ b/sys/arch/vax/include/clock.h @@ -1,5 +1,5 @@ -/* $OpenBSD: clock.h,v 1.2 1997/05/29 00:04:36 niklas Exp $ */ -/* $NetBSD: clock.h,v 1.1 1996/07/20 17:35:42 ragge Exp $ */ +/* $OpenBSD: clock.h,v 1.3 1997/09/10 11:47:04 maja Exp $ */ +/* $NetBSD: clock.h,v 1.2 1997/05/04 19:13:33 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -31,19 +31,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* - * Conversion structure. - */ -struct chiptime { - long sec; - long min; - long hour; - long day; - long mon; - long year; -}; - /* * Time constants. These are unlikely to change. */ @@ -61,10 +48,27 @@ struct chiptime { #define TODRBASE (1 << 28) /* Rumours says it comes from VMS */ +#define SEC_OFF 0 +#define MIN_OFF 2 +#define HR_OFF 4 +#define WDAY_OFF 6 +#define DAY_OFF 7 +#define MON_OFF 8 +#define YR_OFF 9 +#define CSRA_OFF 10 +#define CSRB_OFF 11 +#define CSRD_OFF 13 + +#define CSRA_UIP 0200 +#define CSRB_SET 0200 +#define CSRB_24 0002 +#define CSRB_DM 0004 +#define CSRD_VRT 0200 + /* Prototypes */ -long chiptotime __P((struct chiptime *)); -void timetochip __P((struct chiptime *)); void generic_clock __P((void)); void no_nicr_clock __P((void)); int generic_clkread __P((time_t)); void generic_clkwrite __P((void)); +int chip_clkread __P((time_t)); +void chip_clkwrite __P((void)); diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h index dce472921b9..510e8d857b3 100644 --- a/sys/arch/vax/include/cpu.h +++ b/sys/arch/vax/include/cpu.h @@ -1,5 +1,5 @@ -/* $OpenBSD: cpu.h,v 1.6 1997/05/29 00:04:37 niklas Exp $ */ -/* $NetBSD: cpu.h,v 1.19 1996/07/20 17:58:12 ragge Exp $ */ +/* $OpenBSD: cpu.h,v 1.7 1997/09/10 11:47:05 maja Exp $ */ +/* $NetBSD: cpu.h,v 1.23 1997/03/15 15:09:41 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden @@ -31,20 +31,21 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - /* All bugs are subject to removal without further notice */ - #include <sys/cdefs.h> #include <sys/device.h> #include <machine/mtpr.h> #include <machine/pcb.h> +#include <machine/uvax.h> #define enablertclock() #define cpu_wait(p) #define cpu_swapout(p) -extern struct cpu_dep cpu_calls[]; - +/* + * All cpu-dependent info is kept in this struct. Pointer to the + * struct for the current cpu is set up in locore.c. + */ struct cpu_dep { void (*cpu_steal_pages) __P((void)); /* pmap init before mm is on */ void (*cpu_clock) __P((void)); /* CPU dep RT clock start */ @@ -54,15 +55,24 @@ struct cpu_dep { void (*cpu_conf) __P((struct device *, struct device *, void *)); int (*cpu_clkread) __P((time_t)); /* Read cpu clock time */ void (*cpu_clkwrite) __P((void)); /* Write system time to cpu */ + int cpu_vups; /* speed of cpu */ + u_char *cpu_intreq; /* Used on some VAXstations */ + u_char *cpu_intclr; /* Used on some VAXstations */ + u_char *cpu_intmsk; /* Used on some VAXstations */ + struct uc_map *cpu_map; /* Map containing important addresses */ }; +extern struct cpu_dep *dep_call; /* Holds pointer to current CPU struct. */ + struct clockframe { int pc; int ps; }; +extern struct device *booted_from; extern int cold; extern int mastercpu; +extern int bootdev; #define setsoftnet() mtpr(12,PR_SIRR) #define setsoftclock() mtpr(8,PR_SIRR) diff --git a/sys/arch/vax/include/db_machdep.h b/sys/arch/vax/include/db_machdep.h index 45dfd366168..3058fa98d7a 100644 --- a/sys/arch/vax/include/db_machdep.h +++ b/sys/arch/vax/include/db_machdep.h @@ -1,5 +1,5 @@ -/* $OpenBSD: db_machdep.h,v 1.4 1997/05/29 00:04:37 niklas Exp $ */ -/* $NetBSD: db_machdep.h,v 1.2 1996/04/08 18:35:47 ragge Exp $ */ +/* $OpenBSD: db_machdep.h,v 1.5 1997/09/10 11:47:05 maja Exp $ */ +/* $NetBSD: db_machdep.h,v 1.3 1997/02/06 21:17:05 gwr Exp $ */ /* * Mach Operating System diff --git a/sys/arch/vax/include/disklabel.h b/sys/arch/vax/include/disklabel.h index 7f87620df1c..b0f1ebff8bd 100644 --- a/sys/arch/vax/include/disklabel.h +++ b/sys/arch/vax/include/disklabel.h @@ -1,5 +1,5 @@ -/* $OpenBSD: disklabel.h,v 1.4 1997/05/29 00:04:38 niklas Exp $ */ -/* $NetBSD: disklabel.h,v 1.3 1996/02/01 22:33:26 mycroft Exp $ */ +/* $OpenBSD: disklabel.h,v 1.5 1997/09/10 11:47:06 maja Exp $ */ +/* $NetBSD: disklabel.h,v 1.4 1997/03/09 15:55:58 ragge Exp $ */ /* * Copyright (c) 1994 Christopher G. Demetriou @@ -37,7 +37,7 @@ #define LABELSECTOR 0 /* sector containing label */ #define LABELOFFSET 64 /* offset of label in sector */ #define MAXPARTITIONS 8 /* number of partitions */ -#define RAW_PART 3 /* raw partition: xx?c (XXX) */ +#define RAW_PART 2 /* raw partition: xx?c */ /* Just a dummy */ #ifndef _LOCORE diff --git a/sys/arch/vax/include/ka410.h b/sys/arch/vax/include/ka410.h index 2010d50ba4a..68686573936 100644 --- a/sys/arch/vax/include/ka410.h +++ b/sys/arch/vax/include/ka410.h @@ -1,5 +1,5 @@ -/* $OpenBSD: ka410.h,v 1.2 1997/05/29 00:04:40 niklas Exp $ */ -/* $NetBSD: ka410.h,v 1.1 1996/07/20 17:58:14 ragge Exp $ */ +/* $OpenBSD: ka410.h,v 1.3 1997/09/10 11:47:06 maja Exp $ */ +/* $NetBSD: ka410.h,v 1.2 1997/02/19 10:06:05 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -65,7 +65,7 @@ /* * Other fixed addresses which should be mapped */ -#define KA410_CPU_BASE 0x20080000 +#define KA410_CPU_BASE ((struct ka410_cpu *)0x20080000) #define KA410_CPU_END 0x200800FF #define KA410_CPU_SIZE 0x100 #define KA410_NWA_BASE 0x20090000 /* Network Address ROM */ @@ -74,7 +74,7 @@ #define KA410_SER_BASE 0x200A0000 /* Serial line controller */ #define KA410_SER_END 0x200A000F #define KA410_SER_SIZE 0x10 -#define KA410_WAT_BASE 0x200B0000 /* TOY clock and NV-RAM */ +#define KA410_WAT_BASE ((struct ka410_clock *)0x200B0000)/* TOY clock */ #define KA410_WAT_END 0x200B00FF #define KA410_WAT_SIZE 0x100 #define KA410_DKC_BASE 0x200C0000 /* Disk Controller Ports */ diff --git a/sys/arch/vax/include/ka43.h b/sys/arch/vax/include/ka43.h index b40c51f34cc..323015b1d8a 100644 --- a/sys/arch/vax/include/ka43.h +++ b/sys/arch/vax/include/ka43.h @@ -1,5 +1,5 @@ -/* $OpenBSD: ka43.h,v 1.2 1997/05/29 00:04:41 niklas Exp $ */ -/* $NetBSD: ka43.h,v 1.1 1996/07/20 17:58:16 ragge Exp $ */ +/* $OpenBSD: ka43.h,v 1.3 1997/09/10 11:47:07 maja Exp $ */ +/* $NetBSD: ka43.h,v 1.2 1997/04/18 18:53:40 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -55,7 +55,6 @@ #define KA43_CT2_END 0x2101FFFF #define KA43_CT2_SIZE 0x20000 #define KA43_CH2_CREG 0x21100000 /* 2nd level cache control register */ -#define KA43_SESR 0x21100000 /* ??? */ #define KA43_ROM_BASE 0x20040000 /* System module ROM */ #define KA43_ROM_END 0x2007FFFF @@ -66,45 +65,78 @@ #define KA43_IVN_SIZE 0x20 #define KA43_HLTCOD 0x20080000 /* Halt Code Register */ -#define KA43_MSER 0x20080004 /* Memory System Error register */ -#define KA43_MEAR 0x20080008 /* Memory Error Address register */ +/* #define KA43_MSER 0x20080004 /* Memory System Error register */ +/* #define KA43_MEAR 0x20080008 /* Memory Error Address register */ #define KA43_INTMSK 0x2008000C /* Interrupt Mask register */ #define KA43_VDCORG 0x2008000D /* Video Controller Origin Register */ #define KA43_VDCSEL 0x2008000E /* Video Controller Select Register */ #define KA43_INTREQ 0x2008000F /* Interrupt Request register */ #define KA43_INTCLR 0x2008000F /* Interrupt Request clear register */ -#define KA43_DIAGDSP 0x20080010 +#define KA43_DIAGDSP 0x20080010 /* Diagnostic display register */ #define KA43_PARCTL 0x20080014 /* Parity Control Register */ -#define KA43_DIAGTME 0x2008001E +#define KA43_DIAGTME 0x2008001E /* diagnostic time register */ #define KA43_PCTL_DPEN 0x00000001 /* DMA parity enable (bit 0) */ #define KA43_PCTL_CPEN 0x00000002 /* CPU Parity enable (bit 1) */ #define KA43_PCTL_DMA 0x01000000 /* LANCE DMA control (bit 24) */ -#define KA43_SESR_CENB 0x00000001 +/* + * "CH2" and "SESR" are two common names related to Secondary Cache + */ +#define KA43_SESR 0x21100000 /* same as KA43_CH2_CREG */ + +#define KA43_SESR_CENB 0x00000001 /* Cache Enable */ #define KA43_SESR_SERR 0x00000002 #define KA43_SESR_LERR 0x00000004 #define KA43_SESR_CERR 0x00000008 #define KA43_SESR_DIRTY 0x00000010 #define KA43_SESR_MISS 0x00000020 -#define KA43_SESR_DPE 0x00000040 -#define KA43_SESR_TPE 0x00000080 +#define KA43_SESR_DPE 0x00000040 /* Dal Parity Error */ +#define KA43_SESR_TPE 0x00000080 /* Tag Parity Error */ #define KA43_SESR_WSB 0x00010000 #define KA43_SESR_CIEA 0x7FFC0000 -#define KA43_PCS_FORCEHIT (1<<0) /* Force hit */ -#define KA43_PCS_ENABLE (1<<1) /* Enable primary cache */ -#define KA43_PCS_FLUSH (1<<2) /* Flush cache */ -#define KA43_PCS_REFRESH (1<<3) /* Enable refresh */ -#define KA43_PCS_HIT (1<<4) /* Cache hit */ -#define KA43_PCS_INTERRUPT (1<<5) /* Interrupt pending */ -#define KA43_PCS_TRAP2 (1<<6) /* Trap while trap */ -#define KA43_PCS_TRAP1 (1<<7) /* Micro trap / machine check */ -#define KA43_PCS_TPERR (1<<8) /* Tag parity error */ -#define KA43_PCS_DPERR (1<<9) /* Dal data parity error */ -#define KA43_PCS_PPERR (1<<10) /* P data parity error */ -#define KA43_PCS_BUSERR (1<<11) /* Bus error */ -#define KA43_PCS_BCHIT (1<<12) /* B cache hit */ +#define KA43_SESR_BITS \ + "\020\010TPE\007DPE\006MISS\005DIRTY\004CERR\003LERR\002SERR\001ENABLE" + +/* + * The following values refer to bits/bitfields within the 4 internal + * registers controlling primary cache: + * PR_PCTAG(124, tag-register) PR_PCIDX(125, index-register) + * PR_PCERR(126, error-register) PR_PCSTS(127, status-register) + */ +#define KA43_PCTAG_TAG 0x1FFFF800 /* bits 11-29 */ +#define KA43_PCTAG_PARITY 0x40000000 +#define KA43_PCTAG_VALID 0x80000000 + +#define KA43_PCIDX_INDEX 0x000007F8 /* 0x100 Q-word entries */ + +#define KA43_PCERR_ADDR 0x3FFFFFFF + +#define KA43_PCS_FORCEHIT 0x00000001 /* Force hit */ +#define KA43_PCS_ENABLE 0x00000002 /* Enable primary cache */ +#define KA43_PCS_FLUSH 0x00000004 /* Flush cache */ +#define KA43_PCS_REFRESH 0x00000008 /* Enable refresh */ +#define KA43_PCS_HIT 0x00000010 /* Cache hit */ +#define KA43_PCS_INTERRUPT 0x00000020 /* Interrupt pending */ +#define KA43_PCS_TRAP2 0x00000040 /* Trap while trap */ +#define KA43_PCS_TRAP1 0x00000080 /* Micro trap/machine check */ +#define KA43_PCS_TPERR 0x00000100 /* Tag parity error */ +#define KA43_PCS_DPERR 0x00000200 /* Dal data parity error */ +#define KA43_PCS_PPERR 0x00000400 /* P data parity error */ +#define KA43_PCS_BUSERR 0x00000800 /* Bus error */ +#define KA43_PCS_BCHIT 0x00001000 /* B cache hit */ + +#define KA43_PCSTS_BITS \ + "\020\015BCHIT\014BUSERR\013PPERR\012DPERR\011TPERR\010TRAP1" \ + "\007TRAP2\006INTR\005HIT\004REFRESH\003FLUSH\002ENABLE\001FORCEHIT" + +/* + * Bits in PR_ACCS (Floating Point Accelerator Register) + */ +#define KA43_ACCS_VECTOR (1<<0) /* Vector Unit Present */ +#define KA43_ACCS_FCHIP (1<<1) /* FPU chip present */ +#define KA43_ACCS_WEP (1<<31) /* Write Even Parity */ /* * Other fixed addresses which should be mapped @@ -143,6 +175,8 @@ #define KA43_VME_END 0x3003FFFF #define KA43_VME_SIZE 0x40000 +#define KA43_DIAGMEM 0x28000000 /* start of diagnostic memory */ + #define KA43_SC1_DADR 0x200C00A0 /* (1st SCSI) DMA address register */ #define KA43_SC1_DCNT 0x200C00C0 /* (1st SCSI) DMA byte count reg. */ #define KA43_SC1_DDIR 0x200C00C4 /* (1st SCSI) DMA transfer direction */ @@ -181,10 +215,17 @@ #define KA43_RESERVED 0x200B00C0 /* Reserved (16 bytes) */ struct ka43_cpu { - u_long ka43_hltcod; - u_long ka43_mser; - u_long ka43_cear; - u_long ka43_intmsk; + u_long hltcod; /* Halt Code Register */ + u_long pad2; + u_long pad3; + u_char intreg[4]; /* Four 1-byte registers */ + u_short diagdsp; /* Diagnostic display register */ + u_short pad4; + u_long parctl; /* Parity Control Register */ + u_short pad5; + u_short pad6; + u_short pad7; + u_short diagtme; /* Diagnostic time register */ }; struct ka43_clock { diff --git a/sys/arch/vax/include/ka650.h b/sys/arch/vax/include/ka650.h index 51984b1cea0..8833438dc99 100644 --- a/sys/arch/vax/include/ka650.h +++ b/sys/arch/vax/include/ka650.h @@ -1,5 +1,5 @@ -/* $OpenBSD: ka650.h,v 1.5 1997/05/29 00:04:42 niklas Exp $ */ -/* $NetBSD: ka650.h,v 1.4 1996/05/19 16:43:20 ragge Exp $ */ +/* $OpenBSD: ka650.h,v 1.6 1997/09/10 11:47:07 maja Exp $ */ +/* $NetBSD: ka650.h,v 1.5 1997/02/12 17:50:36 ragge Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. * All rights reserved. @@ -235,6 +235,14 @@ struct ka650_ipcr { #define KA650ROM_GETS 0x20060010 /* (jsb) read string with prompt */ #define KA650_CONSTYPE 0x20140401 /* byte at which console type resides */ +/* + * Some useful macros + */ +#define GETCPUTYPE(x) ((x >> 24) & 0xff) +#define GETSYSSUBT(x) ((x >> 8) & 0xff) +#define GETFRMREV(x) ((x >> 16) & 0xff) +#define GETCODREV(x) (x & 0xff) + /* prototypes */ struct sbi_attach_args; diff --git a/sys/arch/vax/include/ka750.h b/sys/arch/vax/include/ka750.h index 52e8d63cadc..b0567b0dc5f 100644 --- a/sys/arch/vax/include/ka750.h +++ b/sys/arch/vax/include/ka750.h @@ -1,5 +1,5 @@ -/* $NetBSD: ka750.h,v 1.7 1996/07/20 17:58:17 ragge Exp $ */ -/* $OpenBSD: ka750.h,v 1.6 1997/05/28 23:14:03 niklas Exp $ */ +/* $NetBSD: ka750.h,v 1.8 1997/02/12 17:58:56 ragge Exp $ */ +/* $OpenBSD: ka750.h,v 1.7 1997/09/10 11:47:08 maja Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -45,7 +45,6 @@ /* 11/750 specific prototypes */ void ka750_conf __P((struct device *, struct device *, void *)); -void ka750_memenable __P((struct device *, struct device *, void *)); void ka750_memerr __P((void)); int ka750_mchk __P((caddr_t)); void ka750_steal_pages __P((void)); diff --git a/sys/arch/vax/include/macros.h b/sys/arch/vax/include/macros.h index 5701bcc5acb..4422e6d540e 100644 --- a/sys/arch/vax/include/macros.h +++ b/sys/arch/vax/include/macros.h @@ -1,5 +1,5 @@ -/* $OpenBSD: macros.h,v 1.6 1997/05/29 00:04:44 niklas Exp $ */ -/* $NetBSD: macros.h,v 1.10 1997/01/11 11:07:52 ragge Exp $ */ +/* $OpenBSD: macros.h,v 1.7 1997/09/10 11:47:08 maja Exp $ */ +/* $NetBSD: macros.h,v 1.11 1997/03/15 15:08:23 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -33,8 +33,8 @@ /* All bugs are subject to removal without further notice */ -#if !defined(_VAX_MACROS_H_) && (defined(STANDALONE) || \ - (!defined(_LOCORE) && defined(_VAX_INLINE_))) +#if !defined(_VAX_MACROS_H_) && !defined(STANDALONE) && \ + (!defined(_LOCORE) && defined(_VAX_INLINE_)) #define _VAX_MACROS_H_ /* Here general macros are supposed to be stored */ diff --git a/sys/arch/vax/include/param.h b/sys/arch/vax/include/param.h index ef99aae85d8..ea2c9f5b78e 100644 --- a/sys/arch/vax/include/param.h +++ b/sys/arch/vax/include/param.h @@ -1,5 +1,5 @@ -/* $OpenBSD: param.h,v 1.7 1997/01/16 14:26:25 maja Exp $ */ -/* $NetBSD: param.h,v 1.22 1997/01/11 11:06:17 ragge Exp $ */ +/* $OpenBSD: param.h,v 1.8 1997/09/10 11:47:09 maja Exp $ */ +/* $NetBSD: param.h,v 1.23 1997/02/24 23:23:06 fvdl Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -58,10 +58,17 @@ * Round p (pointer or byte index) up to a correctly-aligned value * for all data types (int, long, ...). The result is u_int and * must be cast to any desired pointer type. + * + * ALIGNED_POINTER is a boolean macro that checks whether an address + * is valid to fetch data elements of type t from on this architecture. + * This does not reflect the optimal alignment, just the possibility + * (within reasonable limits). + * */ -#define ALIGNBYTES (sizeof(int) - 1) -#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGNBYTES (sizeof(int) - 1) +#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) +#define ALIGNED_POINTER(p,t) ((((u_long)(p)) & (sizeof(t)-1)) == 0) #define PGSHIFT 9 /* LOG2(NBPG) */ #define NBPG (1<<PGSHIFT) /* (1 << PGSHIFT) bytes/page */ diff --git a/sys/arch/vax/include/rpb.h b/sys/arch/vax/include/rpb.h index c16f4db2cf5..5edb432914c 100644 --- a/sys/arch/vax/include/rpb.h +++ b/sys/arch/vax/include/rpb.h @@ -1,5 +1,5 @@ -/* $OpenBSD: rpb.h,v 1.3 1997/05/29 00:04:50 niklas Exp $ */ -/* $NetBSD: rpb.h,v 1.2 1995/10/20 13:47:27 ragge Exp $ */ +/* $OpenBSD: rpb.h,v 1.4 1997/09/10 11:47:09 maja Exp $ */ +/* $NetBSD: rpb.h,v 1.3 1997/03/15 15:09:40 ragge Exp $ */ /* * Copyright (c) 1995 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -98,6 +98,28 @@ struct rpb { /* size description */ long vmb_revision; /* 4 VMB revision label */ }; +/* + * Bootstrap device number encoding. + */ +#define BDEV_HP 0 +#define BDEV_RK 1 +#define BDEV_RL 2 +#define BDEV_IDC 3 +#define BDEV_UDA 17 +#define BDEV_TK 18 +#define BDEV_HSC 32 +#define BDEV_KDB 33 +#define BDEV_KRB 34 +#define BDEV_NK 35 +#define BDEV_RD 36 +#define BDEV_SCSI 37 +#define BDEV_SFL 42 +#define BDEV_CNSL 64 +#define BDEV_QE 96 +#define BDEV_DE 97 +#define BDEV_NI 98 +#define BDEV_LE 99 + #ifdef _KERNEL extern struct rpb rpb; #endif diff --git a/sys/arch/vax/include/sid.h b/sys/arch/vax/include/sid.h index 9c546fc83d6..0cdd8a586a7 100644 --- a/sys/arch/vax/include/sid.h +++ b/sys/arch/vax/include/sid.h @@ -1,5 +1,5 @@ -/* $OpenBSD: sid.h,v 1.4 1997/05/29 00:04:52 niklas Exp $ */ -/* $NetBSD: sid.h,v 1.8 1996/08/20 14:19:41 ragge Exp $ */ +/* $OpenBSD: sid.h,v 1.5 1997/09/10 11:47:10 maja Exp $ */ +/* $NetBSD: sid.h,v 1.9 1997/02/12 17:50:38 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -98,14 +98,21 @@ #define VAX_BTYP_650 0x0A000001 /* MicroVAX 3500, 3600 */ - /* VAX_BTYP_65D 0x0A000001 VAXstation 3200, 3500 */ - /* VAX_BTYP_640 0x0A000001 MicroVAX 3300, 3400 */ - /* VAX_BTYP_655 0x0A000001 MicroVAX 3800, 3900 */ + /* VAX_BTYP_65D 0x0A000001 VAXstation 3200, 3500 XXX */ + /* VAX_BTYP_640 0x0A000001 MicroVAX 3300, 3400 XXX */ + /* VAX_BTYP_655 0x0A000001 MicroVAX 3800, 3900 XXX */ #define VAX_BTYP_9CC 0x0A000002 /* VAX 6000 model 210/310 */ #define VAX_BTYP_60 0x0A000003 /* VAXstation 3520, 3540 */ #define VAX_BTYP_420 0x0A000004 /* VAXstation 3100 models 10 - 48 */ #define VAX_BTYP_510 0x0A000007 /* VAXft model 110 */ /* VAX_BTYP_520 0x0A000007 VAXft model 310 */ + +/* + * SID Extension register definitions for CVAX series + */ +#define VAX_SIE_KA640 0x2 /* KA640 MicroVAX 3300, 3400 */ +#define VAX_SIE_KA650 0x1 /* KA650 MicroVAX 3500, 3600 */ +#define VAX_SIE_KA655 0x3 /* KA655 MicroVAX 3800, 3900 */ /* * Rigel chip series (1990) diff --git a/sys/arch/vax/include/trap.h b/sys/arch/vax/include/trap.h index ad1bc05bb20..afaa5ceb6eb 100644 --- a/sys/arch/vax/include/trap.h +++ b/sys/arch/vax/include/trap.h @@ -1,5 +1,5 @@ -/* $OpenBSD: trap.h,v 1.7 1997/05/29 00:04:53 niklas Exp $ */ -/* $NetBSD: trap.h,v 1.14 1997/01/11 11:46:43 ragge Exp $ */ +/* $OpenBSD: trap.h,v 1.8 1997/09/10 11:47:11 maja Exp $ */ +/* $NetBSD: trap.h,v 1.15 1997/02/16 20:37:29 ragge Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -70,25 +70,25 @@ #ifndef _LOCORE struct trapframe { - unsigned fp; /* Stack frame pointer */ - unsigned ap; /* Argument pointer on user stack */ - unsigned sp; /* Stack pointer */ - unsigned r0; /* General registers saved upon trap/syscall */ - unsigned r1; - unsigned r2; - unsigned r3; - unsigned r4; - unsigned r5; - unsigned r6; - unsigned r7; - unsigned r8; - unsigned r9; - unsigned r10; - unsigned r11; - unsigned trap; /* Type of trap */ - unsigned code; /* Trap specific code */ - unsigned pc; /* User pc */ - unsigned psl; /* User psl */ + long fp; /* Stack frame pointer */ + long ap; /* Argument pointer on user stack */ + long sp; /* Stack pointer */ + long r0; /* General registers saved upon trap/syscall */ + long r1; + long r2; + long r3; + long r4; + long r5; + long r6; + long r7; + long r8; + long r9; + long r10; + long r11; + long trap; /* Type of trap */ + long code; /* Trap specific code */ + long pc; /* User pc */ + long psl; /* User psl */ }; /* diff --git a/sys/arch/vax/include/uvax.h b/sys/arch/vax/include/uvax.h index b3441b6689f..31f493098b1 100644 --- a/sys/arch/vax/include/uvax.h +++ b/sys/arch/vax/include/uvax.h @@ -1,5 +1,5 @@ -/* $OpenBSD: uvax.h,v 1.2 1997/05/29 00:04:55 niklas Exp $ */ -/* $NetBSD: uvax.h,v 1.1 1996/07/20 17:58:24 ragge Exp $ */ +/* $OpenBSD: uvax.h,v 1.3 1997/09/10 11:47:11 maja Exp $ */ +/* $NetBSD: uvax.h,v 1.2 1997/02/19 10:06:07 ragge Exp $ */ /* * Copyright (c) 1996 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -33,6 +33,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _VAX_UVAX_H_ +#define _VAX_UVAX_H_ + /* * generic(?) MicroVAX and VAXstation support * @@ -52,26 +55,15 @@ void uvax_steal_pages __P((void)); int uvax_setup __P((int mapen)); struct uvax_calls { - u_long (*uc_phys2virt) __P((u_long)); /* most often used! */ u_long (*uc_memsize) __P((void)); - void (*uc_steal_pages) __P((void)); - void (*uc_conf) __P((struct device*, struct device*, void*)); - void (*uc_memerr) __P((void)); - int (*uc_mchk) __P((caddr_t)); - int (*uc_clkread) __P((time_t)); - void (*uc_clkwrite) __P((void)); char *uc_name; - u_char *uc_intreq; - u_char *uc_intclr; - u_char *uc_intmsk; void *le_iomem; /* base addr of RAM -- CPU's view */ u_long *le_ioaddr; /* base addr of RAM -- LANCE's view */ int *le_memsize; /* size of RAM reserved for LANCE */ void *uc_physmap; - int uc_busTypes; int uc_vups; /* used by delay() */ int uv_flags; @@ -114,3 +106,6 @@ extern struct uc_map *uc_physmap; /* Prototypes */ int uvax_clkread __P((time_t)); void uvax_clkwrite __P((void)); +void uvax_fillmap __P((void)); +u_long uvax_phys2virt __P((u_long)); +#endif diff --git a/sys/arch/vax/include/vmparam.h b/sys/arch/vax/include/vmparam.h index e8c5ca98c01..46993dc18c8 100644 --- a/sys/arch/vax/include/vmparam.h +++ b/sys/arch/vax/include/vmparam.h @@ -1,5 +1,5 @@ -/* $OpenBSD: vmparam.h,v 1.6 1997/08/30 09:50:26 maja Exp $ */ -/* $NetBSD: vmparam.h,v 1.12 1996/07/20 17:58:26 ragge Exp $ */ +/* $OpenBSD: vmparam.h,v 1.7 1997/09/10 11:47:12 maja Exp $ */ +/* $NetBSD: vmparam.h,v 1.13 1997/02/12 17:52:59 ragge Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -66,22 +66,30 @@ */ #ifndef MAXTSIZ -#define MAXTSIZ (6*1024*1024) /* max text size */ +#define MAXTSIZ (8*1024*1024) /* max text size */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (16*1024*1024) /* max data size */ +#define MAXDSIZ (24*1024*1024) /* max data size */ #endif #ifndef MAXSSIZ -#define MAXSSIZ (16*1024*1024) /* max stack size */ +#define MAXSSIZ (8*1024*1024) /* max stack size */ #endif #ifndef DFLDSIZ -#define DFLDSIZ (6*1024*1024) /* initial data size limit */ +#define DFLDSIZ (16*1024*1024) /* initial data size limit */ #endif #ifndef DFLSSIZ #define DFLSSIZ (512*1024) /* initial stack size limit */ #endif /* + * All mmap()'ed data will be mapped above MAXDSIZ. This means that + * pte space must be allocated for (possible) mmap()'ed data. + * Note: This is just a hint, if we mmap() more than this the page + * table will be expanded. (at the cost of speed). + */ +#define MMAPSPACE (24*1024*1024) + +/* * Default sizes of swap allocation chunks (see dmap.h). * The actual values may be changed in vminit() based on MAXDSIZ. * With MAXDSIZ of 16Mb and NDMAP of 38, dmmax will be 1024. @@ -105,19 +113,6 @@ #define USRIOSIZE 300 /* - * Sizes of the system and user portions of the system page table. - * USRPTSIZE is maximum possible user virtual memory to be used. - * KALLOCMEM is kernel malloc area size. How much needed for each process? - * SYSPTSIZE is total size of statically allocated pte. (in physmem) - * Ptsizes are in PTEs. - */ - -#define USRPTSIZE ((MAXDSIZ >> PGSHIFT) * maxproc) -#define KALLOCMEM (((1*1024*1024*maxproc)>>PGSHIFT)/4) -#define SYSPTSIZE (((USRPTSIZE * 4) >> PGSHIFT) + UPAGES * maxproc + \ - KALLOCMEM) - -/* * The time for a process to be blocked before being very swappable. * This is a number of seconds which the system takes as being a non-trivial * amount of real time. You probably shouldn't change this; @@ -146,29 +141,6 @@ #define SAFERSS 8 /* nominal ``small'' resident set size protected against replacement */ -/* - * There are two clock hands, initially separated by HANDSPREAD bytes - * (but at most all of user memory). The amount of time to reclaim - * a page once the pageout process examines it increases with this - * distance and decreases as the scan rate rises. - */ - -#define HANDSPREAD (2 * 1024 * 1024) - -/* - * The number of times per second to recompute the desired paging rate - * and poke the pagedaemon. - */ - -#define RATETOSCHEDPAGING 4 - -/* - * Believed threshold (in megabytes) for which interleaved - * swapping area is desirable. - */ - -#define LOTSOFMEM 2 - #define mapin(pte, v, pfnum, prot) \ {(*(int *)(pte) = ((pfnum)<<PGSHIFT) | (prot)) ; } @@ -181,7 +153,7 @@ #define VM_MAXUSER_ADDRESS ((vm_offset_t)0x7FFFE000) #define VM_MAX_ADDRESS ((vm_offset_t)0xC0000000) #define VM_MIN_KERNEL_ADDRESS ((vm_offset_t)0x80000000) -#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0x90000000) +#define VM_MAX_KERNEL_ADDRESS ((vm_offset_t)0xC0000000) /* virtual sizes (bytes) for various kernel submaps */ #define VM_MBUF_SIZE (NMBCLUSTERS*MCLBYTES) |