genassym.cf revision 1.1.2.2 1 1.1.2.2 bouyer # $NetBSD: genassym.cf,v 1.1.2.2 2000/12/13 15:49:39 bouyer Exp $
2 1.1.2.2 bouyer
3 1.1.2.2 bouyer #
4 1.1.2.2 bouyer # Copyright (c) 1994, 1995 Gordon W. Ross
5 1.1.2.2 bouyer # Copyright (c) 1993 Adam Glass
6 1.1.2.2 bouyer # Copyright (c) 1982, 1990, 1993
7 1.1.2.2 bouyer # The Regents of the University of California. All rights reserved.
8 1.1.2.2 bouyer #
9 1.1.2.2 bouyer # Redistribution and use in source and binary forms, with or without
10 1.1.2.2 bouyer # modification, are permitted provided that the following conditions
11 1.1.2.2 bouyer # are met:
12 1.1.2.2 bouyer # 1. Redistributions of source code must retain the above copyright
13 1.1.2.2 bouyer # notice, this list of conditions and the following disclaimer.
14 1.1.2.2 bouyer # 2. Redistributions in binary form must reproduce the above copyright
15 1.1.2.2 bouyer # notice, this list of conditions and the following disclaimer in the
16 1.1.2.2 bouyer # documentation and/or other materials provided with the distribution.
17 1.1.2.2 bouyer # 3. All advertising materials mentioning features or use of this software
18 1.1.2.2 bouyer # must display the following acknowledgement:
19 1.1.2.2 bouyer # This product includes software developed by the University of
20 1.1.2.2 bouyer # California, Berkeley and its contributors.
21 1.1.2.2 bouyer # 4. Neither the name of the University nor the names of its contributors
22 1.1.2.2 bouyer # may be used to endorse or promote products derived from this software
23 1.1.2.2 bouyer # without specific prior written permission.
24 1.1.2.2 bouyer #
25 1.1.2.2 bouyer # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
26 1.1.2.2 bouyer # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 1.1.2.2 bouyer # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 1.1.2.2 bouyer # ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
29 1.1.2.2 bouyer # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
30 1.1.2.2 bouyer # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
31 1.1.2.2 bouyer # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
32 1.1.2.2 bouyer # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
33 1.1.2.2 bouyer # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
34 1.1.2.2 bouyer # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
35 1.1.2.2 bouyer # SUCH DAMAGE.
36 1.1.2.2 bouyer #
37 1.1.2.2 bouyer # from: @(#)genassym.c 8.3 (Berkeley) 1/4/94
38 1.1.2.2 bouyer #
39 1.1.2.2 bouyer
40 1.1.2.2 bouyer if defined(_KERNEL) && !defined(_LKM)
41 1.1.2.2 bouyer include "opt_compat_svr4.h"
42 1.1.2.2 bouyer endif
43 1.1.2.2 bouyer
44 1.1.2.2 bouyer include <sys/param.h>
45 1.1.2.2 bouyer include <sys/cdefs.h>
46 1.1.2.2 bouyer include <sys/errno.h>
47 1.1.2.2 bouyer include <sys/proc.h>
48 1.1.2.2 bouyer include <sys/syscall.h>
49 1.1.2.2 bouyer
50 1.1.2.2 bouyer include <uvm/uvm_extern.h>
51 1.1.2.2 bouyer
52 1.1.2.2 bouyer ifdef COMPAT_SVR4
53 1.1.2.2 bouyer include <compat/svr4/svr4_syscall.h>
54 1.1.2.2 bouyer include <compat/svr4/svr4_ucontext.h>
55 1.1.2.2 bouyer endif
56 1.1.2.2 bouyer
57 1.1.2.2 bouyer include <machine/cpu.h>
58 1.1.2.2 bouyer include <machine/dvma.h>
59 1.1.2.2 bouyer include <machine/mon.h>
60 1.1.2.2 bouyer include <machine/pcb.h>
61 1.1.2.2 bouyer include <machine/pmap.h>
62 1.1.2.2 bouyer include <machine/psl.h>
63 1.1.2.2 bouyer include <machine/pte.h>
64 1.1.2.2 bouyer include <machine/vmparam.h>
65 1.1.2.2 bouyer
66 1.1.2.2 bouyer include <sun3/sun3/buserr.h>
67 1.1.2.2 bouyer include <sun3/sun3/cache.h>
68 1.1.2.2 bouyer include <sun3/sun3/fc.h>
69 1.1.2.2 bouyer
70 1.1.2.2 bouyer include <sun3/sun3x/enable.h>
71 1.1.2.2 bouyer
72 1.1.2.2 bouyer # XXX: for copy.s
73 1.1.2.2 bouyer define M68030 1
74 1.1.2.2 bouyer
75 1.1.2.2 bouyer # bus error stuff XXX
76 1.1.2.2 bouyer # define BUSERR_REG BUSERR_REG
77 1.1.2.2 bouyer # define BUSERR_MMU BUSERR_MMU
78 1.1.2.2 bouyer
79 1.1.2.2 bouyer # 68k isms
80 1.1.2.2 bouyer define PSL_LOWIPL PSL_LOWIPL
81 1.1.2.2 bouyer define PSL_HIGHIPL PSL_HIGHIPL
82 1.1.2.2 bouyer define PSL_USER PSL_USER
83 1.1.2.2 bouyer define PSL_S PSL_S
84 1.1.2.2 bouyer define PSL_TS PSL_T | PSL_S
85 1.1.2.2 bouyer define FC_CONTROL FC_CONTROL
86 1.1.2.2 bouyer define FC_SUPERD FC_SUPERD
87 1.1.2.2 bouyer define FC_USERD FC_USERD
88 1.1.2.2 bouyer define IC_CLEAR IC_CLEAR
89 1.1.2.2 bouyer define DC_CLEAR DC_CLEAR
90 1.1.2.2 bouyer define CACHE_CLR CACHE_CLR
91 1.1.2.2 bouyer
92 1.1.2.2 bouyer # sun3 memory map
93 1.1.2.2 bouyer define USRSTACK USRSTACK
94 1.1.2.2 bouyer define SUN3X_MONSTART SUN3X_MONSTART
95 1.1.2.2 bouyer define SUN3X_PROM_BASE SUN3X_PROM_BASE
96 1.1.2.2 bouyer define SUN3X_MONEND SUN3X_MONEND
97 1.1.2.2 bouyer
98 1.1.2.2 bouyer # kernel-isms
99 1.1.2.2 bouyer define KERNBASE KERNBASE
100 1.1.2.2 bouyer define USPACE USPACE
101 1.1.2.2 bouyer define NBPG NBPG
102 1.1.2.2 bouyer
103 1.1.2.2 bouyer # system calls
104 1.1.2.2 bouyer define SYS_exit SYS_exit
105 1.1.2.2 bouyer define SYS___sigreturn14 SYS___sigreturn14
106 1.1.2.2 bouyer define SYS_compat_13_sigreturn13 SYS_compat_13_sigreturn13
107 1.1.2.2 bouyer
108 1.1.2.2 bouyer # errno-isms
109 1.1.2.2 bouyer define EFAULT EFAULT
110 1.1.2.2 bouyer define ENAMETOOLONG ENAMETOOLONG
111 1.1.2.2 bouyer
112 1.1.2.2 bouyer # trap types: locore.s includes trap.h
113 1.1.2.2 bouyer
114 1.1.2.2 bouyer #
115 1.1.2.2 bouyer # unix structure-isms
116 1.1.2.2 bouyer #
117 1.1.2.2 bouyer
118 1.1.2.2 bouyer # proc fields and values
119 1.1.2.2 bouyer define P_FORW offsetof(struct proc, p_forw)
120 1.1.2.2 bouyer define P_BACK offsetof(struct proc, p_back)
121 1.1.2.2 bouyer define P_VMSPACE offsetof(struct proc, p_vmspace)
122 1.1.2.2 bouyer define P_ADDR offsetof(struct proc, p_addr)
123 1.1.2.2 bouyer define P_PRIORITY offsetof(struct proc, p_priority)
124 1.1.2.2 bouyer define P_STAT offsetof(struct proc, p_stat)
125 1.1.2.2 bouyer define P_WCHAN offsetof(struct proc, p_wchan)
126 1.1.2.2 bouyer define P_FLAG offsetof(struct proc, p_flag)
127 1.1.2.2 bouyer define P_MDFLAG offsetof(struct proc, p_md.md_flags)
128 1.1.2.2 bouyer define P_MDREGS offsetof(struct proc, p_md.md_regs)
129 1.1.2.2 bouyer define SRUN SRUN
130 1.1.2.2 bouyer define SONPROC SONPROC
131 1.1.2.2 bouyer
132 1.1.2.2 bouyer # XXX: HP-UX trace bit?
133 1.1.2.2 bouyer
134 1.1.2.2 bouyer # VM/pmap structure fields
135 1.1.2.2 bouyer define VM_PMAP offsetof(struct vmspace, vm_map.pmap)
136 1.1.2.2 bouyer define PM_A_PHYS offsetof(struct pmap, pm_a_phys)
137 1.1.2.2 bouyer define PM_A_TMGR offsetof(struct pmap, pm_a_tmgr)
138 1.1.2.2 bouyer
139 1.1.2.2 bouyer # pcb offsets
140 1.1.2.2 bouyer define PCB_FLAGS offsetof(struct pcb, pcb_flags)
141 1.1.2.2 bouyer define PCB_PS offsetof(struct pcb, pcb_ps)
142 1.1.2.2 bouyer define PCB_USP offsetof(struct pcb, pcb_usp)
143 1.1.2.2 bouyer define PCB_REGS offsetof(struct pcb, pcb_regs[0])
144 1.1.2.2 bouyer define PCB_ONFAULT offsetof(struct pcb, pcb_onfault)
145 1.1.2.2 bouyer define PCB_FPCTX offsetof(struct pcb, pcb_fpregs)
146 1.1.2.2 bouyer define SIZEOF_PCB sizeof(struct pcb)
147 1.1.2.2 bouyer
148 1.1.2.2 bouyer # exception frame offset/sizes
149 1.1.2.2 bouyer define FR_SP offsetof(struct trapframe, tf_regs[15])
150 1.1.2.2 bouyer define FR_ADJ offsetof(struct trapframe, tf_stackadj)
151 1.1.2.2 bouyer define FR_HW offsetof(struct trapframe, tf_sr)
152 1.1.2.2 bouyer define FR_SIZE sizeof(struct trapframe)
153 1.1.2.2 bouyer
154 1.1.2.2 bouyer # FP frame offsets
155 1.1.2.2 bouyer define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
156 1.1.2.2 bouyer define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
157 1.1.2.2 bouyer
158 1.1.2.2 bouyer # SVR4 binary compatibility
159 1.1.2.2 bouyer ifdef COMPAT_SVR4
160 1.1.2.2 bouyer define SVR4_SIGF_HANDLER offsetof(struct svr4_sigframe, sf_handler)
161 1.1.2.2 bouyer define SVR4_SIGF_UC offsetof(struct svr4_sigframe, sf_uc)
162 1.1.2.2 bouyer define SVR4_SYS_context SVR4_SYS_context
163 1.1.2.2 bouyer define SVR4_SYS_exit SVR4_SYS_exit
164 1.1.2.2 bouyer define SVR4_SETCONTEXT SVR4_SETCONTEXT
165 1.1.2.2 bouyer endif
166