1 /*-
2 * Copyright (c) 1982, 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * William Jolitz.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
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 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by the University of
19 * California, Berkeley and its contributors.
20 * 4. Neither the name of the University nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
23 *
24 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
37 * $FreeBSD: releng/5.0/sys/powerpc/powerpc/genassym.c 105611 2002-10-21 05:27:41Z grehan $
38 */
39
40 #include <sys/param.h>
41 #include <sys/assym.h>
42 #include <sys/errno.h>
43 #include <sys/ktr.h>
44 #include <sys/proc.h>
45 #include <sys/queue.h>
46 #include <sys/signal.h>
47 #include <sys/smp.h>
48 #include <sys/systm.h>
49 #include <sys/ucontext.h>
50 #include <sys/user.h>
51 #include <sys/ucontext.h>
52 #include <sys/vmmeter.h>
53
54 #include <vm/vm.h>
55 #include <vm/vm_param.h>
56 #include <vm/pmap.h>
57 #include <vm/vm_map.h>
58
59 #include <machine/pcb.h>
60 #include <machine/pmap.h>
61 #include <machine/sigframe.h>
62
63 ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread));
64 ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb));
65 ASSYM(PC_CURPMAP, offsetof(struct pcpu, pc_curpmap));
66
67 ASSYM(MTX_LOCK, offsetof(struct mtx, mtx_lock));
68 ASSYM(MTX_RECURSECNT, offsetof(struct mtx, mtx_recurse));
69
70 ASSYM(PM_KERNELSR, offsetof(struct pmap, pm_sr[KERNEL_SR]));
71 ASSYM(PM_USRSR, offsetof(struct pmap, pm_sr[USER_SR]));
72 ASSYM(PM_SR, offsetof(struct pmap, pm_sr));
73
74 ASSYM(FRAMELEN, FRAMELEN);
75 ASSYM(FRAME_0, offsetof(struct trapframe, fixreg[0]));
76 ASSYM(FRAME_1, offsetof(struct trapframe, fixreg[1]));
77 ASSYM(FRAME_2, offsetof(struct trapframe, fixreg[2]));
78 ASSYM(FRAME_3, offsetof(struct trapframe, fixreg[3]));
79 ASSYM(FRAME_LR, offsetof(struct trapframe, lr));
80 ASSYM(FRAME_CR, offsetof(struct trapframe, cr));
81 ASSYM(FRAME_CTR, offsetof(struct trapframe, ctr));
82 ASSYM(FRAME_XER, offsetof(struct trapframe, xer));
83 ASSYM(FRAME_SRR0, offsetof(struct trapframe, srr0));
84 ASSYM(FRAME_SRR1, offsetof(struct trapframe, srr1));
85 ASSYM(FRAME_DAR, offsetof(struct trapframe, dar));
86 ASSYM(FRAME_DSISR, offsetof(struct trapframe, dsisr));
87 ASSYM(FRAME_EXC, offsetof(struct trapframe, exc));
88
89 ASSYM(SFRAMELEN, roundup(sizeof(struct switchframe), 16));
90
91 ASSYM(IFRAMELEN, IFRAMELEN);
92 ASSYM(IFRAME_R1, offsetof(struct intrframe, r1));
93 ASSYM(IFRAME_SRR1, offsetof(struct intrframe, srr1));
94 ASSYM(IFRAME_SRR0, offsetof(struct intrframe, srr0));
95 ASSYM(IFRAME_PRI, offsetof(struct intrframe, pri));
96 ASSYM(IFRAME_INTR_DEPTH, offsetof(struct intrframe, intr_depth));
97 ASSYM(IFRAME_VRSAVE, offsetof(struct intrframe, vrsave));
98 ASSYM(IFRAME_CTR, offsetof(struct intrframe, ctr));
99 ASSYM(IFRAME_XER, offsetof(struct intrframe, xer));
100 ASSYM(IFRAME_CR, offsetof(struct intrframe, cr));
101 ASSYM(IFRAME_LR, offsetof(struct intrframe, lr));
102 ASSYM(IFRAME_R12, offsetof(struct intrframe, r12));
103 ASSYM(IFRAME_R11, offsetof(struct intrframe, r11));
104 ASSYM(IFRAME_R10, offsetof(struct intrframe, r10));
105 ASSYM(IFRAME_R9, offsetof(struct intrframe, r9));
106 ASSYM(IFRAME_R8, offsetof(struct intrframe, r8));
107 ASSYM(IFRAME_R7, offsetof(struct intrframe, r7));
108 ASSYM(IFRAME_R6, offsetof(struct intrframe, r6));
109 ASSYM(IFRAME_R5, offsetof(struct intrframe, r5));
110 ASSYM(IFRAME_R4, offsetof(struct intrframe, r4));
111 ASSYM(IFRAME_R3, offsetof(struct intrframe, r3));
112 ASSYM(IFRAME_R0, offsetof(struct intrframe, r0));
113
114 ASSYM(SPFRAMELEN, SPFRAMELEN);
115 ASSYM(SPFRAME_R1, offsetof(struct spillframe, r1));
116 ASSYM(SPFRAME_R12, offsetof(struct spillframe, r12));
117 ASSYM(SPFRAME_R11, offsetof(struct spillframe, r11));
118 ASSYM(SPFRAME_R10, offsetof(struct spillframe, r10));
119 ASSYM(SPFRAME_R9, offsetof(struct spillframe, r9));
120 ASSYM(SPFRAME_R8, offsetof(struct spillframe, r8));
121 ASSYM(SPFRAME_R7, offsetof(struct spillframe, r7));
122 ASSYM(SPFRAME_R6, offsetof(struct spillframe, r6));
123 ASSYM(SPFRAME_R5, offsetof(struct spillframe, r5));
124 ASSYM(SPFRAME_R4, offsetof(struct spillframe, r4));
125 ASSYM(SPFRAME_R3, offsetof(struct spillframe, r3));
126 ASSYM(SPFRAME_R0, offsetof(struct spillframe, r0));
127
128 ASSYM(CF_FUNC, offsetof(struct callframe, cf_func));
129 ASSYM(CF_ARG0, offsetof(struct callframe, cf_arg0));
130 ASSYM(CF_ARG1, offsetof(struct callframe, cf_arg1));
131
132 ASSYM(PCB_CONTEXT, offsetof(struct pcb, pcb_context));
133 ASSYM(PCB_CR, offsetof(struct pcb, pcb_cr));
134 ASSYM(PCB_PMR, offsetof(struct pcb, pcb_pmreal));
135 ASSYM(PCB_SP, offsetof(struct pcb, pcb_sp));
136 ASSYM(PCB_LR, offsetof(struct pcb, pcb_lr));
137 ASSYM(PCB_USR, offsetof(struct pcb, pcb_usr));
138 ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault));
139 ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags));
140
141 ASSYM(TD_PROC, offsetof(struct thread, td_proc));
142 ASSYM(TD_PCB, offsetof(struct thread, td_pcb));
143 ASSYM(TD_KSE, offsetof(struct thread, td_kse));
144
145 ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace));
146
147 ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap));
148
149 ASSYM(KE_FLAGS, offsetof(struct kse, ke_flags));
150
151 ASSYM(KEF_ASTPENDING, KEF_ASTPENDING);
152 ASSYM(KEF_NEEDRESCHED, KEF_NEEDRESCHED);
153
154 ASSYM(SF_UC, offsetof(struct sigframe, sf_uc));
Cache object: 099142e6f46247ff568a870672f9dc68
|