summaryrefslogtreecommitdiff
path: root/sys/arch/vax/include
diff options
context:
space:
mode:
authorMats O Jansson <maja@cvs.openbsd.org>1997-01-15 23:25:34 +0000
committerMats O Jansson <maja@cvs.openbsd.org>1997-01-15 23:25:34 +0000
commitbf6413046b73005ecca3f5352c8711d00a6d00b9 (patch)
treefcd2c64f80b1be68d962f84a1e34da0a02d5385f /sys/arch/vax/include
parent957078809571dbe61aac81705145fa4cee6bfda8 (diff)
sync with NetBSD 970112 -moj
Diffstat (limited to 'sys/arch/vax/include')
-rw-r--r--sys/arch/vax/include/ansi.h5
-rw-r--r--sys/arch/vax/include/aout_machdep.h49
-rw-r--r--sys/arch/vax/include/asm.h6
-rw-r--r--sys/arch/vax/include/clock.h69
-rw-r--r--sys/arch/vax/include/cpu.h16
-rw-r--r--sys/arch/vax/include/endian.h4
-rw-r--r--sys/arch/vax/include/ka410.h212
-rw-r--r--sys/arch/vax/include/ka420.h140
-rw-r--r--sys/arch/vax/include/ka43.h209
-rw-r--r--sys/arch/vax/include/ka630.h (renamed from sys/arch/vax/include/uvaxII.h)15
-rw-r--r--sys/arch/vax/include/ka750.h3
-rw-r--r--sys/arch/vax/include/ka820.h148
-rw-r--r--sys/arch/vax/include/macros.h7
-rw-r--r--sys/arch/vax/include/mtpr.h25
-rw-r--r--sys/arch/vax/include/nexus.h36
-rw-r--r--sys/arch/vax/include/param.h15
-rw-r--r--sys/arch/vax/include/pmap.h3
-rw-r--r--sys/arch/vax/include/sid.h186
-rw-r--r--sys/arch/vax/include/trap.h4
-rw-r--r--sys/arch/vax/include/types.h4
-rw-r--r--sys/arch/vax/include/uvax.h115
-rw-r--r--sys/arch/vax/include/vmparam.h7
-rw-r--r--sys/arch/vax/include/vsbus.h86
23 files changed, 1286 insertions, 78 deletions
diff --git a/sys/arch/vax/include/ansi.h b/sys/arch/vax/include/ansi.h
index 088f4a3dbec..a9ded0b66e0 100644
--- a/sys/arch/vax/include/ansi.h
+++ b/sys/arch/vax/include/ansi.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ansi.h,v 1.4 1996/03/16 01:32:03 jtc Exp $ */
+/* $NetBSD: ansi.h,v 1.5 1996/11/15 22:39:01 jtc Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -57,5 +57,8 @@
#define _BSD_VA_LIST_ char * /* va_list */
#define _BSD_WCHAR_T_ int /* wchar_t */
#define _BSD_WINT_T_ int /* wint_t */
+#define _BSD_CLOCKID_T_ int
+#define _BSD_TIMER_T_ int
+
#endif /* _ANSI_H_ */
diff --git a/sys/arch/vax/include/aout_machdep.h b/sys/arch/vax/include/aout_machdep.h
new file mode 100644
index 00000000000..3d34ccc79e5
--- /dev/null
+++ b/sys/arch/vax/include/aout_machdep.h
@@ -0,0 +1,49 @@
+/* $NetBSD: aout_machdep.h,v 1.4 1995/09/23 14:57:40 ragge Exp $ */
+
+/*
+ * Copyright (c) 1993 Christopher G. Demetriou
+ * 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. 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.
+ */
+
+#ifndef _VAX_EXEC_H_
+#define _VAX_EXEC_H_
+
+#define __LDPGSZ 1024
+
+/* Relocation format. */
+struct relocation_info_vax {
+ int r_address; /* offset in text or data segment */
+ unsigned int r_symbolnum : 24, /* ordinal number of add symbol */
+ r_pcrel : 1, /* 1 if value should be pc-relative */
+ r_length : 2, /* log base 2 of value's width */
+ r_extern : 1, /* 1 if need to add symbol to value */
+ r_baserel : 1, /* linkage table relative */
+ r_jmptable : 1, /* relocate to jump table */
+ r_relative : 1, /* load address relative */
+ r_copy : 1; /* run time copy */
+};
+#define relocation_info relocation_info_vax
+
+#endif /* _VAX_EXEC_H_ */
diff --git a/sys/arch/vax/include/asm.h b/sys/arch/vax/include/asm.h
index b77cf3d421a..b97107d906e 100644
--- a/sys/arch/vax/include/asm.h
+++ b/sys/arch/vax/include/asm.h
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.4 1996/01/06 18:37:35 ragge Exp $ */
+/* $NetBSD: asm.h,v 1.5 1996/11/30 02:49:06 jtc Exp $ */
/*
* Copyright (c) 1982, 1993
* The Regents of the University of California. All rights reserved.
@@ -51,7 +51,7 @@
#define R11 0x800
#ifdef __STDC__
-#ifdef PROF
+#ifdef GPROF
#define ENTRY(x, regs) \
.globl _ ## x ## ; .align 2; _ ## x ## : .word regs; \
.data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
@@ -65,7 +65,7 @@
.globl x; .align 2; x ## : .word regs
#endif
# else
-#ifdef PROF
+#ifdef GPROF
#define ENTRY(x, regs) \
.globl _/**/x; .align 2; _/**/x: .word regs; \
.data; 1:; .long 0; .text; moval 1b,r0; jsb mcount
diff --git a/sys/arch/vax/include/clock.h b/sys/arch/vax/include/clock.h
new file mode 100644
index 00000000000..28bffbe9a13
--- /dev/null
+++ b/sys/arch/vax/include/clock.h
@@ -0,0 +1,69 @@
+/* $NetBSD: clock.h,v 1.1 1996/07/20 17:35:42 ragge Exp $ */
+/*
+ * Copyright (c) 1996 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.
+ */
+
+
+/*
+ * Conversion structure.
+ */
+struct chiptime {
+ long sec;
+ long min;
+ long hour;
+ long day;
+ long mon;
+ long year;
+};
+
+/*
+ * Time constants. These are unlikely to change.
+ */
+#define IS_LEAPYEAR(y) (((y % 4) == 0) && (y % 100))
+
+#define SEC_PER_MIN (60)
+#define SEC_PER_HOUR (SEC_PER_MIN * 60)
+#define SEC_PER_DAY (SEC_PER_HOUR * 24)
+#define DAYSPERYEAR(y) (IS_LEAPYEAR(y) ? 366 : 365)
+#define SECPERYEAR(y) (DAYSPERYEAR(y) * SEC_PER_DAY)
+
+#define CLKREAD_OK 0
+#define CLKREAD_BAD -1
+#define CLKREAD_WARN -2
+
+#define TODRBASE (1 << 28) /* Rumours says it comes from VMS */
+
+/* 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));
diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h
index a99710bd042..b928a64d131 100644
--- a/sys/arch/vax/include/cpu.h
+++ b/sys/arch/vax/include/cpu.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.17 1996/05/19 16:43:16 ragge Exp $ */
+/* $NetBSD: cpu.h,v 1.19 1996/07/20 17:58:12 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden
@@ -42,17 +42,17 @@
#define cpu_wait(p)
#define cpu_swapout(p)
-
-extern int cpunumber, cpu_type;
extern struct cpu_dep cpu_calls[];
struct cpu_dep {
void (*cpu_steal_pages) __P((void)); /* pmap init before mm is on */
- int (*cpu_clock) __P((void)); /* CPU dependent clock handling */
+ void (*cpu_clock) __P((void)); /* CPU dep RT clock start */
int (*cpu_mchk) __P((caddr_t)); /* Machine check handling */
void (*cpu_memerr) __P((void)); /* Memory subsystem errors */
/* Autoconfiguration */
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 */
};
struct clockframe {
@@ -60,9 +60,12 @@ struct clockframe {
int ps;
};
+extern int cold;
+extern int mastercpu;
+
#define setsoftnet() mtpr(12,PR_SIRR)
#define setsoftclock() mtpr(8,PR_SIRR)
-
+#define todr() mfpr(PR_TODR)
/*
* Preempt the current process if in interrupt from user mode,
* or after the current trap/syscall if in system mode.
@@ -93,7 +96,8 @@ extern int want_resched; /* resched() was called */
int badaddr __P((caddr_t, int));
void cpu_set_kpc __P((struct proc *, void (*)(struct proc *)));
void cpu_swapin __P((struct proc *));
-int hp_getdev __P((int, int));
+int hp_getdev __P((int, int, char **));
+int ra_getdev __P((int, int, int, char **));
void configure __P((void));
void dumpconf __P((void));
void dumpsys __P((void));
diff --git a/sys/arch/vax/include/endian.h b/sys/arch/vax/include/endian.h
index ac0699c9329..02e1fee60a0 100644
--- a/sys/arch/vax/include/endian.h
+++ b/sys/arch/vax/include/endian.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: endian.h,v 1.3 1996/11/25 13:11:40 niklas Exp $ */
-/* $NetBSD: endian.h,v 1.7 1996/04/08 18:35:48 ragge Exp $ */
+/* $OpenBSD: endian.h,v 1.4 1997/01/15 23:24:37 maja Exp $ */
+/* $NetBSD: endian.h,v 1.8 1996/10/13 03:28:00 christos Exp $ */
/*
* Copyright (c) 1987, 1991 Regents of the University of California.
diff --git a/sys/arch/vax/include/ka410.h b/sys/arch/vax/include/ka410.h
new file mode 100644
index 00000000000..379cf984057
--- /dev/null
+++ b/sys/arch/vax/include/ka410.h
@@ -0,0 +1,212 @@
+/* $NetBSD: ka410.h,v 1.1 1996/07/20 17:58:14 ragge Exp $ */
+/*
+ * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Ludd by Bertram Barth.
+ *
+ * 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.
+ */
+
+/*
+ * Definition for I/O addresses of
+ *
+ * MicroVAX 2000 (TeamMate)
+ * VAXstation 2000 (VAXstar)
+ */
+
+#define KA410_SIDEX 0x20040004 /* SID extension register */
+
+#define KA410_CFGTST 0x20020000 /* Configuration and Test register */
+#define KA410_IORESET 0x20020000 /* I/O Reset register */
+
+#define KA410_ROM_BASE 0x20040000 /* System module ROM */
+#define KA410_ROM_END 0x2007FFFF
+#define KA410_ROM_SIZE 0x40000
+
+#define KA410_IVN_BASE 0x20040020 /* Interrupt Vector Numbers */
+#define KA410_IVN_END 0x2004003F
+#define KA410_IVN_SIZE 0x20
+
+#define KA410_HLTCOD 0x20080000 /* Halt Code Register */
+#define KA410_MSER 0x20080004 /* Memory System Error register */
+#define KA410_MEAR 0x20080008 /* Memory Error Address register */
+#define KA410_INTMSK 0x2008000C /* Interrupt Mask register */
+#define KA410_VDCORG 0x2008000D /* Video Controller Origin Register */
+#define KA410_VDCSEL 0x2008000E /* Video Controller Select Register */
+#define KA410_INTREQ 0x2008000F /* Interrupt Request register */
+#define KA410_INTCLR 0x2008000F /* Interrupt Request clear register */
+
+/*
+ * Other fixed addresses which should be mapped
+ */
+#define KA410_CPU_BASE 0x20080000
+#define KA410_CPU_END 0x200800FF
+#define KA410_CPU_SIZE 0x100
+#define KA410_NWA_BASE 0x20090000 /* Network Address ROM */
+#define KA410_NWA_END 0x2009007F
+#define KA410_NWA_SIZE 0x80
+#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_END 0x200B00FF
+#define KA410_WAT_SIZE 0x100
+#define KA410_DKC_BASE 0x200C0000 /* Disk Controller Ports */
+#define KA410_DKC_END 0x200C0007
+#define KA410_DKC_SIZE 0x08
+#define KA410_SCS_BASE 0x200C0080 /* Tape (SCSI) Controller Chip */
+#define KA410_SCS_END 0x200C009F
+#define KA410_SCS_SIZE 0x20
+#define KA410_DMA_BASE 0x200D0000 /* Disk Data buffer RAM */
+#define KA410_DMA_END 0x200D3FFF
+#define KA410_DMA_SIZE 0x4000
+#define KA410_LAN_BASE 0x200E0000 /* LANCE chip registers */
+#define KA410_LAN_END 0x200E0007
+#define KA410_LAN_SIZE 0x08
+#define KA410_CUR_BASE 0x200F0000 /* Monochrome video cursor chip */
+#define KA410_CUR_END 0x200F0007
+#define KA410_CUR_SIZE 0x08
+
+#define KA410_SCS_DADR 0x200C00A0 /* Tape(SCSI) DMA address register */
+#define KA410_SCS_DCNT 0x200C00C0 /* Tape(SCSI) DMA byte count reg. */
+#define KA410_SCS_DDIR 0x200C00C4 /* Tape(SCSI) DMA transfer direction */
+
+#define KA410_CUR_CMD 0x200F0000 /* Cursor Command Register */
+#define KA410_CUR_XPOS 0x200F0004 /* Cursor X position */
+#define KA410_CUR_YPOS 0x200F0008 /* Cursor Y position */
+
+#define KA410_CUR_XMIN1 0x200F000C /* Region 1 left edge */
+#define KA410_CUR_XMAX1 0x200F0010 /* Region 1 right edge */
+#define KA410_CUR_YMIN1 0x200F0014 /* Region 1 top edge */
+#define KA410_CUR_YMAX1 0x200F0018 /* Region 1 bottom edge */
+
+#define KA410_CUR_XMIN2 0x200F002C /* Region 2 left edge */
+#define KA410_CUR_XMAX2 0x200F0030 /* Region 2 right edge */
+#define KA410_CUR_YMIN2 0x200F0034 /* Region 2 top edge */
+#define KA410_CUR_YMAX2 0x200F0038 /* Region 2 bottom edge */
+
+/*
+ * Definitions for the Configuration and Test Register
+ */
+#define KA410_CFG_MULTU 0x80 /* MicroVAX or VAXstation */
+#define KA410_CFG_NETOPT 0x40 /* Network option present */
+#define KA410_CFG_L3CON 0x20 /* Console on line #3 of dc */
+#define KA410_CFG_CURTEST 0x10 /* Cursor Test (monochrom) */
+#define KA410_CFG_VIDOPT 0x08 /* Video option present */
+#define KA410_CFG_MEMSZ 0x07 /* Memory option type/size */
+
+#define KA410_CFG_0MB 0x00 /* No additional Memory board */
+#define KA410_CFG_1MB 0x01
+#define KA410_CFG_2MB 0x02
+#define KA410_CFG_4MB 0x03
+#define KA410_CFG_6MB 0x04
+#define KA410_CFG_8MB 0x05
+#define KA410_CFG_12MB 0x06
+#define KA410_CFG_14MB 0x07
+
+
+/*
+ * interrupt request-, clear-, and mask register
+ */
+extern volatile unsigned char *ka410_intreq;
+extern volatile unsigned char *ka410_intclr;
+extern volatile unsigned char *ka410_intmsk;
+
+#define INTR_SR (1<<7) /* Serial line receiver or silo full */
+#define INTR_ST (1<<6) /* Serial line transmitter done */
+#define INTR_NP (1<<5) /* Network controller primary */
+#define INTR_NS (1<<4) /* Network controller secondary */
+#define INTR_VF (1<<3) /* Video end of frame */
+#define INTR_VS (1<<2) /* Video secondary */
+#define INTR_SC (1<<1) /* SCSI controller */
+#define INTR_DC (1<<0) /* Disk controller */
+
+/*
+ * interrupt vector numbers
+ */
+#define IVEC_BASE 0x20040020
+#define IVEC_SR 0x000002C0
+#define IVEC_ST 0x000002C4
+#define IVEC_NP 0x00000250
+#define IVEC_NS 0x00000254
+#define IVEC_VF 0x00000244
+#define IVEC_VS 0x00000248
+#define IVEC_SC 0x000003F8
+#define IVEC_DC 0x000003FC
+
+/*
+ * Clock-Chip data in NVRAM
+ */
+#define KA410_CPMBX 0x200B0038 /* Console Mailbox (1 byte) */
+#define KA410_CPFLG 0x200B003C /* Console Program Flags (1 byte) */
+#define KA410_LK201_ID 0x200B0040 /* Keyboard Variation (1 byte) */
+#define KA410_CONS_ID 0x200B0044 /* Console Device Type (1 byte) */
+#define KA410_SCR 0x200B0048 /* Console Scratch RAM */
+#define KA410_TEMP 0x200B0058 /* Used by System Firmware */
+#define KA410_BAT_CHK 0x200B0088 /* Battery Check Data */
+#define KA410_BOOTDEV 0x200B0098 /* Default Boot Device (4 bytes) */
+#define KA410_BOOTFLG 0x200B00A8 /* Default Boot Flags (4 bytes) */
+#define KA410_SCRLEN 0x200B00B8 /* Number of pages of SCR (1 byte) */
+#define KA410_SCSIPORT 0x200B00BC /* Tape Controller Port Data */
+#define KA410_RESERVED 0x200B00C0 /* Reserved (16 bytes) */
+
+
+struct ka410_cpu {
+ u_long ka410_hltcod;
+ u_long ka410_mser;
+ u_long ka410_cear;
+ u_long ka410_intmsk;
+};
+
+/*
+ * KA410 uses bits 2-9 of longwords to store single bytes in NVRAM,
+ * thus we declare the clock as an struct of bit-fields, so that the
+ * generic clock-routines work for KA410...
+ */
+struct ka410_clock {
+ u_long :2; u_long sec :8; u_long :22;
+ u_long :2; u_long secalrm :8; u_long :22;
+ u_long :2; u_long min :8; u_long :22;
+ u_long :2; u_long minalrm :8; u_long :22;
+ u_long :2; u_long hr :8; u_long :22;
+ u_long :2; u_long hralrm :8; u_long :22;
+ u_long :2; u_long dayofwk :8; u_long :22;
+ u_long :2; u_long day :8; u_long :22;
+ u_long :2; u_long mon :8; u_long :22;
+ u_long :2; u_long yr :8; u_long :22;
+ u_long :2; u_long csr0 :8; u_long :22;
+ u_long :2; u_long csr1 :8; u_long :22;
+ u_long :2; u_long csr2 :8; u_long :22;
+ u_long :2; u_long csr3 :8; u_long :22;
+ u_long :2; u_long cpmbx :8; u_long :22;
+};
+
+/* Prototypes */
+int ka410_setup __P((struct uvax_calls *p, int flags));
+static int ka410_clkread __P((time_t));
+static void ka410_clkwrite __P((void));
diff --git a/sys/arch/vax/include/ka420.h b/sys/arch/vax/include/ka420.h
new file mode 100644
index 00000000000..ed1fa240782
--- /dev/null
+++ b/sys/arch/vax/include/ka420.h
@@ -0,0 +1,140 @@
+/* $NetBSD: ka420.h,v 1.1 1996/07/20 17:58:15 ragge Exp $ */
+/*
+ * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Ludd by Bertram Barth.
+ *
+ * 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.
+ */
+
+/*
+ * Definitions for I/O addresses of
+ *
+ * VAXstation 3100 models 30, 40 (PVAX)
+ * MicroVAX 3100 models 10, 20 (Teammate II)
+ * MicroVAX 3100 models 10e, 20e (Teammate II)
+ * VAXstation 3100 models 38, 48 (PVAX rev#7)
+ */
+
+#define KA420_SIDEX 0x20040004 /* SID extension register */
+
+#define KA420_CH2_BASE 0x10000000 /* 2nd level cache data area */
+#define KA420_CH2_END 0x10007FFF
+#define KA420_CH2_SIZE 0x8000
+#define KA420_CT2_BASE 0x10010000 /* 2nd level cache tag area */
+#define KA420_CT2_END 0x10017FFF
+#define KA420_CT2_SIZE 0x8000
+#define KA420_CH2_CREG 0x20084000 /* 2nd level cache control register */
+
+#define KA420_CFGTST 0x20020000 /* Configuration and Test register */
+#define KA420_IORESET 0x20020000 /* I/O Reset register */
+
+#define KA420_ROM_BASE 0x20040000 /* System module ROM */
+#define KA420_ROM_END 0x2007FFFF
+#define KA420_ROM_SIZE 0x40000 /* ??? */
+
+#define KA420_IVN_BASE 0x20040020 /* Interrupt Vector Numbers */
+#define KA420_IVN_END 0x2004003F
+#define KA420_IVN_SIZE 0x20
+
+#define KA420_HLTCOD 0x20080000 /* Halt Code Register */
+#define KA420_MSER 0x20080004 /* Memory System Error register */
+#define KA420_MEAR 0x20080008 /* Memory Error Address register */
+#define KA420_INTMSK 0x2008000C /* Interrupt Mask register */
+#define KA420_VDCORG 0x2008000D /* Video Controller Origin Register */
+#define KA420_VDCSEL 0x2008000E /* Video Controller Select Register */
+#define KA420_INTREQ 0x2008000F /* Interrupt Request register */
+#define KA420_INTCLR 0x2008000F /* Interrupt Request clear register */
+
+/*
+ * Other fixed addresses which should be mapped
+ */
+#define KA420_NWA_BASE 0x20090000 /* Network Address ROM */
+#define KA420_NWA_END 0x2009007F
+#define KA420_NWA_SIZE 0x80
+#define KA420_SER_BASE 0x200A0000 /* Serial line controller */
+#define KA420_SER_END 0x200A000F
+#define KA420_SER_SIZE 0x10
+#define KA420_WAT_BASE 0x200B0000 /* TOY clock and NV-RAM */
+#define KA420_WAT_END 0x200B00FF
+#define KA420_WAT_SIZE 0x100
+#define KA420_DKC_BASE 0x200C0000 /* Disk Controller Ports */
+#define KA420_DKC_END 0x200C0007
+#define KA420_DKC_SIZE 0x08
+#define KA420_SCS_BASE 0x200C0080 /* Tape (SCSI) Controller Chip */
+#define KA420_SCS_END 0x200C009F
+#define KA420_SCS_SIZE 0x20
+#define KA420_D16_BASE 0x200D0000 /* 16KB (compatibility) Data Buffer */
+#define KA420_D16_END 0x200D3FFF
+#define KA420_D16_SIZE 0x4000
+#define KA420_LAN_BASE 0x200E0000 /* LANCE chip registers */
+#define KA420_LAN_END 0x200E0007
+#define KA420_LAN_SIZE 0x08
+#define KA420_CUR_BASE 0x200F0000 /* Monochrome video cursor chip */
+#define KA420_CUR_END 0x200F0007
+#define KA420_CUR_SIZE 0x08
+#define KA420_DMA_BASE 0x202D0000 /* 128KB Data Buffer */
+#define KA420_DMA_END 0x202EFFFF
+#define KA420_DMA_SIZE 0x20000
+
+#define KA420_SCD_DADR 0x200C00A0 /* Tape(SCSI) DMA address register */
+#define KA420_SCD_DCNT 0x200C00C0 /* Tape(SCSI) DMA byte count reg. */
+#define KA420_SCD_DDIR 0x200C00C4 /* Tape(SCSI) DMA transfer direction */
+
+#define KA420_STC_MODE 0x200C00E0 /* Storage Controller Mode register */
+
+#define KA420_CUR_CMD 0x200F0000 /* Cursor Command Register */
+#define KA420_CUR_XPOS 0x200F0004 /* Cursor X position */
+#define KA420_CUR_YPOS 0x200F0008 /* Cursor Y position */
+
+#define KA420_CUR_XMIN1 0x200F000C /* Region 1 left edge */
+#define KA420_CUR_XMAX1 0x200F0010 /* Region 1 right edge */
+#define KA420_CUR_YMIN1 0x200F0014 /* Region 1 top edge */
+#define KA420_CUR_YMAX1 0x200F0018 /* Region 1 bottom edge */
+
+#define KA420_CUR_XMIN2 0x200F002C /* Region 2 left edge */
+#define KA420_CUR_XMAX2 0x200F0030 /* Region 2 right edge */
+#define KA420_CUR_YMIN2 0x200F0034 /* Region 2 top edge */
+#define KA420_CUR_YMAX2 0x200F0038 /* Region 2 bottom edge */
+
+/*
+ * Clock-Chip data in NVRAM
+ */
+#define KA420_CPMBX 0x200B0038 /* Console Mailbox (1 byte) */
+#define KA420_CPFLG 0x200B003C /* Console Program Flags (1 byte) */
+#define KA420_LK201_ID 0x200B0040 /* Keyboard Variation (1 byte) */
+#define KA420_CONS_ID 0x200B0044 /* Console Device Type (1 byte) */
+#define KA420_SCR 0x200B0048 /* Console Scratch RAM */
+#define KA420_TEMP 0x200B0058 /* Used by System Firmware */
+#define KA420_BAT_CHK 0x200B0088 /* Battery Check Data */
+#define KA420_BOOTDEV 0x200B0098 /* Default Boot Device (4 bytes) */
+#define KA420_BOOTFLG 0x200B00A8 /* Default Boot Flags (4 bytes) */
+#define KA420_SCRLEN 0x200B00B8 /* Number of pages of SCR (1 byte) */
+#define KA420_SCSIPORT 0x200B00BC /* Tape Controller Port Data */
+#define KA420_RESERVED 0x200B00C0 /* Reserved (16 bytes) */
+
diff --git a/sys/arch/vax/include/ka43.h b/sys/arch/vax/include/ka43.h
new file mode 100644
index 00000000000..41981ebde78
--- /dev/null
+++ b/sys/arch/vax/include/ka43.h
@@ -0,0 +1,209 @@
+/* $NetBSD: ka43.h,v 1.1 1996/07/20 17:58:16 ragge Exp $ */
+/*
+ * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Ludd by Bertram Barth.
+ *
+ * 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.
+ */
+
+/*
+ * Definitions for I/O addresses of
+ *
+ * VAXstation 3100 model 76 (RigelMAX)
+ */
+
+#define KA43_SIDEX 0x20040004 /* SID extension register */
+
+#define KA43_CFGTST 0x20020000 /* Configuration and Test register */
+#define KA43_IORESET 0x20020000 /* I/O Reset register */
+
+#define KA43_ROMGETC 0x20040044
+#define KA43_ROMPUTC 0x20040058
+#define KA43_ROMPUTS 0x2004004C
+
+#define KA43_CH2_BASE 0x10000000 /* 2nd level cache data area */
+#define KA43_CH2_END 0x1FFFFFFF
+#define KA43_CH2_SIZE 0x10000000
+#define KA43_CT2_BASE 0x21000000 /* 2nd level cache tag area */
+#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
+#define KA43_ROM_SIZE 0x40000 /* ??? */
+
+#define KA43_IVN_BASE 0x20040020 /* Interrupt Vector Numbers */
+#define KA43_IVN_END 0x2004003F
+#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_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_PARCTL 0x20080014 /* Parity Control Register */
+#define KA43_DIAGTME 0x2008001E
+
+#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
+#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_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 */
+
+/*
+ * Other fixed addresses which should be mapped
+ */
+#define KA43_CPU_BASE 0x20080000 /* so called "CPU registers" */
+#define KA43_CPU_END 0x200800FF
+#define KA43_CPU_SIZE 0x100
+#define KA43_NWA_BASE 0x20090000 /* Network Address ROM */
+#define KA43_NWA_END 0x2009007F
+#define KA43_NWA_SIZE 0x80
+#define KA43_SER_BASE 0x200A0000 /* Serial line controller */
+#define KA43_SER_END 0x200A000F
+#define KA43_SER_SIZE 0x10
+#define KA43_WAT_BASE 0x200B0000 /* TOY clock and NV-RAM */
+#define KA43_WAT_END 0x200B00FF
+#define KA43_WAT_SIZE 0x100
+#define KA43_SC1_BASE 0x200C0080 /* 1st SCSI Controller Chip */
+#define KA43_SC1_END 0x200C009F
+#define KA43_SC1_SIZE 0x20
+#define KA43_SC2_BASE 0x200C0180 /* 2nd SCSI Controller Chip */
+#define KA43_SC2_END 0x200C019F
+#define KA43_SC2_SIZE 0x20
+#define KA43_SCS_BASE 0x200C0000 /* area occupied by SCSI 1+2 */
+#define KA43_SCS_END 0x200C01FF
+#define KA43_SCS_SIZE 0x200
+#define KA43_LAN_BASE 0x200E0000 /* LANCE chip registers */
+#define KA43_LAN_END 0x200E0007
+#define KA43_LAN_SIZE 0x08
+#define KA43_CUR_BASE 0x200F0000 /* Monochrome video cursor chip */
+#define KA43_CUR_END 0x200F003C
+#define KA43_CUR_SIZE 0x40
+#define KA43_DMA_BASE 0x202D0000 /* 128KB Data Buffer */
+#define KA43_DMA_END 0x202EFFFF
+#define KA43_DMA_SIZE 0x20000
+#define KA43_VME_BASE 0x30000000
+#define KA43_VME_END 0x3003FFFF
+#define KA43_VME_SIZE 0x40000
+
+#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 */
+#define KA43_SC2_DADR 0x200C01A0
+#define KA43_SC2_DCNT 0x200C01C0
+#define KA43_SC2_DDIR 0x200C01C4
+
+#define KA43_CUR_CMD 0x200F0000 /* Cursor Command Register */
+#define KA43_CUR_XPOS 0x200F0004 /* Cursor X position */
+#define KA43_CUR_YPOS 0x200F0008 /* Cursor Y position */
+
+#define KA43_CUR_XMIN1 0x200F000C /* Region 1 left edge */
+#define KA43_CUR_XMAX1 0x200F0010 /* Region 1 right edge */
+#define KA43_CUR_YMIN1 0x200F0014 /* Region 1 top edge */
+#define KA43_CUR_YMAX1 0x200F0018 /* Region 1 bottom edge */
+
+#define KA43_CUR_XMIN2 0x200F002C /* Region 2 left edge */
+#define KA43_CUR_XMAX2 0x200F0030 /* Region 2 right edge */
+#define KA43_CUR_YMIN2 0x200F0034 /* Region 2 top edge */
+#define KA43_CUR_YMAX2 0x200F0038 /* Region 2 bottom edge */
+
+/*
+ * Clock-Chip data in NVRAM
+ */
+#define KA43_CPMBX 0x200B0038 /* Console Mailbox (1 byte) */
+#define KA43_CPFLG 0x200B003C /* Console Program Flags (1 byte) */
+#define KA43_LK201_ID 0x200B0040 /* Keyboard Variation (1 byte) */
+#define KA43_CONS_ID 0x200B0044 /* Console Device Type (1 byte) */
+#define KA43_SCR 0x200B0048 /* Console Scratch RAM */
+#define KA43_TEMP 0x200B0058 /* Used by System Firmware */
+#define KA43_BAT_CHK 0x200B0088 /* Battery Check Data */
+#define KA43_PASSWD 0x200B0098 /* ??? */
+#define KA43_BOOTFLG 0x200B00A8 /* Default Boot Flags (4 bytes) */
+#define KA43_SCRLEN 0x200B00B8 /* Number of pages of SCR (1 byte) */
+#define KA43_SCSIPORT 0x200B00BC /* Tape Controller Port Data */
+#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;
+};
+
+struct ka43_clock {
+ u_long :2; u_long sec :8; u_long :22;
+ u_long :2; u_long secalrm :8; u_long :22;
+ u_long :2; u_long min :8; u_long :22;
+ u_long :2; u_long minalrm :8; u_long :22;
+ u_long :2; u_long hr :8; u_long :22;
+ u_long :2; u_long hralrm :8; u_long :22;
+ u_long :2; u_long dayofwk :8; u_long :22;
+ u_long :2; u_long day :8; u_long :22;
+ u_long :2; u_long mon :8; u_long :22;
+ u_long :2; u_long yr :8; u_long :22;
+ u_long :2; u_long csr0 :8; u_long :22;
+ u_long :2; u_long csr1 :8; u_long :22;
+ u_long :2; u_long csr2 :8; u_long :22;
+ u_long :2; u_long csr3 :8; u_long :22;
+ u_long :2; u_long cpmbx :8; u_long :22;
+};
+
+int ka43_setup __P((struct uvax_calls *p, int flags));
+static int ka43_clkread __P((time_t));
+static void ka43_clkwrite __P((void));
diff --git a/sys/arch/vax/include/uvaxII.h b/sys/arch/vax/include/ka630.h
index db6227ca193..09875115955 100644
--- a/sys/arch/vax/include/uvaxII.h
+++ b/sys/arch/vax/include/ka630.h
@@ -1,4 +1,4 @@
-/* $NetBSD: uvaxII.h,v 1.4 1996/05/19 16:43:28 ragge Exp $ */
+/* $NetBSD: ka630.h,v 1.1 1996/07/20 17:58:17 ragge Exp $ */
/*-
* Copyright (c) 1986, 1988 The Regents of the University of California.
* All rights reserved.
@@ -61,9 +61,6 @@ struct uvaxIIcpu {
/* Mem. error address regs. */
#define UVAXIICEAR_PG 0x00007fff
#define UVAXIIDEAR_PG 0x00007fff
-
-u_long uvaxII_gettodr __P((int *));
-void uvaxII_settodr __P((time_t));
#endif
/*
@@ -122,13 +119,7 @@ struct ka630clock {
};
#endif
-struct sbi_attach_args;
+static int ka630_clkread __P((time_t));
+static void ka630_clkwrite __P((void));
-/* Prototypes */
-void uvaxII_conf __P((struct device *, struct device *, void *));
-int uvaxII_clock __P((void));
-void uvaxII_memenable __P((struct sbi_attach_args *, struct device *));
-void uvaxII_memerr __P((void));
-int uvaxII_mchk __P((caddr_t));
-void uvaxII_steal_pages __P((void));
#endif
diff --git a/sys/arch/vax/include/ka750.h b/sys/arch/vax/include/ka750.h
index 9c6e108879b..c8cce51eb25 100644
--- a/sys/arch/vax/include/ka750.h
+++ b/sys/arch/vax/include/ka750.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ka750.h,v 1.6 1996/05/19 16:43:23 ragge Exp $ */
+/* $NetBSD: ka750.h,v 1.7 1996/07/20 17:58:17 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -44,7 +44,6 @@
/* 11/750 specific prototypes */
void ka750_conf __P((struct device *, struct device *, void *));
-int ka750_clock __P((void));
void ka750_memenable __P((struct sbi_attach_args *, struct device *));
void ka750_memerr __P((void));
int ka750_mchk __P((caddr_t));
diff --git a/sys/arch/vax/include/ka820.h b/sys/arch/vax/include/ka820.h
new file mode 100644
index 00000000000..10d285cd381
--- /dev/null
+++ b/sys/arch/vax/include/ka820.h
@@ -0,0 +1,148 @@
+/* $NetBSD: ka820.h,v 1.1 1996/07/20 17:33:09 ragge Exp $ */
+/*
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Chris Torek.
+ *
+ * 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 by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
+ *
+ * @(#)ka820.h 7.3 (Berkeley) 6/28/90
+ */
+
+/*
+ * Definitions specific to the ka820 cpu.
+ */
+
+/*
+ * Device addresses.
+ */
+#define KA820_PORTADDR 0x20088000 /* port controller */
+#define KA820_BRAMADDR 0x20090000 /* boot ram */
+#define KA820_EEPROMADDR 0x20098000 /* eeprom */
+#define KA820_RX50ADDR 0x200b0000 /* rcx50 */
+#define KA820_CLOCKADDR 0x200b8000 /* watch chip */
+
+/*
+ * Sizes. The port controller, RCX50, and watch chip are all one page.
+ */
+#define KA820_BRPAGES 16 /* 8K */
+#define KA820_EEPAGES 64 /* 32K */
+
+/* port controller CSR bit values */
+#define KA820PORT_RSTHALT 0x80000000 /* restart halt */
+#define KA820PORT_LCONS 0x40000000 /* logical console */
+#define KA820PORT_LCONSEN 0x20000000 /* logical console enable */
+#define KA820PORT_BIRESET 0x10000000 /* BI reset */
+#define KA820PORT_BISTF 0x08000000 /* ??? */
+#define KA820PORT_ENBAPT 0x04000000 /* ??? */
+#define KA820PORT_STPASS 0x02000000 /* self test pass */
+#define KA820PORT_RUN 0x01000000 /* run */
+#define KA820PORT_WWPE 0x00800000 /* ??? parity even? */
+#define KA820PORT_EVLCK 0x00400000 /* event lock */
+#define KA820PORT_WMEM 0x00200000 /* write mem */
+#define KA820PORT_EV4 0x00100000 /* event 4 */
+#define KA820PORT_EV3 0x00080000 /* event 3 */
+#define KA820PORT_EV2 0x00040000 /* event 2 */
+#define KA820PORT_EV1 0x00020000 /* event 1 */
+#define KA820PORT_EV0 0x00010000 /* event 0 */
+#define KA820PORT_WWPO 0x00008000 /* ??? parity odd? */
+#define KA820PORT_PERH 0x00004000 /* parity error H */
+#define KA820PORT_ENBPIPE 0x00002000 /* enable? pipe */
+#define KA820PORT_TIMEOUT 0x00001000 /* timeout */
+#define KA820PORT_RSVD 0x00000800 /* reserved */
+#define KA820PORT_CONSEN 0x00000400 /* console interrupt enable */
+#define KA820PORT_CONSCLR 0x00000200 /* clear console interrupt */
+#define KA820PORT_CONSINTR 0x00000100 /* console interrupt req */
+#define KA820PORT_RXIE 0x00000080 /* RX50 interrupt enable */
+#define KA820PORT_RXCLR 0x00000040 /* clear RX50 interrupt */
+#define KA820PORT_RXIRQ 0x00000020 /* RX50 interrupt request */
+#define KA820PORT_IPCLR 0x00000010 /* clear IP interrupt */
+#define KA820PORT_IPINTR 0x00000008 /* IP interrupt request */
+#define KA820PORT_CRDEN 0x00000004 /* enable CRD interrupts */
+#define KA820PORT_CRDCLR 0x00000002 /* clear CRD interrupt */
+#define KA820PORT_CRDINTR 0x00000001 /* CRD interrupt request */
+
+/* what the heck */
+#define KA820PORT_BITS \
+"\20\40RSTHALT\37LCONS\36LCONSEN\35BIRESET\34BISTF\33ENBAPT\32STPASS\31RUN\
+\30WWPE\27EVLCK\26WMEM\25EV4\24EV3\23EV2\22EV1\21EV\20WWPO\17PERH\16ENBPIPE\
+\15TIMEOUT\13CONSEN\12CONSCLR\11CONSINTR\10RXIE\7RXCLR\6RXIRQ\5IPCLR\4IPINTR\
+\3CRDEN\2CLRCLR\1CRDINTR"
+
+/* clock CSR bit values, per csr */
+#define KA820CLK_0_BUSY 0x01 /* busy (time changing) */
+#define KA820CLK_1_GO 0x0c /* run */
+#define KA820CLK_1_SET 0x0d /* set the time */
+#define KA820CLK_3_VALID 0x01 /* clock is valid */
+
+#ifndef LOCORE
+struct ka820port {
+ u_long csr;
+ /* that seems to be all.... */
+};
+
+struct ka820clock {
+ u_char sec;
+ u_char pad0;
+ u_char secalrm;
+ u_char pad1;
+ u_char min;
+ u_char pad2;
+ u_char minalrm;
+ u_char pad3;
+ u_char hr;
+ u_char pad4;
+ u_char hralrm;
+ u_char pad5;
+ u_char dayofwk;
+ u_char pad6;
+ u_char day;
+ u_char pad7;
+ u_char mon;
+ u_char pad8;
+ u_char yr;
+ u_char pad9;
+ u_short csr0;
+ u_short csr1;
+ u_short csr2;
+ u_short csr3;
+};
+
+/*
+ * Prototypes.
+ */
+void ka820_conf __P((struct device *, struct device *, void *));
+void ka820_memerr __P((void));
+int ka820_mchk __P((caddr_t));
+void ka820_steal_pages __P((void));
+int ka820_clkread __P((time_t));
+void ka820_clkwrite __P((void));
+#endif
diff --git a/sys/arch/vax/include/macros.h b/sys/arch/vax/include/macros.h
index b08881f0791..1d863e915a4 100644
--- a/sys/arch/vax/include/macros.h
+++ b/sys/arch/vax/include/macros.h
@@ -1,4 +1,4 @@
-/* $NetBSD: macros.h,v 1.8 1996/03/17 22:44:50 ragge Exp $ */
+/* $NetBSD: macros.h,v 1.10 1997/01/11 11:07:52 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -117,6 +117,7 @@ static __inline__ int bcmp(const void *b1, const void *b2, size_t len){
return ret;
}
+#if 0 /* unused, but no point in deleting it since it _is_ an instruction */
static __inline__ int locc(int mask, char *cp,u_int size){
register ret;
@@ -126,8 +127,10 @@ static __inline__ int locc(int mask, char *cp,u_int size){
: "r0","r1" );
return ret;
}
+#endif
-static __inline__ int scanc(u_int size, u_char *cp,u_char *table, int mask){
+static __inline__ int
+scanc(u_int size, const u_char *cp, const u_char *table, int mask){
register ret;
asm __volatile("scanc %1,(%2),(%3),%4;movl r0,%0"
diff --git a/sys/arch/vax/include/mtpr.h b/sys/arch/vax/include/mtpr.h
index 0ee73aa8575..f106ab687f9 100644
--- a/sys/arch/vax/include/mtpr.h
+++ b/sys/arch/vax/include/mtpr.h
@@ -1,4 +1,4 @@
-/* $NetBSD: mtpr.h,v 1.8 1996/03/07 23:23:59 ragge Exp $ */
+/* $NetBSD: mtpr.h,v 1.9 1996/07/20 17:58:18 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -119,6 +119,29 @@
#define PR_ESPA 78 /* EBOX Scratchpad Address (KA86) */
#define PR_ESPD 79 /* EBOX Scratchpad Data (KA86) */
+#define PR_RXCS1 80 /* Serial-Line Unit 1 Receive CSR (KA820) */
+#define PR_RXDB1 81 /* Serial-Line Unit 1 Receive Data Buffer (KA820) */
+#define PR_TXCS1 82 /* Serial-Line Unit 1 Transmit CSR (KA820) */
+#define PR_TXDB1 83 /* Serial-Line Unit 1 Transmit Data Buffer (KA820) */
+#define PR_RXCS2 84 /* Serial-Line Unit 2 Receive CSR (KA820) */
+#define PR_RXDB2 85 /* Serial-Line Unit 2 Receive Data Buffer (KA820) */
+#define PR_TXCS2 86 /* Serial-Line Unit 2 Transmit CSR (KA820) */
+#define PR_TXDB2 87 /* Serial-Line Unit 2 Transmit Data Buffer (KA820) */
+#define PR_RXCS3 88 /* Serial-Line Unit 3 Receive CSR (KA820) */
+#define PR_RXDB3 89 /* Serial-Line Unit 3 Receive Data Buffer (KA820) */
+#define PR_TXCS3 90 /* Serial-Line Unit 3 Transmit CSR (KA820) */
+#define PR_TXDB3 91 /* Serial-Line Unit 3 Transmit Data Buffer (KA820) */
+#define PR_RXCD 92 /* Receive Console Data from another cpu (KA820) */
+#define PR_CACHEX 93 /* Cache invalidate Register (KA820) */
+#define PR_BINID 94 /* VAXBI node ID Register (KA820) */
+#define PR_BISTOP 95 /* VAXBI Stop Register (KA820) */
+
+#define PR_VINTSR 123 /* vector i/f error status (KA43/KA46) */
+#define PR_PCTAG 124 /* primary cache tag store (KA43/KA46) */
+#define PR_PCIDX 125 /* primary cache index (KA43/KA46) */
+#define PR_PCERR 126 /* primary cache error address (KA43/KA46) */
+#define PR_PCSTS 127 /* primary cache status (KA43/KA46) */
+
/* Definitions for AST */
#define AST_NO 4
#define AST_OK 3
diff --git a/sys/arch/vax/include/nexus.h b/sys/arch/vax/include/nexus.h
index fe9a2fb0288..6f15874f874 100644
--- a/sys/arch/vax/include/nexus.h
+++ b/sys/arch/vax/include/nexus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: nexus.h,v 1.10 1996/03/02 14:27:53 ragge Exp $ */
+/* $NetBSD: nexus.h,v 1.12 1996/08/20 14:19:43 ragge Exp $ */
/*-
* Copyright (c) 1982, 1986 The Regents of the University of California.
@@ -38,6 +38,17 @@
#ifndef _VAX_NEXUS_H_
#define _VAX_NEXUS_H_
/*
+ * Different definitions for nicer autoconf probing.
+ */
+#define VAX_SBIBUS 1 /* SBI parent; 780/790 */
+#define VAX_CPUBUS 2 /* Has backplane CPU */
+#define VAX_MEMBUS 4 /* Has backplane memory */
+#define VAX_UNIBUS 8 /* Directly attached (630/650) */
+#define VAX_VSBUS 16 /* VAXstation board */
+#define VAX_BIBUS 32 /* BI bus expansions: 8200/8800 */
+#define VAX_CMIBUS 64 /* CMI backplane (750) */
+
+/*
* Information about nexus's.
*
* Each machine has an address of backplane slots (nexi).
@@ -63,10 +74,6 @@
#define NNEX730 NNEXSBI
#define NEX730 ((struct nexus *)0xf20000)
#endif
-#if VAX630
-#define NNEX630 1
-#define NEX630 ((struct nexus *)0x20088000)
-#endif
#define NEXSIZE 0x2000
#if VAX8600
@@ -102,20 +109,11 @@ struct mem_softc {
int sc_memnr;
};
-struct iobus {
- int io_type;
- int io_addr;
- int io_size;
- int io_details;
-};
-
-struct nexusconnect {
- int psb_nnexus;
- struct nexus *psb_nexbase;
- int psb_ubatype;
- int psb_nubabdp;
- caddr_t *psb_umaddr;
- int *psb_nextype;
+struct bp_conf {
+ char *type;
+ int num;
+ int partyp;
+ int bp_addr;
};
extern caddr_t *nex_vec;
diff --git a/sys/arch/vax/include/param.h b/sys/arch/vax/include/param.h
index ec5d9c6b95b..a50abd5fe93 100644
--- a/sys/arch/vax/include/param.h
+++ b/sys/arch/vax/include/param.h
@@ -1,4 +1,5 @@
-/* $NetBSD: param.h,v 1.19 1996/03/04 05:04:43 cgd Exp $ */
+/* $OpenBSD: param.h,v 1.6 1997/01/15 23:24:42 maja Exp $ */
+/* $NetBSD: param.h,v 1.22 1997/01/11 11:06:17 ragge Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -74,7 +75,8 @@
#define DEV_BSIZE (1 << DEV_BSHIFT)
#define BLKDEV_IOSIZE 2048
-#define MAXPHYS (63 * 1024) /* max raw I/O transfer size */
+#define MAXPHYS (63 * 1024) /* max raw I/O transfer size */
+#define MAXBSIZE 0x4000 /* max FS block size - XXX */
#define CLSIZELOG2 1
#define CLSIZE 2
@@ -160,7 +162,6 @@
#define splsoftclock() splx(8) /* IPL08 */
#define splsoftnet() splx(0xc) /* IPL0C */
#define splddb() splx(0xf) /* IPL0F */
-#define spl4() splx(0x14) /* IPL14 */
#define splbio() splx(0x15) /* IPL15 */
#define splnet() splx(0x15) /* IPL15 */
#define spltty() splx(0x15) /* IPL15 */
@@ -169,10 +170,18 @@
#define splhigh() splx(0x1f) /* IPL1F */
#define splstatclock() splclock()
+/* These are better to use when playing with VAX buses */
+#define spl4() splx(0x14)
+#define spl5() splx(0x15)
+#define spl6() splx(0x16)
+#define spl7() splx(0x17)
+
#define ovbcopy(x,y,z) bcopy(x,y,z)
+#if !defined(VAX410) && !defined(VAX43)
#define vmapbuf(p,q)
#define vunmapbuf(p,q)
+#endif
/* Prototype needed for delay() */
#ifndef _LOCORE
diff --git a/sys/arch/vax/include/pmap.h b/sys/arch/vax/include/pmap.h
index 870776d4a5e..a4f22ce6e01 100644
--- a/sys/arch/vax/include/pmap.h
+++ b/sys/arch/vax/include/pmap.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.16 1996/04/08 18:35:51 ragge Exp $ */
+/* $NetBSD: pmap.h,v 1.17 1996/07/20 17:58:22 ragge Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -85,6 +85,7 @@ typedef struct pv_entry {
/* ROUND_PAGE used before vm system is initialized */
#define ROUND_PAGE(x) (((uint)(x) + PAGE_SIZE-1)& ~(PAGE_SIZE - 1))
+#define TRUNC_PAGE(x) ((uint)(x) & ~(PAGE_SIZE - 1))
/* Mapping macros used when allocating SPT */
#define MAPVIRT(ptr, count) \
diff --git a/sys/arch/vax/include/sid.h b/sys/arch/vax/include/sid.h
index 2888b904525..4270623b85e 100644
--- a/sys/arch/vax/include/sid.h
+++ b/sys/arch/vax/include/sid.h
@@ -1,4 +1,4 @@
-/* $NetBSD: sid.h,v 1.6 1995/11/12 14:37:18 ragge Exp $ */
+/* $NetBSD: sid.h,v 1.8 1996/08/20 14:19:41 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
@@ -30,33 +30,173 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
- /* All bugs are subject to removal without further notice */
-
+/*
+ * Board-Type (?_BTYP_?) and Sub-Type (?_STYP_?) are synonima.
+ * other synonima are:
+ */
+#define cpudata vax_cpudata
+#define cputype vax_cputype
+#define cpusubtype vax_boardtype
+/*
+ * Chip CPU types / chip CPU Subtypes
+ *
+ * The type of a VAX is given by the high-order byte of the System
+ * identification register (SID) and describes families or series of VAXen.
+ * Board-Types/Sub-Types within series are described by the SIED register.
+ */
-#define VAX_780 1
-#define VAX_750 2
-#define VAX_730 3
-#define VAX_8600 4
-#define VAX_8200 5
-#define VAX_8800 6
-#define VAX_610 7
-#define VAX_78032 8
-#define VAX_650 10
-#define VAX_MAX 10
+/*
+ * 700 series (1977)
+ */
+#define VAX_TYP_780 1 /* VAX-11/780, 785, 782 */
+#define VAX_TYP_750 2 /* VAX-11/750 */
+#define VAX_TYP_730 3 /* VAX-11/730, 725 */
+#define VAX_TYP_790 4 /* VAX 8600, 8650 */
+
+#define VAX_BTYP_780 0x01000000 /* generic 11/780 */
+#define VAX_BTYP_750 0x02000000 /* generic 11/750 */
+#define VAX_BTYP_730 0x03000000 /* generic 11/730 */
+#define VAX_BTYP_790 0x04000000 /* generic 11/790 */
-#define MACHID(x) ((x>>24)&255)
+/*
+ * 8000 series (1986)
+ */
+#define VAX_TYP_8SS 5 /* VAX 8200, 8300, 8250, 8350, VS 8000 */
+#define VAX_TYP_8NN 6 /* VAX 8530, 8550, 8700, 8800 */
+
+#define VAX_BTYP_8000 0x05000000 /* generic VAX 8000 */
+
+#define VAX_BTYP_8800 0x06000000 /* generic Nautilus */
+#define VAX_BTYP_8700 0x06000001
+#define VAX_BTYP_8550 0x06000006
+#define VAX_BTYP_8500 0x06000007
-#define V750UCODE(x) ((x>>8)&255)
+/*
+ * MicroVAX I (1984)
+ */
+#define VAX_TYP_UV1 7 /* MicroVAX I, VAXstation I */
+ /* VAX_TYP_610 7 */
+
+#define VAX_BTYP_610 0x70000000 /* generic MicroVAX-I */
+
+/*
+ * MicroVAX II series (1985)
+ */
+#define VAX_TYP_UV2 8
+ /* VAX_TYP_78032 8 */
+
+#define VAX_BTYP_630 0x08000001 /* MicroVAX II, VAXstation II */
+#define VAX_BTYP_410 0x08000004 /* MicroVAX 2000, VAXstation 2000 */
+
+/*
+ * CVAX chip series (1987)
+ */
+#define VAX_TYP_CVAX 10
+ /* VAX_TYP_650 10 */
+
+#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 */
+#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 */
+
+/*
+ * Rigel chip series (1990)
+ */
+#define VAX_TYP_RIGEL 11
+ /* VAX_TYP_9RR 11 */
+
+#define VAX_BTYP_670 0x0B000001 /* VAX 4000 model 300 */
+#define VAX_BTYP_9RR 0x0B000002 /* VAX 6000 model 410-460 */
+#define VAX_BTYP_43 0x0B000004 /* VAXstation 3100 model 76 */
+
+/*
+ * Aquarius series (1990)
+ */
+#define VAX_TYP_9000 14
+
+#define VAX_BTYP_9AR 0x0E00000? /* VAX 9000 models 210, 410-440 */
+#define VAX_BTYP_9AQ 0x0E00000? /* VAX 9000 models 400-800 */
+
+/*
+ * Polarstar series (1988)
+ */
+#define VAX_TYP_8PS 17
+
+#define VAX_BTYP_8PS 0x11000000 /* VAX 8810 to 8840 */
+
+/*
+ * Mariah chip series (1991)
+ */
+#define VAX_TYP_MARIAH 18
+#define VAX_TYP_V12 18
+
+#define VAX_BTYP_690 0x12000001 /* VAX 4000 model 400 */
+#define VAX_BTYP_1202 0x12000002 /* VAX 6000 model 510-560 */
+#define VAX_BTYP_46 0x12000004 /* VAXstation 4000/60, 3100/80 */
+
+/*
+ * NVAX chip series (1991)
+ */
+#define VAX_TYP_NVAX 19
+#define VAX_TYP_V13 19
+
+#define VAX_BTYP_69D 0x13000001 /* VAX 4000 model 500 */
+#define VAX_BTYP_1301 0x13000001 /* VAX 4000 model 100 */
+#define VAX_BTYP_1302 0x13000002
+#define VAX_BTYP_1303 0x13000003
+#define VAX_BTYP_49 0x13000004 /* MicroVAX 3100 model 90 */
+
+/*
+ * SOC chip series (1991)
+ */
+#define VAX_TYP_SOC 20
+#define VAX_TYP_V14 20
+
+#define VAX_BTYP_660 0x14000001 /* VAX 4000 model 200 */
+#define VAX_BTYP_440 0x14000004 /* VS 4000/30, 3100/30, 3100/40 */
+#define VAX_BTYP_550 0x14000007 /* VAXft model 410, 610 */
+
+/*
+ * NVAX+ chip series (1991)
+ */
+#define VAX_TYP_NVPLUS 23
+#define VAX_TYP_V17 23
+
+#define VAX_BTYP_1701 0x17000001
+
+/*
+ * Highest Number supported by NetBSD/VAX
+ */
+#define VAX_TYP_MAX VAX_TYP_RIGEL
+
+/*
+ * compatibility with old names:
+ */
+
+#define VAX_780 VAX_TYP_780
+#define VAX_750 VAX_TYP_750
+#define VAX_730 VAX_TYP_730
+#define VAX_8600 VAX_TYP_790
+#define VAX_8200 VAX_TYP_8SS
+#define VAX_8800 VAX_TYP_8NN
+#define VAX_610 VAX_TYP_UV1
+#define VAX_78032 VAX_TYP_UV2
+#define VAX_650 VAX_TYP_CVAX
+
/*
- * The MicroVAXII CPU chip (78032) is used on more than one type of system
- * that are differentiated by the low order 8 bits of cpu_type. (Filled in
- * from the System Identification Extension Register.) To test for the cpu
- * chip, compare cpunumber == VAX_78032, but to test for a Qbus MicroVAXII
- * compare cpu_type == VAX_630.
+ * Some common-used external variables.
*/
-#define VAX_630 0x8000001
-#define VAX_410 0x8000002
+extern int vax_cputype; /* general, highest byte of the SID-register */
+extern int vax_cpudata; /* general, the contents of the SID-register */
+extern int vax_siedata; /* contents of the SIE register */
+extern int vax_bustype; /* HW-dep., setup at consinit() in ka???.c */
+extern int vax_boardtype; /* HW-dep., msb of SID | SIE (SID-extension) */
+extern int vax_confdata; /* HW-dep., hardware dependent config-data */
-extern int cpu_type, cpunumber;
diff --git a/sys/arch/vax/include/trap.h b/sys/arch/vax/include/trap.h
index ff7f89cf3b1..619b2d9ac07 100644
--- a/sys/arch/vax/include/trap.h
+++ b/sys/arch/vax/include/trap.h
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.h,v 1.13 1996/04/08 18:35:52 ragge Exp $ */
+/* $NetBSD: trap.h,v 1.14 1997/01/11 11:46:43 ragge Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -110,6 +110,8 @@ struct ivec_dsp {
char pad; /* sizeof(struct ivec_dsp) == 16 */
};
+extern struct ivec_dsp idsptch;
+
#endif /* _LOCORE */
#endif _VAX_TRAP_H_
diff --git a/sys/arch/vax/include/types.h b/sys/arch/vax/include/types.h
index 09118fd8a40..e44feb1b395 100644
--- a/sys/arch/vax/include/types.h
+++ b/sys/arch/vax/include/types.h
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.9 1996/04/08 18:35:53 ragge Exp $ */
+/* $NetBSD: types.h,v 1.10 1996/12/05 00:14:00 cgd Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -70,4 +70,6 @@ typedef unsigned long long u_int64_t;
typedef int32_t register_t;
+#define __BROKEN_INDIRECT_CONFIG
+
#endif /* _MACHTYPES_H_ */
diff --git a/sys/arch/vax/include/uvax.h b/sys/arch/vax/include/uvax.h
new file mode 100644
index 00000000000..df7bc81f6a6
--- /dev/null
+++ b/sys/arch/vax/include/uvax.h
@@ -0,0 +1,115 @@
+/* $NetBSD: uvax.h,v 1.1 1996/07/20 17:58:24 ragge Exp $ */
+/*
+ * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Ludd by Bertram Barth.
+ *
+ * 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.
+ */
+
+/*
+ * generic(?) MicroVAX and VAXstation support
+ *
+ * There are similarities to struct cpu_calls[] in autoconf.c
+ */
+
+/*
+ * Prototypes for autoconf.c
+ */
+struct device;
+void uvax_conf __P((struct device*, struct device*, void*));
+int uvax_clock __P((void));
+void uvax_memerr __P((void));
+int uvax_mchk __P((caddr_t));
+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;
+ int vs_flags;
+};
+
+extern struct uvax_calls guc; /* Generic uVAX Calls */
+extern struct uvax_calls *ucp;
+
+struct uc_map {
+ u_long um_base;
+ u_long um_end;
+ u_long um_size;
+ u_long um_virt;
+};
+extern struct uc_map *uc_physmap;
+
+/*
+ * Generic definitions common on all MicroVAXen clock chip.
+ */
+#define uVAX_CLKVRT 0200
+#define uVAX_CLKUIP 0200
+#define uVAX_CLKRATE 040
+#define uVAX_CLKENABLE 06
+#define uVAX_CLKSET 0206
+
+/* cpmbx bits */
+#define uVAX_CLKHLTACT 03
+
+/* halt action values */
+#define uVAX_CLKRESTRT 01
+#define uVAX_CLKREBOOT 02
+#define uVAX_CLKHALT 03
+
+/* in progress flags */
+#define uVAX_CLKBOOT 04
+#define uVAX_CLKRSTRT 010
+#define uVAX_CLKLANG 0360
+
+/* Prototypes */
+int uvax_clkread __P((time_t));
+void uvax_clkwrite __P((void));
diff --git a/sys/arch/vax/include/vmparam.h b/sys/arch/vax/include/vmparam.h
index 36d52b2b10a..459c120e218 100644
--- a/sys/arch/vax/include/vmparam.h
+++ b/sys/arch/vax/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.11 1996/02/02 19:08:43 mycroft Exp $ */
+/* $NetBSD: vmparam.h,v 1.12 1996/07/20 17:58:26 ragge Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -99,6 +99,11 @@
#endif
/*
+ * Size of User Raw I/O map
+ */
+#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?
diff --git a/sys/arch/vax/include/vsbus.h b/sys/arch/vax/include/vsbus.h
new file mode 100644
index 00000000000..81257f57d11
--- /dev/null
+++ b/sys/arch/vax/include/vsbus.h
@@ -0,0 +1,86 @@
+/* $NetBSD: vsbus.h,v 1.1 1996/07/20 17:58:28 ragge Exp $ */
+/*
+ * Copyright (c) 1996 Ludd, University of Lule}, Sweden.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Ludd by Bertram Barth.
+ *
+ * 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.
+ */
+
+/*
+ * Generic definitions for the (virtual) vsbus. contains common info
+ * used by all VAXstations.
+ */
+struct confargs {
+ char ca_name[16]; /* device name */
+ int ca_intslot; /* device interrupt-slot */
+ int ca_intpri; /* device interrupt "priority" */
+ int ca_intvec; /* interrup-vector offset */
+ int ca_intbit; /* bit in interrupt-register */
+ int ca_ioaddr; /* device hardware I/O address */
+
+ int ca_aux1; /* additional info (DMA, etc.) */
+ int ca_aux2;
+ int ca_aux3;
+ int ca_aux4;
+ int ca_aux5;
+ int ca_aux6;
+ int ca_aux7;
+ int ca_aux8;
+
+#define ca_recvslot ca_intslot /* DC/DZ: Receiver configuration */
+#define ca_recvpri ca_intpri
+#define ca_recvvec ca_intvec
+#define ca_recvbit ca_intbit
+#define ca_xmitslot ca_aux1 /* DC/DZ: transmitter configuration */
+#define ca_xmitpri ca_aux2 /* DC/DZ: */
+#define ca_xmitvec ca_aux3
+#define ca_xmitbit ca_aux4
+#define ca_dcflags ca_aux5
+
+#define ca_dareg ca_aux1 /* SCSI: DMA address register */
+#define ca_dcreg ca_aux2 /* SCSI: DMA byte count register */
+#define ca_ddreg ca_aux3 /* SCSI: DMA transfer direction */
+#define ca_dbase ca_aux4 /* SCSI: DMA buffer address */
+#define ca_dsize ca_aux5 /* SCSI: DMA buffer size */
+#define ca_dflag ca_aux6 /* SCSI: DMA flags (eg. shared) */
+#define ca_idval ca_aux7 /* SCSI: host-ID to use/set */
+#define ca_idreg ca_aux8 /* SCSI: host-ID port register */
+
+#define ca_enaddr ca_aux1 /* LANCE: Ethernet address in ROM */
+#define ca_leflags ca_aux2
+};
+
+int vsbus_intr_register __P((struct confargs *, int(*)(void*), void*));
+int vsbus_intr_enable __P((struct confargs *));
+int vsbus_intr_disable __P((struct confargs *));
+int vsbus_intr_unregister __P((struct confargs *));
+
+int vsbus_lockDMA __P((struct confargs *));
+int vsbus_unlockDMA __P((struct confargs *));
+