summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-24 19:58:34 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-01-24 19:58:34 +0000
commit0ef244d8476654749f2eaf9441dc06b2fd4d4f7b (patch)
tree270851bce850e6dddd96484e78fa648cb8bec296 /sys/arch/alpha/include
parenta77b8c21d70779c5365903c1f86d3c3126549212 (diff)
Sync with NetBSD 961207
Diffstat (limited to 'sys/arch/alpha/include')
-rw-r--r--sys/arch/alpha/include/alpha_cpu.h6
-rw-r--r--sys/arch/alpha/include/ansi.h6
-rw-r--r--sys/arch/alpha/include/asm.h6
-rw-r--r--sys/arch/alpha/include/autoconf.h7
-rw-r--r--sys/arch/alpha/include/bus.h106
-rw-r--r--sys/arch/alpha/include/cpu.h56
-rw-r--r--sys/arch/alpha/include/cpuconf.h73
-rw-r--r--sys/arch/alpha/include/intr.h45
-rw-r--r--sys/arch/alpha/include/intrcnt.h35
-rw-r--r--sys/arch/alpha/include/param.h5
-rw-r--r--sys/arch/alpha/include/pcb.h6
-rw-r--r--sys/arch/alpha/include/pmap.old.h8
-rw-r--r--sys/arch/alpha/include/proc.h3
-rw-r--r--sys/arch/alpha/include/profile.h6
-rw-r--r--sys/arch/alpha/include/prom.h36
-rw-r--r--sys/arch/alpha/include/pte.h6
-rw-r--r--sys/arch/alpha/include/rpb.h52
-rw-r--r--sys/arch/alpha/include/types.h6
18 files changed, 366 insertions, 102 deletions
diff --git a/sys/arch/alpha/include/alpha_cpu.h b/sys/arch/alpha/include/alpha_cpu.h
index 0c695e1612f..30612925b24 100644
--- a/sys/arch/alpha/include/alpha_cpu.h
+++ b/sys/arch/alpha/include/alpha_cpu.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: alpha_cpu.h,v 1.1 1996/10/30 22:38:49 niklas Exp $ */
-/* $NetBSD: alpha_cpu.h,v 1.6 1996/08/20 23:02:17 cgd Exp $ */
+/* $OpenBSD: alpha_cpu.h,v 1.2 1997/01/24 19:57:05 niklas Exp $ */
+/* $NetBSD: alpha_cpu.h,v 1.7 1996/11/23 06:25:31 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@@ -183,7 +183,7 @@ struct alpha_logout_area {
#define ALPHA_K1SEG_BASE 0xfffffe0000000000 /* virtual */
#define ALPHA_K1SEG_END 0xffffffffffffffff
-#define ALPHA_K0SEG_TO_PHYS(x) ((x) & 0x00000003ffffffff)
+#define ALPHA_K0SEG_TO_PHYS(x) ((x) & ~ALPHA_K0SEG_BASE)
#define ALPHA_PHYS_TO_K0SEG(x) ((x) | ALPHA_K0SEG_BASE)
#define ALPHA_PTE_VALID 0x0001
diff --git a/sys/arch/alpha/include/ansi.h b/sys/arch/alpha/include/ansi.h
index 7e529f40e07..53be898c720 100644
--- a/sys/arch/alpha/include/ansi.h
+++ b/sys/arch/alpha/include/ansi.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: ansi.h,v 1.5 1996/10/30 22:38:50 niklas Exp $ */
-/* $NetBSD: ansi.h,v 1.5 1996/10/09 21:13:04 cgd Exp $ */
+/* $OpenBSD: ansi.h,v 1.6 1997/01/24 19:57:06 niklas Exp $ */
+/* $NetBSD: ansi.h,v 1.6 1996/11/15 22:38:45 jtc Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -59,6 +59,8 @@ typedef struct {
int pad;
} __va_list;
#define _BSD_VA_LIST_ __va_list /* va_list */
+#define _BSD_CLOCKID_T_ int
+#define _BSD_TIMER_T_ int
/*
* Runes (wchar_t) is declared to be an ``int'' instead of the more natural
diff --git a/sys/arch/alpha/include/asm.h b/sys/arch/alpha/include/asm.h
index 0dbea2e046f..7783b3b963e 100644
--- a/sys/arch/alpha/include/asm.h
+++ b/sys/arch/alpha/include/asm.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: asm.h,v 1.5 1996/10/30 22:38:52 niklas Exp $ */
-/* $NetBSD: asm.h,v 1.10 1996/10/17 18:33:53 cgd Exp $ */
+/* $OpenBSD: asm.h,v 1.6 1997/01/24 19:57:07 niklas Exp $ */
+/* $NetBSD: asm.h,v 1.11 1996/11/30 02:48:57 jtc Exp $ */
/*
* Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
@@ -215,7 +215,7 @@
* MCOUNT
*/
-#ifndef PROF
+#ifndef GPROF
#define MCOUNT /* nothing */
#else
#define MCOUNT \
diff --git a/sys/arch/alpha/include/autoconf.h b/sys/arch/alpha/include/autoconf.h
index 517d0f2fc5f..47566f2798f 100644
--- a/sys/arch/alpha/include/autoconf.h
+++ b/sys/arch/alpha/include/autoconf.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: autoconf.h,v 1.6 1996/10/30 22:38:54 niklas Exp $ */
-/* $NetBSD: autoconf.h,v 1.5 1996/07/14 04:12:59 cgd Exp $ */
+/* $OpenBSD: autoconf.h,v 1.7 1997/01/24 19:57:08 niklas Exp $ */
+/* $NetBSD: autoconf.h,v 1.6 1996/11/13 21:13:17 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -81,9 +81,6 @@ struct bootdev_data {
char *ctrl_dev_type;
};
-void set_clockintr __P((void));
-void set_iointr __P((void (*)(void *, unsigned long)));
-int badaddr __P((void *, size_t));
void configure __P((void));
void device_register __P((struct device *, void *));
void dumpconf __P((void));
diff --git a/sys/arch/alpha/include/bus.h b/sys/arch/alpha/include/bus.h
index 3ff76eb6ee1..854d055589b 100644
--- a/sys/arch/alpha/include/bus.h
+++ b/sys/arch/alpha/include/bus.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: bus.h,v 1.4 1996/11/12 22:46:26 niklas Exp $ */
-/* $NetBSD: bus.h,v 1.6 1996/10/22 21:23:49 cgd Exp $ */
+/* $OpenBSD: bus.h,v 1.5 1997/01/24 19:57:09 niklas Exp $ */
+/* $NetBSD: bus.h,v 1.10 1996/12/02 22:19:32 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@@ -62,6 +62,10 @@ struct alpha_bus_space {
void (*abs_free) __P((void *, bus_space_handle_t,
bus_size_t));
+ /* barrier */
+ void (*abs_barrier) __P((void *, bus_space_handle_t,
+ bus_size_t, bus_size_t, int));
+
/* read (single) */
u_int8_t (*abs_r_1) __P((void *, bus_space_handle_t,
bus_size_t));
@@ -72,7 +76,7 @@ struct alpha_bus_space {
u_int64_t (*abs_r_8) __P((void *, bus_space_handle_t,
bus_size_t));
- /* read multi */
+ /* read multiple */
void (*abs_rm_1) __P((void *, bus_space_handle_t,
bus_size_t, u_int8_t *, bus_size_t));
void (*abs_rm_2) __P((void *, bus_space_handle_t,
@@ -102,7 +106,7 @@ struct alpha_bus_space {
void (*abs_w_8) __P((void *, bus_space_handle_t,
bus_size_t, u_int64_t));
- /* write multi */
+ /* write multiple */
void (*abs_wm_1) __P((void *, bus_space_handle_t,
bus_size_t, const u_int8_t *, bus_size_t));
void (*abs_wm_2) __P((void *, bus_space_handle_t,
@@ -122,18 +126,35 @@ struct alpha_bus_space {
void (*abs_wr_8) __P((void *, bus_space_handle_t,
bus_size_t, const u_int64_t *, bus_size_t));
- /* set multi */
- /* XXX IMPLEMENT */
+ /* set multiple */
+ void (*abs_sm_1) __P((void *, bus_space_handle_t,
+ bus_size_t, u_int8_t, bus_size_t));
+ void (*abs_sm_2) __P((void *, bus_space_handle_t,
+ bus_size_t, u_int16_t, bus_size_t));
+ void (*abs_sm_4) __P((void *, bus_space_handle_t,
+ bus_size_t, u_int32_t, bus_size_t));
+ void (*abs_sm_8) __P((void *, bus_space_handle_t,
+ bus_size_t, u_int64_t, bus_size_t));
/* set region */
- /* XXX IMPLEMENT */
+ void (*abs_sr_1) __P((void *, bus_space_handle_t,
+ bus_size_t, u_int8_t, bus_size_t));
+ void (*abs_sr_2) __P((void *, bus_space_handle_t,
+ bus_size_t, u_int16_t, bus_size_t));
+ void (*abs_sr_4) __P((void *, bus_space_handle_t,
+ bus_size_t, u_int32_t, bus_size_t));
+ void (*abs_sr_8) __P((void *, bus_space_handle_t,
+ bus_size_t, u_int64_t, bus_size_t));
/* copy */
- /* XXX IMPLEMENT */
-
- /* barrier */
- void (*abs_barrier) __P((void *, bus_space_handle_t,
- bus_size_t, bus_size_t, int));
+ void (*abs_c_1) __P((void *, bus_space_handle_t, bus_size_t,
+ bus_space_handle_t, bus_size_t, bus_size_t));
+ void (*abs_c_2) __P((void *, bus_space_handle_t, bus_size_t,
+ bus_space_handle_t, bus_size_t, bus_size_t));
+ void (*abs_c_4) __P((void *, bus_space_handle_t, bus_size_t,
+ bus_space_handle_t, bus_size_t, bus_size_t));
+ void (*abs_c_8) __P((void *, bus_space_handle_t, bus_size_t,
+ bus_space_handle_t, bus_size_t, bus_size_t));
};
@@ -147,8 +168,22 @@ struct alpha_bus_space {
(*(t)->__abs_opname(r,sz))((t)->abs_cookie, h, o)
#define __abs_ws(sz, t, h, o, v) \
(*(t)->__abs_opname(w,sz))((t)->abs_cookie, h, o, v)
+#ifndef DEBUG
#define __abs_nonsingle(type, sz, t, h, o, a, c) \
(*(t)->__abs_opname(type,sz))((t)->abs_cookie, h, o, a, c)
+#else
+#define __abs_nonsingle(type, sz, t, h, o, a, c) \
+ do { \
+ if (((unsigned long)a & (sz - 1)) != 0) \
+ panic("bus non-single %d-byte unaligned (to %p) at %s:%d", \
+ sz, a, __FILE__, __LINE__); \
+ (*(t)->__abs_opname(type,sz))((t)->abs_cookie, h, o, a, c); \
+ } while (0)
+#endif
+#define __abs_set(type, sz, t, h, o, v, c) \
+ (*(t)->__abs_opname(type,sz))((t)->abs_cookie, h, o, v, c)
+#define __abs_copy(sz, t, h1, o1, h2, o2, cnt) \
+ (*(t)->__abs_opname(c,sz))((t)->abs_cookie, h1, o1, h2, o2, cnt)
/*
@@ -173,6 +208,16 @@ struct alpha_bus_space {
/*
+ * Bus barrier operations.
+ */
+#define bus_space_barrier(t, h, o, l, f) \
+ (*(t)->abs_barrier)((t)->abs_cookie, (h), (o), (l), (f))
+
+#define BUS_BARRIER_READ 0x01
+#define BUS_BARRIER_WRITE 0x02
+
+
+/*
* Bus read (single) operations.
*/
#define bus_space_read_1(t, h, o) __abs_rs(1,(t),(h),(o))
@@ -245,28 +290,39 @@ struct alpha_bus_space {
/*
* Set multiple operations.
*/
-/* XXX IMPLEMENT */
+#define bus_space_set_multi_1(t, h, o, v, c) \
+ __abs_set(sm,1,(t),(h),(o),(v),(c))
+#define bus_space_set_multi_2(t, h, o, v, c) \
+ __abs_set(sm,2,(t),(h),(o),(v),(c))
+#define bus_space_set_multi_4(t, h, o, v, c) \
+ __abs_set(sm,4,(t),(h),(o),(v),(c))
+#define bus_space_set_multi_8(t, h, o, v, c) \
+ __abs_set(sm,8,(t),(h),(o),(v),(c))
/*
* Set region operations.
*/
-/* XXX IMPLEMENT */
+#define bus_space_set_region_1(t, h, o, v, c) \
+ __abs_set(sr,1,(t),(h),(o),(v),(c))
+#define bus_space_set_region_2(t, h, o, v, c) \
+ __abs_set(sr,2,(t),(h),(o),(v),(c))
+#define bus_space_set_region_4(t, h, o, v, c) \
+ __abs_set(sr,4,(t),(h),(o),(v),(c))
+#define bus_space_set_region_8(t, h, o, v, c) \
+ __abs_set(sr,8,(t),(h),(o),(v),(c))
/*
* Copy operations.
*/
-/* XXX IMPLEMENT */
-
-
-/*
- * Bus barrier operations.
- */
-#define bus_space_barrier(t, h, o, l, f) \
- (*(t)->abs_barrier)((t)->abs_cookie, (h), (o), (l), (f))
-
-#define BUS_BARRIER_READ 0x01
-#define BUS_BARRIER_WRITE 0x02
+#define bus_space_copy_1(t, h1, o1, h2, o2, c) \
+ __abs_copy(1, t, h1, o1, h2, o2, c)
+#define bus_space_copy_2(t, h1, o1, h2, o2, c) \
+ __abs_copy(2, t, h1, o1, h2, o2, c)
+#define bus_space_copy_4(t, h1, o1, h2, o2, c) \
+ __abs_copy(4, t, h1, o1, h2, o2, c)
+#define bus_space_copy_8(t, h1, o1, h2, o2, c) \
+ __abs_copy(8, t, h1, o1, h2, o2, c)
#endif /* _ALPHA_BUS_H_ */
diff --git a/sys/arch/alpha/include/cpu.h b/sys/arch/alpha/include/cpu.h
index cb08112157d..1ae32845eb4 100644
--- a/sys/arch/alpha/include/cpu.h
+++ b/sys/arch/alpha/include/cpu.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: cpu.h,v 1.5 1996/10/30 22:38:58 niklas Exp $ */
-/* $NetBSD: cpu.h,v 1.12 1996/07/14 04:15:10 cgd Exp $ */
+/* $OpenBSD: cpu.h,v 1.6 1997/01/24 19:57:10 niklas Exp $ */
+/* $NetBSD: cpu.h,v 1.14 1996/12/07 01:54:50 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -110,7 +110,8 @@ u_int64_t want_resched; /* resched() was called */
#define CPU_UNALIGNED_PRINT 3 /* int: print unaligned accesses */
#define CPU_UNALIGNED_FIX 4 /* int: fix unaligned accesses */
#define CPU_UNALIGNED_SIGBUS 5 /* int: SIGBUS unaligned accesses */
-#define CPU_MAXID 6 /* 5 valid machdep IDs */
+#define CPU_BOOTED_KERNEL 6 /* string: booted kernel name */
+#define CPU_MAXID 7 /* 6 valid machdep IDs */
#define CTL_MACHDEP_NAMES { \
{ 0, 0 }, \
@@ -119,6 +120,55 @@ u_int64_t want_resched; /* resched() was called */
{ "unaligned_print", CTLTYPE_INT }, \
{ "unaligned_fix", CTLTYPE_INT }, \
{ "unaligned_sigbus", CTLTYPE_INT }, \
+ { "booted_kernel", CTLTYPE_STRING }, \
}
+#ifdef _KERNEL
+
+struct pcb;
+struct proc;
+struct reg;
+struct rpb;
+struct trapframe;
+
+extern int cold;
+extern struct proc *fpcurproc;
+extern struct rpb *hwrpb;
+
+void XentArith __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
+void XentIF __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
+void XentInt __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
+void XentMM __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
+void XentRestart __P((void)); /* MAGIC */
+void XentSys __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
+void XentUna __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
+void alpha_init __P((u_long, u_long));
+void ast __P((struct trapframe *));
+int badaddr __P((void *, size_t));
+void child_return __P((struct proc *p));
+void configure __P((void));
+u_int64_t console_restart __P((u_int64_t, u_int64_t, u_int64_t));
+void do_sir __P((void));
+void dumpconf __P((void));
+void exception_return __P((void)); /* MAGIC */
+void frametoreg __P((struct trapframe *, struct reg *));
+long fswintrberr __P((void)); /* MAGIC */
+void init_prom_interface __P((void));
+void interrupt __P((unsigned long, unsigned long, unsigned long,
+ struct trapframe *));
+u_int64_t hwrpb_checksum __P((void));
+void hwrpb_restart_setup __P((void));
+void regdump __P((struct trapframe *));
+void regtoframe __P((struct reg *, struct trapframe *));
+void savectx __P((struct pcb *));
+void set_clockintr __P((void));
+void set_iointr __P((void (*)(void *, unsigned long)));
+void switch_exit __P((struct proc *)); /* MAGIC */
+void switch_trampoline __P((void)); /* MAGIC */
+void syscall __P((u_int64_t, struct trapframe *));
+void trap __P((unsigned long, unsigned long, unsigned long, unsigned long,
+ struct trapframe *));
+
+#endif /* _KERNEL */
+
#endif /* _ALPHA_CPU_H_ */
diff --git a/sys/arch/alpha/include/cpuconf.h b/sys/arch/alpha/include/cpuconf.h
new file mode 100644
index 00000000000..0147acd5956
--- /dev/null
+++ b/sys/arch/alpha/include/cpuconf.h
@@ -0,0 +1,73 @@
+/* $NetBSD: cpuconf.h,v 1.1 1996/11/12 05:14:40 cgd Exp $ */
+
+/*
+ * Copyright (c) 1996 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. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Christopher G. Demetriou
+ * for the NetBSD Project.
+ * 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.
+ */
+
+struct cpusw {
+ const char *family, *option;
+ int present;
+ const char *(*model_name) __P((void));
+ void (*cons_init) __P((void));
+ const char *(*iobus_name) __P((void));
+ void (*device_register) __P((struct device *dev,
+ void *aux));
+};
+
+#define CONCAT(a,b) __CONCAT(a,b)
+
+#define cpu_fn_name(p,f) CONCAT(CONCAT(p,_),f)
+
+#define cpu_decl(p) \
+ extern const char *cpu_fn_name(p,model_name) __P((void)); \
+ extern void cpu_fn_name(p,cons_init) __P((void)); \
+ extern const char *cpu_fn_name(p,iobus_name) __P((void)); \
+ extern void cpu_fn_name(p,device_register) \
+ __P((struct device *, void*));
+
+#define cpu_unknown() { NULL, NULL, 0, }
+#define cpu_notdef(f) { f, NULL, 0 }
+
+#define cpu_option_string(o) __STRING(o)
+#define cpu_option_present(o) (CONCAT(N,o) > NULL)
+#define cpu_function_init(o,p,f) \
+ (cpu_option_present(o) ? cpu_fn_name(p,f) : 0)
+#define cpu_init(f,o,p) \
+ { \
+ f, cpu_option_string(o) , cpu_option_present(o), \
+ cpu_function_init(o,p,model_name), \
+ cpu_function_init(o,p,cons_init), \
+ cpu_function_init(o,p,iobus_name), \
+ cpu_function_init(o,p,device_register), \
+ }
+
+#ifdef _KERNEL
+extern const struct cpusw cpusw[];
+extern const int ncpusw;
+#endif
diff --git a/sys/arch/alpha/include/intr.h b/sys/arch/alpha/include/intr.h
index e638077e95d..6100a7ff0c1 100644
--- a/sys/arch/alpha/include/intr.h
+++ b/sys/arch/alpha/include/intr.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: intr.h,v 1.3 1996/10/30 22:39:09 niklas Exp $ */
-/* $NetBSD: intr.h,v 1.2 1996/07/09 00:33:25 cgd Exp $ */
+/* $OpenBSD: intr.h,v 1.4 1997/01/24 19:57:12 niklas Exp $ */
+/* $NetBSD: intr.h,v 1.4 1996/12/03 17:34:47 cgd Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@@ -31,6 +31,8 @@
#ifndef _ALPHA_INTR_H_
#define _ALPHA_INTR_H_
+#include <sys/queue.h>
+
#define IPL_NONE 0 /* disable only this interrupt */
#define IPL_BIO 1 /* disable block I/O interrupts */
#define IPL_NET 2 /* disable network interrupts */
@@ -38,6 +40,7 @@
#define IPL_CLOCK 4 /* disable clock interrupts */
#define IPL_HIGH 5 /* disable all interrupts */
+#define IST_UNUSABLE -1 /* interrupt cannot be used */
#define IST_NONE 0 /* none (dummy) */
#define IST_PULSE 1 /* pulsed */
#define IST_EDGE 2 /* edge-triggered */
@@ -64,8 +67,44 @@ extern u_int64_t ssir;
#define SIR_NET 0x1
#define SIR_CLOCK 0x2
-#define siroff(x) ssir &= ~(x)
#define setsoftnet() ssir |= SIR_NET
#define setsoftclock() ssir |= SIR_CLOCK
+/*
+ * Alpha shared-interrupt-line common code.
+ */
+
+struct alpha_shared_intrhand {
+ TAILQ_ENTRY(alpha_shared_intrhand)
+ ih_q;
+ int (*ih_fn) __P((void *));
+ void *ih_arg;
+ int ih_level;
+};
+
+struct alpha_shared_intr {
+ TAILQ_HEAD(,alpha_shared_intrhand)
+ intr_q;
+ int intr_sharetype;
+ int intr_dfltsharetype;
+ int intr_nstrays;
+ int intr_maxstrays;
+};
+
+struct alpha_shared_intr *alpha_shared_intr_alloc __P((unsigned int));
+int alpha_shared_intr_dispatch __P((struct alpha_shared_intr *,
+ unsigned int));
+void *alpha_shared_intr_establish __P((struct alpha_shared_intr *,
+ unsigned int, int, int, int (*)(void *), void *, const char *));
+int alpha_shared_intr_get_sharetype __P((struct alpha_shared_intr *,
+ unsigned int));
+int alpha_shared_intr_isactive __P((struct alpha_shared_intr *,
+ unsigned int));
+void alpha_shared_intr_set_dfltsharetype __P((struct alpha_shared_intr *,
+ unsigned int, int));
+void alpha_shared_intr_set_maxstrays __P((struct alpha_shared_intr *,
+ unsigned int, int));
+void alpha_shared_intr_stray __P((struct alpha_shared_intr *, unsigned int,
+ const char *));
+
#endif
diff --git a/sys/arch/alpha/include/intrcnt.h b/sys/arch/alpha/include/intrcnt.h
index 50a451798ff..6be9bdbe3e1 100644
--- a/sys/arch/alpha/include/intrcnt.h
+++ b/sys/arch/alpha/include/intrcnt.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: intrcnt.h,v 1.4 1996/10/30 22:39:10 niklas Exp $ */
-/* $NetBSD: intrcnt.h,v 1.6 1996/06/05 03:38:02 cgd Exp $ */
+/* $OpenBSD: intrcnt.h,v 1.5 1997/01/24 19:57:13 niklas Exp $ */
+/* $NetBSD: intrcnt.h,v 1.7 1996/11/16 23:11:57 cgd Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@@ -97,14 +97,39 @@
ASCIZ "ioasic le"; \
ASCIZ "ioasic scc 0"; \
ASCIZ "ioasic scc 1"; \
- ASCIZ "ioasic am79c30";
+ ASCIZ "ioasic am79c30"; \
+ ASCIZ "eb164 irq 0"; \
+ ASCIZ "eb164 irq 1"; \
+ ASCIZ "eb164 irq 2"; \
+ ASCIZ "eb164 irq 3"; \
+ ASCIZ "eb164 irq 4"; \
+ ASCIZ "eb164 irq 5"; \
+ ASCIZ "eb164 irq 6"; \
+ ASCIZ "eb164 irq 7"; \
+ ASCIZ "eb164 irq 8"; \
+ ASCIZ "eb164 irq 9"; \
+ ASCIZ "eb164 irq 10"; \
+/* 0x50 */ ASCIZ "eb164 irq 11"; \
+ ASCIZ "eb164 irq 12"; \
+ ASCIZ "eb164 irq 13"; \
+ ASCIZ "eb164 irq 14"; \
+ ASCIZ "eb164 irq 15"; \
+ ASCIZ "eb164 irq 16"; \
+ ASCIZ "eb164 irq 17"; \
+ ASCIZ "eb164 irq 18"; \
+ ASCIZ "eb164 irq 19"; \
+ ASCIZ "eb164 irq 20"; \
+ ASCIZ "eb164 irq 21"; \
+ ASCIZ "eb164 irq 22"; \
+ ASCIZ "eb164 irq 23";
#define INTRCNT_DEFINITION \
/* 0x00 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
/* 0x10 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
/* 0x20 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
/* 0x30 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
-/* 0x40 */ .quad 0, 0, 0, 0, 0;
+/* 0x40 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0; \
+/* 0x50 */ .quad 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
#define INTRCNT_CLOCK 0
#define INTRCNT_ISA_IRQ (INTRCNT_CLOCK + 1)
@@ -119,6 +144,8 @@
#define INTRCNT_TCDS_LEN 2
#define INTRCNT_IOASIC (INTRCNT_TCDS + INTRCNT_TCDS_LEN)
#define INTRCNT_IOASIC_LEN 4
+#define INTRCNT_EB164_IRQ (INTRCNT_IOASIC + INTRCNT_IOASIC_LEN)
+#define INTRCNT_EB164_IRQ_LEN 24
#ifndef _LOCORE
extern volatile long intrcnt[];
diff --git a/sys/arch/alpha/include/param.h b/sys/arch/alpha/include/param.h
index 1f23fee3227..dbffda59fd1 100644
--- a/sys/arch/alpha/include/param.h
+++ b/sys/arch/alpha/include/param.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: param.h,v 1.8 1996/12/11 11:12:51 deraadt Exp $ */
-/* $NetBSD: param.h,v 1.14 1996/10/25 20:48:59 cgd Exp $ */
+/* $OpenBSD: param.h,v 1.9 1997/01/24 19:57:14 niklas Exp $ */
+/* $NetBSD: param.h,v 1.15 1996/11/13 21:13:19 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -53,6 +53,7 @@
#define MID_MACHINE MID_ALPHA
#include <machine/alpha_cpu.h>
+#include <machine/cpu.h>
/*
* Round p (pointer or byte index) up to a correctly-aligned value for all
diff --git a/sys/arch/alpha/include/pcb.h b/sys/arch/alpha/include/pcb.h
index bd7530fb65a..13062ee998c 100644
--- a/sys/arch/alpha/include/pcb.h
+++ b/sys/arch/alpha/include/pcb.h
@@ -1,8 +1,8 @@
-/* $OpenBSD: pcb.h,v 1.3 1996/10/30 22:39:14 niklas Exp $ */
-/* $NetBSD: pcb.h,v 1.4 1996/10/07 23:57:21 cgd Exp $ */
+/* $OpenBSD: pcb.h,v 1.4 1997/01/24 19:57:15 niklas Exp $ */
+/* $NetBSD: pcb.h,v 1.5 1996/11/13 22:21:00 cgd Exp $ */
/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
diff --git a/sys/arch/alpha/include/pmap.old.h b/sys/arch/alpha/include/pmap.old.h
index c60dfc9c485..f70bd18d318 100644
--- a/sys/arch/alpha/include/pmap.old.h
+++ b/sys/arch/alpha/include/pmap.old.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: pmap.old.h,v 1.1 1996/10/30 22:39:18 niklas Exp $ */
-/* $NetBSD: pmap.old.h,v 1.5 1996/07/09 00:39:24 cgd Exp $ */
+/* $OpenBSD: pmap.old.h,v 1.2 1997/01/24 19:57:16 niklas Exp $ */
+/* $NetBSD: pmap.old.h,v 1.6 1996/11/13 21:13:19 cgd Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -123,9 +123,9 @@ extern char *vmmap; /* map for mem, dumps, etc. */
/* Machine-specific functions. */
void pmap_activate __P((pmap_t));
-void pmap_emulate_reference __P((struct proc *p, vm_offset_t v,
- int user, int write));
+void pmap_emulate_reference __P((struct proc *, vm_offset_t, int, int));
void pmap_bootstrap __P((vm_offset_t, vm_offset_t));
+void pmap_unmap_prom __P((void));
#endif /* _KERNEL */
#endif /* _PMAP_MACHINE_ */
diff --git a/sys/arch/alpha/include/proc.h b/sys/arch/alpha/include/proc.h
index 5794e0244de..1738d1bb5c9 100644
--- a/sys/arch/alpha/include/proc.h
+++ b/sys/arch/alpha/include/proc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: proc.h,v 1.3 1996/10/30 22:39:19 niklas Exp $ */
+/* $OpenBSD: proc.h,v 1.4 1997/01/24 19:57:16 niklas Exp $ */
/* $NetBSD: proc.h,v 1.2 1995/03/24 15:01:36 cgd Exp $ */
/*
@@ -42,5 +42,4 @@ struct mdproc {
#ifdef _KERNEL
void switch_exit __P((struct proc *));
-void switch_trampoline __P((void (*) __P((struct proc *)), void *));
#endif
diff --git a/sys/arch/alpha/include/profile.h b/sys/arch/alpha/include/profile.h
index 34b748366d4..fd8bf8cf968 100644
--- a/sys/arch/alpha/include/profile.h
+++ b/sys/arch/alpha/include/profile.h
@@ -1,8 +1,8 @@
-/* $OpenBSD: profile.h,v 1.4 1996/10/30 22:39:20 niklas Exp $ */
-/* $NetBSD: profile.h,v 1.6 1996/09/15 22:33:28 cgd Exp $ */
+/* $OpenBSD: profile.h,v 1.5 1997/01/24 19:57:17 niklas Exp $ */
+/* $NetBSD: profile.h,v 1.7 1996/11/13 22:21:01 cgd Exp $ */
/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
diff --git a/sys/arch/alpha/include/prom.h b/sys/arch/alpha/include/prom.h
index ad96e534891..f8d26ee4093 100644
--- a/sys/arch/alpha/include/prom.h
+++ b/sys/arch/alpha/include/prom.h
@@ -1,8 +1,8 @@
-/* $OpenBSD: prom.h,v 1.5 1996/11/28 20:09:29 niklas Exp $ */
-/* $NetBSD: prom.h,v 1.4 1996/10/15 23:52:49 cgd Exp $ */
+/* $OpenBSD: prom.h,v 1.6 1997/01/24 19:57:18 niklas Exp $ */
+/* $NetBSD: prom.h,v 1.6 1996/11/13 22:21:03 cgd Exp $ */
/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Keith Bostic, Chris G. Demetriou
@@ -58,8 +58,6 @@ int prom_getenv __P((int, char *, int));
void init_prom_interface __P((void));
void hwrbp_restart_setup __P((void));
-int prom_dispatch __P((int, ...));
-int promcnlookc __P((dev_t, char *));
#endif
/* Prom operation values. */
@@ -83,8 +81,26 @@ int promcnlookc __P((dev_t, char *));
* either don't need to copy anything, or don't need the copy because it's
* already being done elsewhere, are defined here.
*/
-#define prom_close(chan) prom_dispatch(PROM_R_CLOSE, chan)
-#define prom_read(chan, len, buf, blkno) \
- prom_dispatch(PROM_R_READ, chan, len, buf, blkno)
-#define prom_write(chan, len, buf, blkno) \
- prom_dispatch(PROM_R_WRITE, chan, len, buf, blkno)
+#define prom_close(chan) \
+ prom_dispatch(PROM_R_CLOSE, chan, 0, 0, 0)
+#define prom_read(chan, len, buf, blkno) \
+ prom_dispatch(PROM_R_READ, chan, len, (u_int64_t)buf, blkno)
+#define prom_write(chan, len, buf, blkno) \
+ prom_dispatch(PROM_R_WRITE, chan, len, (u_int64_t)buf, blkno)
+#define prom_putstr(chan, str, len) \
+ prom_dispatch(PROM_R_PUTS, chan, (u_int64_t)str, len, 0)
+#define prom_getc(chan) \
+ prom_dispatch(PROM_R_GETC, chan, 0, 0, 0)
+#define prom_getenv_disp(id, buf, len) \
+ prom_dispatch(PROM_R_GETENV, id, (u_int64_t)buf, len, 0)
+
+#ifndef ASSEMBLER
+#ifdef _KERNEL
+void promcnputc __P((dev_t, int));
+int promcngetc __P((dev_t));
+int promcnlookc __P((dev_t, char *));
+
+u_int64_t prom_dispatch __P((u_int64_t, u_int64_t, u_int64_t, u_int64_t,
+ u_int64_t));
+#endif /* _KERNEL */
+#endif /* ASSEMBLER */
diff --git a/sys/arch/alpha/include/pte.h b/sys/arch/alpha/include/pte.h
index 6fcec6de1b9..57438dca065 100644
--- a/sys/arch/alpha/include/pte.h
+++ b/sys/arch/alpha/include/pte.h
@@ -1,8 +1,8 @@
-/* $OpenBSD: pte.h,v 1.5 1996/10/30 22:39:23 niklas Exp $ */
-/* $NetBSD: pte.h,v 1.7 1996/10/01 20:21:05 cgd Exp $ */
+/* $OpenBSD: pte.h,v 1.6 1997/01/24 19:57:19 niklas Exp $ */
+/* $NetBSD: pte.h,v 1.8 1996/11/13 22:21:04 cgd Exp $ */
/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Chris G. Demetriou
diff --git a/sys/arch/alpha/include/rpb.h b/sys/arch/alpha/include/rpb.h
index cbe4b76eccf..b6290296590 100644
--- a/sys/arch/alpha/include/rpb.h
+++ b/sys/arch/alpha/include/rpb.h
@@ -1,8 +1,8 @@
-/* $OpenBSD: rpb.h,v 1.5 1996/10/30 22:39:26 niklas Exp $ */
-/* $NetBSD: rpb.h,v 1.7 1996/04/29 16:23:11 cgd Exp $ */
+/* $OpenBSD: rpb.h,v 1.6 1997/01/24 19:57:20 niklas Exp $ */
+/* $NetBSD: rpb.h,v 1.11 1996/11/13 22:26:41 cgd Exp $ */
/*
- * Copyright (c) 1994, 1995 Carnegie-Mellon University.
+ * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
* All rights reserved.
*
* Author: Keith Bostic, Chris G. Demetriou
@@ -58,12 +58,20 @@ struct rpb {
#define ST_DEC_3000_300 7 /* "Pelican" (TC) */
#define ST_DEC_2100_A500 9 /* "Sable" (?) */
#define ST_DEC_APXVME_64 10 /* "AXPvme" (VME?) */
-#define ST_DEC_AXPPCI_33 11 /* "NoName" (PCI/ISA?) */
+#define ST_DEC_AXPPCI_33 11 /* "NoName" (PCI/ISA) */
#define ST_DEC_21000 12 /* "TurboLaser" (?) */
#define ST_DEC_2100_A50 13 /* "Avanti" (PCI/ISA) */
#define ST_DEC_MUSTANG 14 /* "Mustang" (?) */
#define ST_DEC_KN20AA 15 /* kn20aa (PCI/EISA) */
#define ST_DEC_1000 17 /* "Mikasa" (PCI/ISA?) */
+#define ST_EB66 19 /* EB66 (PCI/ISA?) */
+#define ST_EB64P 20 /* EB64+ (PCI/ISA?) */
+#define ST_DEC_4100 22 /* "Rawhide" (?) */
+#define ST_DEC_EV45_PBP 23 /* "Lego" (?) */
+#define ST_DEC_2100A_A500 24 /* "Lynx" (?) */
+#define ST_EB164 26 /* EB164 (PCI/ISA) */
+#define ST_DEC_1000A 27 /* "Noritake" (?) */
+#define ST_DEC_ALPHAVME_224 28 /* "Cortex" (?) */
u_int64_t rpb_type; /* 50: */
@@ -136,16 +144,12 @@ struct rpb {
vm_offset_t rpb_memdat_off; /* C8: memory data offset */
vm_offset_t rpb_condat_off; /* D0: config data offset */
vm_offset_t rpb_fru_off; /* D8: FRU table offset */
- /* XXX Are the protos below correct? */
- long (*rpb_save_term) __P((long));
- /* E0: terminal save */
- long rpb_save_term_val; /* E8: */
- long (*rpb_rest_term) __P((long));
- /* F0: terminal restore */
- long rpb_rest_term_val; /* F8: */
- long (*rpb_restart) __P((long));
- /* 100: restart */
- long rpb_restart_val; /* 108: */
+ u_int64_t rpb_save_term; /* E0: terminal save */
+ u_int64_t rpb_save_term_val; /* E8: */
+ u_int64_t rpb_rest_term; /* F0: terminal restore */
+ u_int64_t rpb_rest_term_val; /* F8: */
+ u_int64_t rpb_restart; /* 100: restart */
+ u_int64_t rpb_restart_val; /* 108: */
u_int64_t rpb_reserve_os; /* 110: */
u_int64_t rpb_reserve_hw; /* 118: */
u_int64_t rpb_checksum; /* 120: HWRPB checksum */
@@ -155,10 +159,6 @@ struct rpb {
u_int64_t rpb_tbhint[8]; /* 149: TB hint block */
};
-#ifdef _KERNEL
-extern struct rpb *hwrpb;
-#endif
-
/*
* PCS: Per-CPU information.
*/
@@ -213,19 +213,21 @@ struct pcs {
#define PCS_PROC_MAJOR 0x00000000ffffffff
#define PCS_PROC_MAJORSHIFT 0
+
#define PCS_PROC_EV3 1 /* EV3 */
#define PCS_PROC_EV4 2 /* EV4: 21064 */
-#define PCS_PROC_SIMULATOR 3 /* simulation */
+#define PCS_PROC_SIMULATION 3 /* Simulation */
#define PCS_PROC_LCA4 4 /* LCA4: 2106[68] */
#define PCS_PROC_EV5 5 /* EV5: 21164 */
#define PCS_PROC_EV45 6 /* EV45: 21064A */
+#define PCS_PROC_EV56 7 /* EV56: 21164A */
+#define PCS_PROC_EV6 8 /* EV6: 21264 */
+#define PCS_PROC_PCA56 9 /* PCA256: 21164PC */
#define PCS_PROC_MINOR 0xffffffff00000000
#define PCS_PROC_MINORSHIFT 32
-#define PCS_PROC_PASS2 0 /* pass 2 or 2.1 */
-#define PCS_PROC_PASS3 1 /* pass 3 */
- /* 4 == ev4s? or 1 == ... ? */
- /* minor on the LCA appears to be pass number */
+
+ /* Minor number interpretation is processor specific. See cpu.c. */
u_int64_t pcs_proc_var; /* B8: processor variation. */
@@ -316,8 +318,8 @@ struct ctb {
* CRD: Console Routine Descriptor
*/
struct crd {
- int64_t descriptor;
- int (*code) __P((struct crd *));
+ int64_t descriptor;
+ int (*entry_va) __P((struct crd *));
};
/*
diff --git a/sys/arch/alpha/include/types.h b/sys/arch/alpha/include/types.h
index a068d7920fb..ce7e4bb61ca 100644
--- a/sys/arch/alpha/include/types.h
+++ b/sys/arch/alpha/include/types.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: types.h,v 1.3 1996/10/30 22:39:32 niklas Exp $ */
-/* $NetBSD: types.h,v 1.5 1996/10/01 14:26:18 cgd Exp $ */
+/* $OpenBSD: types.h,v 1.4 1997/01/24 19:57:21 niklas Exp $ */
+/* $NetBSD: types.h,v 1.6 1996/12/05 00:13:47 cgd Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -70,4 +70,6 @@ typedef unsigned long u_int64_t;
typedef int64_t register_t;
+#define __BROKEN_INDIRECT_CONFIG
+
#endif /* _MACHTYPES_H_ */