summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/include
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 03:54:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-14 03:54:39 +0000
commitf12226068d16673eea9adafe99388f1061d3309f (patch)
tree90cb542d279e793d072ffc6e9f1f1add1f07179e /sys/arch/alpha/include
parent470d0389b66fade522060561cc0c6ba36e01e7cb (diff)
update to netbsd
Diffstat (limited to 'sys/arch/alpha/include')
-rw-r--r--sys/arch/alpha/include/ansi.h8
-rw-r--r--sys/arch/alpha/include/asm.h64
-rw-r--r--sys/arch/alpha/include/autoconf.h8
-rw-r--r--sys/arch/alpha/include/db_machdep.h56
-rw-r--r--sys/arch/alpha/include/ecoff.h44
-rw-r--r--sys/arch/alpha/include/eisa_machdep.h0
-rw-r--r--sys/arch/alpha/include/intrcnt.h68
-rw-r--r--sys/arch/alpha/include/isa_machdep.h31
-rw-r--r--sys/arch/alpha/include/param.h4
-rw-r--r--sys/arch/alpha/include/pci_machdep.h36
-rw-r--r--sys/arch/alpha/include/pio.h88
-rw-r--r--sys/arch/alpha/include/pmap.h12
-rw-r--r--sys/arch/alpha/include/profile.h190
-rw-r--r--sys/arch/alpha/include/psl.h16
-rw-r--r--sys/arch/alpha/include/pte.h12
-rw-r--r--sys/arch/alpha/include/rpb.h4
-rw-r--r--sys/arch/alpha/include/vmparam.h3
17 files changed, 510 insertions, 134 deletions
diff --git a/sys/arch/alpha/include/ansi.h b/sys/arch/alpha/include/ansi.h
index c3e6e2bfbf4..7502ca628f9 100644
--- a/sys/arch/alpha/include/ansi.h
+++ b/sys/arch/alpha/include/ansi.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ansi.h,v 1.2 1995/02/16 03:08:04 cgd Exp $ */
+/* $NetBSD: ansi.h,v 1.3 1995/11/23 02:35:41 cgd Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -52,11 +52,11 @@
#define _BSD_SIZE_T_ unsigned long /* sizeof() */
#define _BSD_SSIZE_T_ long /* byte count or error */
#define _BSD_TIME_T_ int /* time() */
-struct __va_list {
+typedef struct {
char *base;
long offset;
-};
-#define _BSD_VA_LIST_ struct __va_list /* va_list */
+} __va_list;
+#define _BSD_VA_LIST_ __va_list /* va_list */
/*
* 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 4283fbe52cc..e76b4c586a1 100644
--- a/sys/arch/alpha/include/asm.h
+++ b/sys/arch/alpha/include/asm.h
@@ -1,4 +1,4 @@
-/* $NetBSD: asm.h,v 1.1 1995/02/13 23:07:30 cgd Exp $ */
+/* $NetBSD: asm.h,v 1.2 1995/11/23 02:35:45 cgd Exp $ */
/*
* Copyright (c) 1991,1990,1989,1994,1995 Carnegie Mellon University
@@ -195,6 +195,28 @@
*/
/*
+ * MCOUNT
+ */
+
+#ifndef PROF
+#define MCOUNT /* nothing */
+#else
+#define MCOUNT \
+ lda sp, -16(sp); \
+ stq pv, 0(sp); \
+ \
+ br pv, 1f; \
+1: ldgp gp, 0(pv); \
+ lda pv, _mcount; \
+ jsr at_reg, (pv); \
+ br pv, 2f; \
+2: ldgp gp, 0(pv); \
+ \
+ ldq pv, 0(sp); \
+ lda sp, 16(sp)
+#endif
+
+/*
* LEAF
* Declare a global leaf function.
* A leaf function does not call other functions AND does not
@@ -205,6 +227,17 @@
.globl _name_; \
.ent _name_ 0; \
_name_:; \
+ .frame sp,0,ra; \
+ MCOUNT
+/* should have been
+ .proc _name_,_n_args_; \
+ .frame 0,ra,0,0
+*/
+
+#define LEAF_NOPROFILE(_name_,_n_args_) \
+ .globl _name_; \
+ .ent _name_ 0; \
+_name_:; \
.frame sp,0,ra
/* should have been
.proc _name_,_n_args_; \
@@ -218,7 +251,8 @@ _name_:; \
#define STATIC_LEAF(_name_,_n_args_) \
.ent _name_ 0; \
_name_:; \
- .frame sp,0,ra
+ .frame sp,0,ra; \
+ MCOUNT
/* should have been
.proc _name_,_n_args_; \
.frame 0,ra,0,0
@@ -257,6 +291,18 @@ _name_:
.ent _name_ 0; \
_name_:; \
.frame sp,_framesize_,_pc_reg_; \
+ .livereg _i_mask_,_f_mask_; \
+ MCOUNT
+/* should have been
+ .proc _name_,_n_args_; \
+ .frame _framesize_, _pc_reg_, _i_mask_, _f_mask_
+*/
+
+#define NESTED_NOPROFILE(_name_, _n_args_, _framesize_, _pc_reg_, _i_mask_, _f_mask_ ) \
+ .globl _name_; \
+ .ent _name_ 0; \
+_name_:; \
+ .frame sp,_framesize_,_pc_reg_; \
.livereg _i_mask_,_f_mask_
/* should have been
.proc _name_,_n_args_; \
@@ -271,7 +317,8 @@ _name_:; \
.ent _name_ 0; \
_name_:; \
.frame sp,_framesize_,_pc_reg_; \
- .livereg _i_mask_,_f_mask_
+ .livereg _i_mask_,_f_mask_; \
+ MCOUNT
/* should have been
.proc _name_,_n_args_; \
.frame _framesize_, _pc_reg_, _i_mask_, _f_mask_
@@ -385,11 +432,7 @@ _name_:; \
* MSG
* Allocate space for a message (a read-only ascii string)
*/
-#ifdef __ALPHA_AS__
-#define ASCIZ .asciiz
-#else
#define ASCIZ .asciz
-#endif
#define MSG(msg,reg) \
lda reg, 9f; \
.data; \
@@ -555,15 +598,8 @@ _name_:; \
*/
#define SETGP(pv) ldgp gp,0(pv)
-#ifdef __ALPHA_AS__
-#define MF_FPCR(x) mf_fpcr x,x,x
-#define MT_FPCR(x) mt_fpcr x,x,x
-#define JMP(loc) jmp loc
-#define CONST(c,reg) mov c, reg
-#else
#define MF_FPCR(x) mf_fpcr x
#define MT_FPCR(x) mt_fpcr x
#define JMP(loc) br zero,loc
#define CONST(c,reg) ldiq reg, c
-#endif
diff --git a/sys/arch/alpha/include/autoconf.h b/sys/arch/alpha/include/autoconf.h
index 167a214e34b..d4a10dd402f 100644
--- a/sys/arch/alpha/include/autoconf.h
+++ b/sys/arch/alpha/include/autoconf.h
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.h,v 1.1 1995/02/13 23:07:31 cgd Exp $ */
+/* $NetBSD: autoconf.h,v 1.2 1995/11/23 02:35:50 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -69,6 +69,10 @@ struct confargs {
struct abus *ca_bus; /* bus device resides on. */
};
-void set_clockintr __P((void (*)(struct clockframe *)));
+void set_clockintr __P((void));
void set_iointr __P((void (*)(void *, int)));
int badaddr __P((void *, u_int64_t));
+
+#ifdef EVCNT_COUNTERS
+extern struct evcnt clock_intr_evcnt;
+#endif
diff --git a/sys/arch/alpha/include/db_machdep.h b/sys/arch/alpha/include/db_machdep.h
new file mode 100644
index 00000000000..986bfeb672f
--- /dev/null
+++ b/sys/arch/alpha/include/db_machdep.h
@@ -0,0 +1,56 @@
+/* $NetBSD: db_machdep.h,v 1.1 1995/11/23 02:35:54 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+#ifndef _ALPHA_DB_MACHDEP_H_
+#define _ALPHA_DB_MACHDEP_H_
+
+/*
+ * Machine-dependent defines for new kernel debugger.
+ */
+
+#include <sys/param.h>
+#include <vm/vm.h>
+#include <machine/frame.h>
+
+typedef vm_offset_t db_addr_t; /* address - unsigned */
+typedef long db_expr_t; /* expression - signed */
+
+typedef struct trapframe db_regs_t;
+db_regs_t ddb_regs; /* register state */
+#define DDB_REGS (&ddb_regs)
+
+#define PC_REGS(regs) ((db_addr_t)(regs)->tf_pc)
+
+#define BKPT_INST 0x00000080 /* breakpoint instruction */
+#define BKPT_SIZE (4) /* size of breakpoint inst */
+#define BKPT_SET(inst) (BKPT_INST)
+
+#define FIXUP_PC_AFTER_BREAK ddb_regs.tf_pc -= BKPT_SIZE;
+
+#endif /* _ALPHA_DB_MACHDEP_H_ */
diff --git a/sys/arch/alpha/include/ecoff.h b/sys/arch/alpha/include/ecoff.h
index c67b3286f16..b8fff03678f 100644
--- a/sys/arch/alpha/include/ecoff.h
+++ b/sys/arch/alpha/include/ecoff.h
@@ -1,4 +1,4 @@
-/* $NetBSD: ecoff.h,v 1.1 1995/02/13 23:07:35 cgd Exp $ */
+/* $NetBSD: ecoff.h,v 1.2 1995/11/23 02:35:57 cgd Exp $ */
/*
* Copyright (c) 1994 Adam Glass
@@ -48,3 +48,45 @@
ex->ef_magic != ECOFF_MAGIC_NETBSD_ALPHA)
#define ECOFF_SEGMENT_ALIGNMENT(eap) (eap->ea_vstamp < 23 ? 8 : 16)
+
+struct ecoff_symhdr {
+ int16_t sh_magic;
+ int16_t sh_vstamp;
+ int32_t sh_linemax;
+ int32_t sh_densenummax;
+ int32_t sh_procmax;
+ int32_t sh_lsymmax;
+ int32_t sh_optsymmax;
+ int32_t sh_auxxymmax;
+ int32_t sh_lstrmax;
+ int32_t sh_estrmax;
+ int32_t sh_fdmax;
+ int32_t sh_rfdmax;
+ int32_t sh_esymmax;
+ long sh_linesize;
+ long sh_lineoff;
+ long sh_densenumoff;
+ long sh_procoff;
+ long sh_lsymoff;
+ long sh_optsymoff;
+ long sh_auxsymoff;
+ long sh_lstroff;
+ long sh_estroff;
+ long sh_fdoff;
+ long sh_rfdoff;
+ long sh_esymoff;
+};
+
+struct ecoff_extsym {
+ long es_value;
+ int es_strindex;
+ unsigned es_type:6;
+ unsigned es_class:5;
+ unsigned :1;
+ unsigned es_symauxindex:20;
+ unsigned es_jmptbl:1;
+ unsigned es_cmain:1;
+ unsigned es_weakext:1;
+ unsigned :29;
+ int es_indexfld;
+};
diff --git a/sys/arch/alpha/include/eisa_machdep.h b/sys/arch/alpha/include/eisa_machdep.h
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/sys/arch/alpha/include/eisa_machdep.h
diff --git a/sys/arch/alpha/include/intrcnt.h b/sys/arch/alpha/include/intrcnt.h
new file mode 100644
index 00000000000..abf39d0fc9c
--- /dev/null
+++ b/sys/arch/alpha/include/intrcnt.h
@@ -0,0 +1,68 @@
+
+
+#define INTRNAMES_DEFINITION \
+/* 0x00 */ ASCIZ "clock"; \
+ ASCIZ "isa irq 0"; \
+ ASCIZ "isa irq 1"; \
+ ASCIZ "isa irq 2"; \
+ ASCIZ "isa irq 3"; \
+ ASCIZ "isa irq 4"; \
+ ASCIZ "isa irq 5"; \
+ ASCIZ "isa irq 6"; \
+ ASCIZ "isa irq 7"; \
+ ASCIZ "isa irq 8"; \
+ ASCIZ "isa irq 9"; \
+ ASCIZ "isa irq 10"; \
+ ASCIZ "isa irq 11"; \
+ ASCIZ "isa irq 12"; \
+ ASCIZ "isa irq 13"; \
+ ASCIZ "isa irq 14"; \
+/* 0x10 */ ASCIZ "isa irq 15"; \
+ ASCIZ "kn20aa irq 0"; \
+ ASCIZ "kn20aa irq 1"; \
+ ASCIZ "kn20aa irq 2"; \
+ ASCIZ "kn20aa irq 3"; \
+ ASCIZ "kn20aa irq 4"; \
+ ASCIZ "kn20aa irq 5"; \
+ ASCIZ "kn20aa irq 6"; \
+ ASCIZ "kn20aa irq 7"; \
+ ASCIZ "kn20aa irq 8"; \
+ ASCIZ "kn20aa irq 9"; \
+ ASCIZ "kn20aa irq 10"; \
+ ASCIZ "kn20aa irq 11"; \
+ ASCIZ "kn20aa irq 12"; \
+ ASCIZ "kn20aa irq 13"; \
+ ASCIZ "kn20aa irq 14"; \
+/* 0x20 */ ASCIZ "kn20aa irq 15"; \
+ ASCIZ "kn20aa irq 16"; \
+ ASCIZ "kn20aa irq 17"; \
+ ASCIZ "kn20aa irq 18"; \
+ ASCIZ "kn20aa irq 19"; \
+ ASCIZ "kn20aa irq 20"; \
+ ASCIZ "kn20aa irq 21"; \
+ ASCIZ "kn20aa irq 22"; \
+ ASCIZ "kn20aa irq 23"; \
+ ASCIZ "kn20aa irq 24"; \
+ ASCIZ "kn20aa irq 25"; \
+ ASCIZ "kn20aa irq 26"; \
+ ASCIZ "kn20aa irq 27"; \
+ ASCIZ "kn20aa irq 28"; \
+ ASCIZ "kn20aa irq 29"; \
+ ASCIZ "kn20aa irq 30"; \
+/* 0x30 */ ASCIZ "kn20aa irq 31";
+
+#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;
+
+#define INTRCNT_CLOCK 0
+#define INTRCNT_ISA_IRQ (INTRCNT_CLOCK + 1)
+#define INTRCNT_ISA_IRQ_LEN 16
+#define INTRCNT_KN20AA_IRQ (INTRCNT_ISA_IRQ + INTRCNT_ISA_IRQ_LEN)
+#define INTRCNT_KN20AA_IRQ_LEN 32
+
+#ifndef LOCORE
+extern long intrcnt[];
+#endif
diff --git a/sys/arch/alpha/include/isa_machdep.h b/sys/arch/alpha/include/isa_machdep.h
new file mode 100644
index 00000000000..a5636e42f51
--- /dev/null
+++ b/sys/arch/alpha/include/isa_machdep.h
@@ -0,0 +1,31 @@
+/* $NetBSD: isa_machdep.h,v 1.1 1995/11/23 02:36:11 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+
+/* not __ISA_MACHDEP_PIO_DEFINITIONS__ */
+/* not __ISA_MACHDEP_MEM_DEFINITIONS__ */
diff --git a/sys/arch/alpha/include/param.h b/sys/arch/alpha/include/param.h
index 85a1b3e7925..7dbf026a91a 100644
--- a/sys/arch/alpha/include/param.h
+++ b/sys/arch/alpha/include/param.h
@@ -1,4 +1,4 @@
-/* $NetBSD: param.h,v 1.8 1995/08/13 00:03:11 mycroft Exp $ */
+/* $NetBSD: param.h,v 1.9 1995/11/23 02:36:15 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -70,7 +70,7 @@
#define NBSEG (1 << SEGSHIFT) /* bytes/segment (8M) */
#define SEGOFSET (NBSEG-1) /* byte off. into seg */
-#define KERNBASE 0xfffffe0000000000 /* start of kernel virtual */
+#define KERNBASE 0xfffffc0000230000 /* start of kernel virtual */
#define BTOPKERNBASE ((u_long)KERNBASE >> PGSHIFT)
#define DEV_BSIZE 512
diff --git a/sys/arch/alpha/include/pci_machdep.h b/sys/arch/alpha/include/pci_machdep.h
new file mode 100644
index 00000000000..5e474e396d2
--- /dev/null
+++ b/sys/arch/alpha/include/pci_machdep.h
@@ -0,0 +1,36 @@
+/* $NetBSD: pci_machdep.h,v 1.1 1995/11/23 02:36:19 cgd Exp $ */
+
+/*
+ * Copyright (c) 1995 Carnegie-Mellon University.
+ * All rights reserved.
+ *
+ * Author: Chris G. Demetriou
+ *
+ * Permission to use, copy, modify and distribute this software and
+ * its documentation is hereby granted, provided that both the copyright
+ * notice and this permission notice appear in all copies of the
+ * software, derivative works or modified versions, and any portions
+ * thereof, and that both notices appear in supporting documentation.
+ *
+ * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
+ * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
+ * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
+ *
+ * Carnegie Mellon requests users of this software to return to
+ *
+ * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
+ * School of Computer Science
+ * Carnegie Mellon University
+ * Pittsburgh PA 15213-3890
+ *
+ * any improvements or extensions that they make and grant Carnegie the
+ * rights to redistribute these changes.
+ */
+/*
+ * Machine-specific definitions for PCI autoconfiguration.
+ */
+
+/*
+ * Configuration tag.
+ */
+typedef u_long pci_tag_t;
diff --git a/sys/arch/alpha/include/pio.h b/sys/arch/alpha/include/pio.h
deleted file mode 100644
index 9fd16f4af20..00000000000
--- a/sys/arch/alpha/include/pio.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* $NetBSD: pio.h,v 1.1 1995/06/28 01:16:33 cgd Exp $ */
-
-/*
- * Copyright (c) 1995 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-/* Prototypes for ISA-ish I/O space access functions. */
-
-/*
- * XXX
- * XXX THIS WILL LIKELY HAVE TO BE COMPLETELY CHANGED.
- * XXX e.g. to take softc for bus.
- * XXX
- */
-
-struct isa_pio_fcns {
- /* input functions */
- u_int8_t (*isa_inb) __P((int port));
- void (*isa_insb) __P((int port, void *addr, int cnt));
- u_int16_t (*isa_inw) __P((int port));
- void (*isa_insw) __P((int port, void *addr, int cnt));
- u_int32_t (*isa_inl) __P((int port));
- void (*isa_insl) __P((int port, void *addr, int cnt));
-
- /* output functions */
- void (*isa_outb) __P((int port, u_int8_t datum));
- void (*isa_outsb) __P((int port, void *addr, int cnt));
- void (*isa_outw) __P((int port, u_int16_t datum));
- void (*isa_outsw) __P((int port, void *addr, int cnt));
- void (*isa_outl) __P((int port, u_int32_t datum));
- void (*isa_outsl) __P((int port, void *addr, int cnt));
-};
-
-/*
- * Global which tells which set of functions are correct
- * for this machine.
- */
-struct isa_pio_fcns *isa_pio_fcns;
-
-/*
- * Individual chipsets' versions.
- */
-extern struct isa_pio_fcns apecs_pio_fcns;
-extern struct isa_pio_fcns jensen_pio_fcns;
-
-
-/*
- * macros to use input functions
- */
-#define inb(p) (*isa_pio_fcns->isa_inb)(p)
-#define insb(p, a, c) (*isa_pio_fcns->isa_insb)(p, a, c)
-#define inw(p) (*isa_pio_fcns->isa_inw)(p)
-#define insw(p, a, c) (*isa_pio_fcns->isa_insw)(p, a, c)
-#define inl(p) (*isa_pio_fcns->isa_inl)(p)
-#define insl(p, a, c) (*isa_pio_fcns->isa_insl)(p, a, c)
-
-/*
- * macros to use output functions
- */
-#define outb(p, d) (*isa_pio_fcns->isa_outb)(p, d)
-#define outsb(p, a, c) (*isa_pio_fcns->isa_outsb)(p, a, c)
-#define outw(p, d) (*isa_pio_fcns->isa_outw)(p, d)
-#define outsw(p, a, c) (*isa_pio_fcns->isa_outsw)(p, a, c)
-#define outl(p, d) (*isa_pio_fcns->isa_outl)(p, d)
-#define outsl(p, a, c) (*isa_pio_fcns->isa_outsl)(p, a, c)
diff --git a/sys/arch/alpha/include/pmap.h b/sys/arch/alpha/include/pmap.h
index 4339565011f..1b74e2317d6 100644
--- a/sys/arch/alpha/include/pmap.h
+++ b/sys/arch/alpha/include/pmap.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.3 1995/04/10 12:41:38 mycroft Exp $ */
+/* $NetBSD: pmap.h,v 1.4 1995/11/23 02:36:25 cgd Exp $ */
/*
* Copyright (c) 1987 Carnegie-Mellon University
@@ -100,6 +100,12 @@ typedef struct pv_entry {
#define PV_PTPAGE 0x01 /* header: entry maps a page table page */
+/*
+ * bits of pmap_attributes[]
+ */
+#define PMAP_ATTR_MOD 0x01 /* modified */
+#define PMAP_ATTR_REF 0x02 /* referenced */
+
#ifdef _KERNEL
pv_entry_t pv_table; /* array of entries, one per page */
@@ -111,6 +117,10 @@ pv_entry_t pv_table; /* array of entries, one per page */
extern pt_entry_t *Sysmap;
extern char *vmmap; /* map for mem, dumps, etc. */
+
+/* Machine-specific functions. */
+void pmap_emulate_reference __P((struct proc *p, vm_offset_t v,
+ int user, int write));
#endif /* _KERNEL */
#endif /* _PMAP_MACHINE_ */
diff --git a/sys/arch/alpha/include/profile.h b/sys/arch/alpha/include/profile.h
index d3ba252db6f..08cebcd3359 100644
--- a/sys/arch/alpha/include/profile.h
+++ b/sys/arch/alpha/include/profile.h
@@ -1,4 +1,4 @@
-/* $NetBSD: profile.h,v 1.2 1995/03/28 18:13:57 jtc Exp $ */
+/* $NetBSD: profile.h,v 1.3 1995/11/23 02:36:28 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -27,13 +27,189 @@
* rights to redistribute these changes.
*/
-/* XXX XXX XXX XXX XXX */
+#define _MCOUNT_DECL void mcount
-#define MCOUNT \
-extern void mcount() /* XXX asm("mcount") */; void mcount() { \
-}
+#if 0
+/*
+ * XXX The definition of MCOUNT below is really the following code, run
+ * XXX through cpp, since the inline assembly isn't preprocessed.
+ */
+#define OFFSET_AT 0
+#define OFFSET_V0 8
+#define OFFSET_T0 16
+#define OFFSET_T1 24
+#define OFFSET_T2 32
+#define OFFSET_T3 40
+#define OFFSET_T4 48
+#define OFFSET_T5 56
+#define OFFSET_T6 64
+#define OFFSET_T7 72
+#define OFFSET_S6 80
+#define OFFSET_A0 88
+#define OFFSET_A1 96
+#define OFFSET_A2 104
+#define OFFSET_A3 112
+#define OFFSET_A4 120
+#define OFFSET_A5 128
+#define OFFSET_T8 136
+#define OFFSET_T9 144
+#define OFFSET_T10 152
+#define OFFSET_T11 160
+#define OFFSET_RA 168
+#define OFFSET_T12 176
+#define OFFSET_GP 184
+#define FRAME_SIZE 192
+
+LEAF(_mcount,0) /* XXX */
+ .set noat
+ .set noreorder
+
+ lda sp, -FRAME_SIZE(sp)
+
+ stq at_reg, OFFSET_AT(sp)
+ stq v0, OFFSET_V0(sp)
+ stq t0, OFFSET_T0(sp)
+ stq t1, OFFSET_T1(sp)
+ stq t2, OFFSET_T2(sp)
+ stq t3, OFFSET_T3(sp)
+ stq t4, OFFSET_T4(sp)
+ stq t5, OFFSET_T5(sp)
+ stq t6, OFFSET_T6(sp)
+ stq t7, OFFSET_T7(sp)
+ stq s6, OFFSET_S6(sp) /* XXX because run _after_ prologue. */
+ stq a0, OFFSET_A0(sp)
+ stq a1, OFFSET_A1(sp)
+ stq a2, OFFSET_A2(sp)
+ stq a3, OFFSET_A3(sp)
+ stq a4, OFFSET_A4(sp)
+ stq a5, OFFSET_A5(sp)
+ stq t8, OFFSET_T8(sp)
+ stq t9, OFFSET_T9(sp)
+ stq t10, OFFSET_T10(sp)
+ stq t11, OFFSET_T11(sp)
+ stq ra, OFFSET_RA(sp)
+ stq t12, OFFSET_T12(sp)
+ stq gp, OFFSET_GP(sp)
+
+ br pv, 1f
+1: SETGP(pv)
+ mov ra, a0
+ mov at_reg, a1
+ CALL(mcount)
+
+ ldq v0, OFFSET_V0(sp)
+ ldq t0, OFFSET_T0(sp)
+ ldq t1, OFFSET_T1(sp)
+ ldq t2, OFFSET_T2(sp)
+ ldq t3, OFFSET_T3(sp)
+ ldq t4, OFFSET_T4(sp)
+ ldq t5, OFFSET_T5(sp)
+ ldq t6, OFFSET_T6(sp)
+ ldq t7, OFFSET_T7(sp)
+ ldq s6, OFFSET_S6(sp) /* XXX because run _after_ prologue. */
+ ldq a0, OFFSET_A0(sp)
+ ldq a1, OFFSET_A1(sp)
+ ldq a2, OFFSET_A2(sp)
+ ldq a3, OFFSET_A3(sp)
+ ldq a4, OFFSET_A4(sp)
+ ldq a5, OFFSET_A5(sp)
+ ldq t8, OFFSET_T8(sp)
+ ldq t9, OFFSET_T9(sp)
+ ldq t10, OFFSET_T10(sp)
+ ldq t11, OFFSET_T11(sp)
+ ldq gp, OFFSET_GP(sp)
+ ldq ra, OFFSET_RA(sp)
+
+ ldq at_reg, OFFSET_AT(sp)
+
+ lda sp, FRAME_SIZE(sp)
+ ret zero, (at_reg), 1
+
+ END(_mcount)
+#endif /* 0 */
+
+#define MCOUNT asm(" \
+ .globl _mcount; \
+ .ent _mcount 0; \
+_mcount:; \
+ .frame $30,0,$26; \
+ .set noat; \
+ .set noreorder; \
+ \
+ lda $30, -192($30); \
+ \
+ stq $28, 0($30); \
+ stq $0, 8($30); \
+ stq $1, 16($30); \
+ stq $2, 24($30); \
+ stq $3, 32($30); \
+ stq $4, 40($30); \
+ stq $5, 48($30); \
+ stq $6, 56($30); \
+ stq $7, 64($30); \
+ stq $8, 72($30); \
+ stq $15, 80($30); \
+ stq $16, 88($30); \
+ stq $17, 96($30); \
+ stq $18, 104($30); \
+ stq $19, 112($30); \
+ stq $20, 120($30); \
+ stq $21, 128($30); \
+ stq $22, 136($30); \
+ stq $23, 144($30); \
+ stq $24, 152($30); \
+ stq $25, 160($30); \
+ stq $26, 168($30); \
+ stq $27, 176($30); \
+ stq $29, 184($30); \
+ \
+ br $27, 1f; \
+1: ldgp $29,0($27); \
+ mov $26, $16; \
+ mov $28, $17; \
+ jsr $26,mcount; \
+ ldgp $29,0($26); \
+ \
+ ldq $0, 8($30); \
+ ldq $1, 16($30); \
+ ldq $2, 24($30); \
+ ldq $3, 32($30); \
+ ldq $4, 40($30); \
+ ldq $5, 48($30); \
+ ldq $6, 56($30); \
+ ldq $7, 64($30); \
+ ldq $8, 72($30); \
+ ldq $15, 80($30); \
+ ldq $16, 88($30); \
+ ldq $17, 96($30); \
+ ldq $18, 104($30); \
+ ldq $19, 112($30); \
+ ldq $20, 120($30); \
+ ldq $21, 128($30); \
+ ldq $22, 136($30); \
+ ldq $23, 144($30); \
+ ldq $24, 152($30); \
+ ldq $25, 160($30); \
+ ldq $29, 184($30); \
+ ldq $26, 168($30); \
+ \
+ ldq $28, 0($30); \
+ \
+ lda $30, 192($30); \
+ ret $31, ($28), 1; \
+ \
+ .end _mcount");
#ifdef _KERNEL
-#define MCOUNT_ENTER
-#define MCOUNT_EXIT
+/*
+ * The following two macros do splhigh and splx respectively.
+ * profile_swpipl is a special version of pal_swpipl which
+ * doesn't include profiling support.
+ *
+ * XXX These macros should probably use inline assembly.
+ */
+#define MCOUNT_ENTER \
+ s = profile_swpipl(PSL_IPL_HIGH)
+#define MCOUNT_EXIT \
+ (void)profile_swpipl(s);
#endif
diff --git a/sys/arch/alpha/include/psl.h b/sys/arch/alpha/include/psl.h
index 3b019596c44..e14260c2bf6 100644
--- a/sys/arch/alpha/include/psl.h
+++ b/sys/arch/alpha/include/psl.h
@@ -1,4 +1,4 @@
-/* $NetBSD: psl.h,v 1.3 1995/08/03 00:03:09 cgd Exp $ */
+/* $NetBSD: psl.h,v 1.4 1995/11/23 02:36:33 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -27,6 +27,9 @@
* rights to redistribute these changes.
*/
+#ifndef __ALPHA_PSL_H__
+#define __ALPHA_PSL_H__
+
/*
* Processor Status register definitions.
*/
@@ -70,16 +73,17 @@
/*
* Cache invalidation/flush routines.
*/
-#if 0
-#define wbflush() alpha_mb() /* Flush all write buffers */
-#else
+
/* Flush all write buffers */
-#define wbflush() __asm __volatile("mb")
-#endif
+static __inline int wbflush() { __asm __volatile("mb"); } /* XXX? wmb */
+
#define IMB() pal_imb() /* Sync instruction cache w/data */
void alpha_mb __P((void)); /* Flush all write buffers */
void pal_imb __P((void)); /* Sync instruction cache */
u_int64_t pal_swpipl __P((u_int64_t)); /* write new IPL, return old */
+u_int64_t profile_swpipl __P((u_int64_t)); /* pal_swpipl w/o profiling */
void pal_tbi __P((u_int64_t, void *)); /* Invalidate TLB entries */
#endif /* _KERNEL */
+
+#endif /* !__ALPHA_PSL_H__ */
diff --git a/sys/arch/alpha/include/pte.h b/sys/arch/alpha/include/pte.h
index 7611d097cf4..95b3a84c06c 100644
--- a/sys/arch/alpha/include/pte.h
+++ b/sys/arch/alpha/include/pte.h
@@ -1,4 +1,4 @@
-/* $NetBSD: pte.h,v 1.2 1995/03/28 18:14:04 jtc Exp $ */
+/* $NetBSD: pte.h,v 1.3 1995/11/23 02:36:37 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -58,17 +58,15 @@ typedef u_int64_t pt_entry_t;
#define PG_PROT 0x000000000000ff00
#define PG_RSVD 0x000000000000cc80 /* Reserved fpr hardware */
#define PG_WIRED 0x0000000000010000 /* Wired. [SOFTWARE] */
-#define PG_MOD 0x0000000000020000 /* Modified. [SOFTWARE] */
-#define PG_USED 0x0000000000040000 /* Referenced. [SOFTWARE] */
#define PG_FRAME 0xffffffff00000000
#define PG_SHIFT 32
#define PG_PFNUM(x) (((x) & PG_FRAME) >> PG_SHIFT)
-#if defined(_KERNEL) && !defined(LOCORE)
#define K0SEG_BEGIN 0xfffffc0000000000 /* unmapped, cached */
#define K0SEG_END 0xfffffe0000000000
#define PHYS_UNCACHED 0x0000000040000000
+#if !defined(LOCORE)
#define k0segtophys(x) ((vm_offset_t)(x) & 0x00000003ffffffff)
#define phystok0seg(x) ((vm_offset_t)(x) | K0SEG_BEGIN)
@@ -81,9 +79,10 @@ typedef u_int64_t pt_entry_t;
#define vatopa(va) \
((PG_PFNUM(*kvtopte(va)) << PGSHIFT) | ((vm_offset_t)(va) & PGOFSET))
-#define ALPHA_STSIZE NBPG /* 8k */
-#define ALPHA_MAX_PTSIZE (NPTEPG * NBPG) /* 8M */
+#define ALPHA_STSIZE ((u_long)NBPG) /* 8k */
+#define ALPHA_MAX_PTSIZE ((u_long)(NPTEPG * NBPG)) /* 8M */
+#ifdef _KERNEL
/*
* Kernel virtual address to Sysmap entry and visa versa.
*/
@@ -107,3 +106,4 @@ extern pt_entry_t *Lev1map; /* Alpha Level One page table */
extern pt_entry_t *Sysmap; /* kernel pte table */
extern vm_size_t Sysmapsize; /* number of pte's in Sysmap */
#endif
+#endif
diff --git a/sys/arch/alpha/include/rpb.h b/sys/arch/alpha/include/rpb.h
index ed931b87657..c738b061ac7 100644
--- a/sys/arch/alpha/include/rpb.h
+++ b/sys/arch/alpha/include/rpb.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rpb.h,v 1.5 1995/06/28 01:14:41 cgd Exp $ */
+/* $NetBSD: rpb.h,v 1.6 1995/11/23 02:36:41 cgd Exp $ */
/*
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -58,8 +58,10 @@ struct rpb {
#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_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?) */
u_int64_t rpb_type; /* 50: */
diff --git a/sys/arch/alpha/include/vmparam.h b/sys/arch/alpha/include/vmparam.h
index fa2b0360940..930ac5e7e21 100644
--- a/sys/arch/alpha/include/vmparam.h
+++ b/sys/arch/alpha/include/vmparam.h
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.1 1995/02/13 23:08:01 cgd Exp $ */
+/* $NetBSD: vmparam.h,v 1.2 1995/11/23 02:36:46 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -169,7 +169,6 @@
#define VM_PHYS_SIZE (USRIOSIZE*CLBYTES)
/* some Alpha-specific constants */
-#define VM_MAX_PHYSADDR ((vm_offset_t)0x0000000080000000) /* max phys addr */
#define VPTBASE ((vm_offset_t)0xfffffffc00000000) /* Virt. pg table */
#ifdef THESE_ARE_WRONG