summaryrefslogtreecommitdiff
path: root/sys/arch/alpha
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-11 09:45:23 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-11 09:45:23 +0000
commit3baf8ac73b602cfff5909551a50ce5ab0b7a32da (patch)
treefa56f66ecdb6741ee957e6d79b31800ca691f5fb /sys/arch/alpha
parent9d0598d755f5826ef3bc4a335571258b283a8bf2 (diff)
Add a genassym.cf that uses the standard scripts.
We loose the dependencies and all strange bugs that appear because genassym.c is a user program with _KERNEL defined.
Diffstat (limited to 'sys/arch/alpha')
-rw-r--r--sys/arch/alpha/alpha/genassym.cf176
1 files changed, 176 insertions, 0 deletions
diff --git a/sys/arch/alpha/alpha/genassym.cf b/sys/arch/alpha/alpha/genassym.cf
new file mode 100644
index 00000000000..e8cdfb11489
--- /dev/null
+++ b/sys/arch/alpha/alpha/genassym.cf
@@ -0,0 +1,176 @@
+# $OpenBSD: genassym.cf,v 1.1 2001/05/11 09:45:22 art Exp $
+
+# Copyright (c) 1994, 1995 Gordon W. Ross
+# Copyright (c) 1993 Adam Glass
+# Copyright (c) 1982, 1990, 1993
+# The Regents of the University of California. 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 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.
+
+include <sys/param.h>
+include <sys/buf.h>
+include <sys/map.h>
+include <sys/proc.h>
+include <sys/mbuf.h>
+include <sys/msgbuf.h>
+include <sys/syscall.h>
+include <sys/user.h>
+
+include <machine/cpu.h>
+include <machine/reg.h>
+include <machine/frame.h>
+include <machine/rpb.h>
+include <machine/vmparam.h>
+
+ifdef COMPAT_NETBSD
+include <compat/netbsd/netbsd_syscall.h>
+endif
+
+include <vm/vm.h>
+
+# general constants
+define NBPG NBPG
+define PGSHIFT PGSHIFT
+define VM_MAX_ADDRESS VM_MAX_ADDRESS
+
+# Register offsets, for stack frames.
+define FRAME_V0 FRAME_V0
+define FRAME_T0 FRAME_T0
+define FRAME_T1 FRAME_T1
+define FRAME_T2 FRAME_T2
+define FRAME_T3 FRAME_T3
+define FRAME_T4 FRAME_T4
+define FRAME_T5 FRAME_T5
+define FRAME_T6 FRAME_T6
+define FRAME_T7 FRAME_T7
+define FRAME_S0 FRAME_S0
+define FRAME_S1 FRAME_S1
+define FRAME_S2 FRAME_S2
+define FRAME_S3 FRAME_S3
+define FRAME_S4 FRAME_S4
+define FRAME_S5 FRAME_S5
+define FRAME_S6 FRAME_S6
+define FRAME_A3 FRAME_A3
+define FRAME_A4 FRAME_A4
+define FRAME_A5 FRAME_A5
+define FRAME_T8 FRAME_T8
+define FRAME_T9 FRAME_T9
+define FRAME_T10 FRAME_T10
+define FRAME_T11 FRAME_T11
+define FRAME_RA FRAME_RA
+define FRAME_T12 FRAME_T12
+define FRAME_AT FRAME_AT
+define FRAME_SP FRAME_SP
+
+define FRAME_SW_SIZE FRAME_SW_SIZE
+
+define FRAME_PS FRAME_PS
+define FRAME_PC FRAME_PC
+define FRAME_GP FRAME_GP
+define FRAME_A0 FRAME_A0
+define FRAME_A1 FRAME_A1
+define FRAME_A2 FRAME_A2
+
+define FRAME_SIZE FRAME_SIZE
+
+# bits of the PS register
+define ALPHA_PSL_USERMODE ALPHA_PSL_USERMODE
+define ALPHA_PSL_IPL_MASK ALPHA_PSL_IPL_MASK
+define ALPHA_PSL_IPL_0 ALPHA_PSL_IPL_0
+define ALPHA_PSL_IPL_SOFT ALPHA_PSL_IPL_SOFT
+define ALPHA_PSL_IPL_HIGH ALPHA_PSL_IPL_HIGH
+
+# pte bits
+define ALPHA_PTE_VALID ALPHA_PTE_VALID
+define ALPHA_PTE_ASM ALPHA_PTE_ASM
+define ALPHA_PTE_KR ALPHA_PTE_KR
+define ALPHA_PTE_KW ALPHA_PTE_KW
+
+# Important offsets into the proc struct & associated constants
+define P_FORW offsetof(struct proc, p_forw)
+define P_BACK offsetof(struct proc, p_back)
+define P_ADDR offsetof(struct proc, p_addr)
+define P_VMSPACE offsetof(struct proc, p_vmspace)
+define P_STAT offsetof(struct proc, p_stat)
+define P_MD_FLAGS offsetof(struct proc, p_md.md_flags)
+define P_MD_PCBPADDR offsetof(struct proc, p_md.md_pcbpaddr)
+define PH_LINK offsetof(struct prochd, ph_link)
+define PH_RLINK offsetof(struct prochd, ph_rlink)
+
+# offsets needed by cpu_switch() to switch mappings.
+define VM_MAP_PMAP offsetof(struct vmspace, vm_map.pmap)
+
+# Important offsets into the user struct & associated constants
+define UPAGES UPAGES
+define U_PCB offsetof(struct user, u_pcb)
+define U_PCB_HWPCB offsetof(struct user, u_pcb.pcb_hw)
+define U_PCB_HWPCB_KSP offsetof(struct user, u_pcb.pcb_hw.apcb_ksp)
+define U_PCB_CONTEXT offsetof(struct user, u_pcb.pcb_context[0])
+define U_PCB_ONFAULT offsetof(struct user, u_pcb.pcb_onfault)
+define U_PCB_ACCESSADDR offsetof(struct user, u_pcb.pcb_accessaddr)
+
+# Offsets into struct fpstate, for save, restore
+define FPREG_FPR_REGS offsetof(struct fpreg, fpr_regs[0])
+define FPREG_FPR_CR offsetof(struct fpreg, fpr_cr)
+
+# Important other addresses
+define HWRPB_ADDR HWRPB_ADDR
+define VPTBASE VPTBASE
+
+# Offsets into the HWRPB.
+define RPB_PRIMARY_CPU_ID offsetof(struct rpb, rpb_primary_cpu_id)
+
+# Kernel entries
+define ALPHA_KENTRY_ARITH ALPHA_KENTRY_ARITH
+define ALPHA_KENTRY_MM ALPHA_KENTRY_MM
+define ALPHA_KENTRY_IF ALPHA_KENTRY_IF
+define ALPHA_KENTRY_UNA ALPHA_KENTRY_UNA
+
+# errno values
+define ENAMETOOLONG ENAMETOOLONG
+define EFAULT EFAULT
+
+# Syscalls called from sigreturn.
+define SYS_sigreturn SYS_sigreturn
+define SYS_exit SYS_exit
+
+ifdef COMPAT_NETBSD
+# XXX - these should probably use the magic macro from machine/asm.h
+define NETBSD_SYS___sigreturn14 NETBSD_SYS___sigreturn14
+define NETBSD_SYS_exit NETBSD_SYS_exit
+endif
+
+# CPU info
+define CPU_INFO_CURPROC offsetof(struct cpu_info, ci_curproc)
+define CPU_INFO_FPCURPROC offsetof(struct cpu_info, ci_fpcurproc)
+define CPU_INFO_CURPCB offsetof(struct cpu_info, ci_curpcb)
+define CPU_INFO_IDLE_PCB_PADDR offsetof(struct cpu_info, ci_idle_pcb_paddr)
+define CPU_INFO_WANT_RESCHED offsetof(struct cpu_info, ci_want_resched)
+define CPU_INFO_ASTPENDING offsetof(struct cpu_info, ci_astpending)
+define CPU_INFO_SIZEOF sizeof(struct cpu_info)