2 * Copyright (c) 1982, 1990 The Regents of the University of California.
5 * This code is derived from software contributed to Berkeley by
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 4. Neither the name of the University nor the names of its contributors
17 * may be used to endorse or promote products derived from this software
18 * without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
35 #include <sys/cdefs.h>
36 __FBSDID("$FreeBSD$");
38 #include <sys/param.h>
39 #include <sys/systm.h>
40 #include <sys/assym.h>
44 #include <sys/errno.h>
47 #include <sys/mount.h>
48 #include <sys/mutex.h>
49 #include <sys/socket.h>
50 #include <sys/resource.h>
51 #include <sys/resourcevar.h>
53 #include <machine/frame.h>
54 #include <machine/chipset.h>
55 #include <machine/pcb.h>
56 #include <sys/vmmeter.h>
58 #include <vm/vm_param.h>
60 #include <vm/vm_map.h>
62 #include <netinet/in.h>
63 #include <nfs/nfsproto.h>
64 #include <nfs/rpcv2.h>
65 #include <nfsclient/nfs.h>
66 #include <nfsclient/nfsdiskless.h>
68 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
69 ASSYM(PC_FPCURTHREAD, offsetof(struct pcpu, pc_fpcurthread));
70 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
71 ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid));
72 ASSYM(PC_IDLEPCBPHYS, offsetof(struct pcpu, pc_idlepcbphys));
74 ASSYM(MTX_LOCK, offsetof(struct mtx, mtx_lock));
75 ASSYM(MTX_RECURSE, offsetof(struct mtx, mtx_recurse));
76 ASSYM(MTX_UNOWNED, MTX_UNOWNED);
78 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
79 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
81 ASSYM(TD_FLAGS, offsetof(struct thread, td_flags));
83 ASSYM(TDF_ASTPENDING, TDF_ASTPENDING);
84 ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED);
86 ASSYM(TD_MD_FLAGS, offsetof(struct thread, td_md.md_flags));
87 ASSYM(TD_MD_PCBPADDR, offsetof(struct thread, td_md.md_pcbpaddr));
88 ASSYM(TD_MD_HAE, offsetof(struct thread, td_md.md_hae));
90 ASSYM(TD_MD_KERNNEST, offsetof(struct thread, td_md.md_kernnest));
92 ASSYM(MDTD_HAEUSED, MDTD_HAEUSED);
94 ASSYM(CHIPSET_WRITE_HAE, offsetof(struct alpha_chipset, write_hae));
96 ASSYM(VM_MAXUSER_ADDRESS, VM_MAXUSER_ADDRESS);
97 ASSYM(PTLEV1I, PTLEV1I);
98 ASSYM(PTESIZE, PTESIZE);
100 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
101 ASSYM(PCB_HWPCB_KSP, offsetof(struct pcb, pcb_hw.apcb_ksp));
102 ASSYM(PCB_CONTEXT, offsetof(struct pcb, pcb_context));
103 ASSYM(PCB_HW, offsetof(struct pcb, pcb_hw));
105 ASSYM(FPREG_FPR_REGS, offsetof(struct fpreg, fpr_regs));
106 ASSYM(FPREG_FPR_CR, offsetof(struct fpreg, fpr_cr));
108 ASSYM(EFAULT, EFAULT);
109 ASSYM(ENAMETOOLONG, ENAMETOOLONG);
111 /* Register offsets, for stack frames. */
112 ASSYM(FRAME_V0, FRAME_V0);
113 ASSYM(FRAME_T0, FRAME_T0);
114 ASSYM(FRAME_T1, FRAME_T1);
115 ASSYM(FRAME_T2, FRAME_T2);
116 ASSYM(FRAME_T3, FRAME_T3);
117 ASSYM(FRAME_T4, FRAME_T4);
118 ASSYM(FRAME_T5, FRAME_T5);
119 ASSYM(FRAME_T6, FRAME_T6);
120 ASSYM(FRAME_T7, FRAME_T7);
121 ASSYM(FRAME_S0, FRAME_S0);
122 ASSYM(FRAME_S1, FRAME_S1);
123 ASSYM(FRAME_S2, FRAME_S2);
124 ASSYM(FRAME_S3, FRAME_S3);
125 ASSYM(FRAME_S4, FRAME_S4);
126 ASSYM(FRAME_S5, FRAME_S5);
127 ASSYM(FRAME_S6, FRAME_S6);
128 ASSYM(FRAME_A3, FRAME_A3);
129 ASSYM(FRAME_A4, FRAME_A4);
130 ASSYM(FRAME_A5, FRAME_A5);
131 ASSYM(FRAME_T8, FRAME_T8);
132 ASSYM(FRAME_T9, FRAME_T9);
133 ASSYM(FRAME_T10, FRAME_T10);
134 ASSYM(FRAME_T11, FRAME_T11);
135 ASSYM(FRAME_RA, FRAME_RA);
136 ASSYM(FRAME_T12, FRAME_T12);
137 ASSYM(FRAME_AT, FRAME_AT);
138 ASSYM(FRAME_SP, FRAME_SP);
139 ASSYM(FRAME_FLAGS, FRAME_FLAGS);
140 ASSYM(FRAME_FLAGS_SYSCALL, FRAME_FLAGS_SYSCALL);
142 ASSYM(FRAME_SW_SIZE, FRAME_SW_SIZE);
144 ASSYM(FRAME_PS, FRAME_PS);
145 ASSYM(FRAME_PC, FRAME_PC);
146 ASSYM(FRAME_GP, FRAME_GP);
147 ASSYM(FRAME_A0, FRAME_A0);
148 ASSYM(FRAME_A1, FRAME_A1);
149 ASSYM(FRAME_A2, FRAME_A2);
151 ASSYM(FRAME_SIZE, FRAME_SIZE);
153 /* bits of the PS register */
154 ASSYM(ALPHA_PSL_USERMODE, ALPHA_PSL_USERMODE);
155 ASSYM(ALPHA_PSL_IPL_MASK, ALPHA_PSL_IPL_MASK);
156 ASSYM(ALPHA_PSL_IPL_0, ALPHA_PSL_IPL_0);
157 ASSYM(ALPHA_PSL_IPL_SOFT, ALPHA_PSL_IPL_SOFT);
158 ASSYM(ALPHA_PSL_IPL_HIGH, ALPHA_PSL_IPL_HIGH);
161 ASSYM(ALPHA_L1SHIFT, ALPHA_L1SHIFT);
162 ASSYM(ALPHA_L2SHIFT, ALPHA_L2SHIFT);
163 ASSYM(ALPHA_L3SHIFT, ALPHA_L3SHIFT);
164 ASSYM(ALPHA_K1SEG_BASE, ALPHA_K1SEG_BASE);
165 ASSYM(ALPHA_PTE_VALID, ALPHA_PTE_VALID);
166 ASSYM(ALPHA_PTE_ASM, ALPHA_PTE_ASM);
167 ASSYM(ALPHA_PTE_KR, ALPHA_PTE_KR);
168 ASSYM(ALPHA_PTE_KW, ALPHA_PTE_KW);
171 ASSYM(ALPHA_KENTRY_ARITH, ALPHA_KENTRY_ARITH);
172 ASSYM(ALPHA_KENTRY_MM, ALPHA_KENTRY_MM);
174 ASSYM(ALPHA_KENTRY_IF, ALPHA_KENTRY_IF);
175 ASSYM(ALPHA_KENTRY_UNA, ALPHA_KENTRY_UNA);
177 ASSYM(VPTBASE, VPTBASE);
178 ASSYM(KERNBASE, KERNBASE);