1 |
1275 |
phoenix |
/* $Id: offset.c,v 1.1.1.1 2004-04-15 01:35:26 phoenix Exp $
|
2 |
|
|
*
|
3 |
|
|
* offset.c: Calculate pt_regs and task_struct offsets.
|
4 |
|
|
*
|
5 |
|
|
* Copyright (C) 1996 David S. Miller
|
6 |
|
|
* Made portable by Ralf Baechle
|
7 |
|
|
* Adapted to parisc by Philipp Rumpf, (C) 1999 SuSE GmbH Nuernberg */
|
8 |
|
|
|
9 |
|
|
#include <linux/types.h>
|
10 |
|
|
#include <linux/sched.h>
|
11 |
|
|
#include <linux/version.h>
|
12 |
|
|
|
13 |
|
|
#include <asm/ptrace.h>
|
14 |
|
|
#include <asm/processor.h>
|
15 |
|
|
#include <asm/hardirq.h>
|
16 |
|
|
#include <asm/pdc.h>
|
17 |
|
|
|
18 |
|
|
#ifdef __LP64__
|
19 |
|
|
#define FRAME_SIZE 128
|
20 |
|
|
#else
|
21 |
|
|
#define FRAME_SIZE 64
|
22 |
|
|
#endif
|
23 |
|
|
|
24 |
|
|
#define text(t) __asm__("\n@@@" t)
|
25 |
|
|
#define _offset(type, member) (&(((type *)NULL)->member))
|
26 |
|
|
|
27 |
|
|
#define offset(string, ptr, member) \
|
28 |
|
|
__asm__("\n@@@" string "%0" : : "i" (_offset(ptr, member)))
|
29 |
|
|
#define size(string, size) \
|
30 |
|
|
__asm__("\n@@@" string "%0" : : "i" (sizeof(size)))
|
31 |
|
|
#define align(x,y) (((x)+FRAME_SIZE+(y)-1)-(((x)+(y)-1)%(y)))
|
32 |
|
|
#define size_align(string, size, algn) \
|
33 |
|
|
__asm__("\n@@@" string "%0" : : "i" \
|
34 |
|
|
align(sizeof(size),algn))
|
35 |
|
|
#define linefeed text("")
|
36 |
|
|
|
37 |
|
|
text("/* DO NOT TOUCH, AUTOGENERATED BY OFFSET.C */");
|
38 |
|
|
linefeed;
|
39 |
|
|
text("#ifndef _PARISC_OFFSET_H");
|
40 |
|
|
text("#define _PARISC_OFFSET_H");
|
41 |
|
|
linefeed;
|
42 |
|
|
#ifdef __LP64__
|
43 |
|
|
text("#ifndef __LP64__");
|
44 |
|
|
text("#error offset.h was generated for 64-bit build; did you do 'make dep'?");
|
45 |
|
|
#else
|
46 |
|
|
text("#ifdef __LP64__");
|
47 |
|
|
text("#error offset.h was generated for 32-bit build; did you do 'make dep'?");
|
48 |
|
|
#endif
|
49 |
|
|
text("#endif");
|
50 |
|
|
linefeed;
|
51 |
|
|
|
52 |
|
|
void output_task_ptreg_defines(void)
|
53 |
|
|
{
|
54 |
|
|
text("/* PA-RISC task pt_regs offsets. */");
|
55 |
|
|
offset("#define TASK_REGS ", struct task_struct, thread.regs);
|
56 |
|
|
offset("#define TASK_PT_PSW ", struct task_struct, thread.regs.gr[ 0]);
|
57 |
|
|
offset("#define TASK_PT_GR1 ", struct task_struct, thread.regs.gr[ 1]);
|
58 |
|
|
offset("#define TASK_PT_GR2 ", struct task_struct, thread.regs.gr[ 2]);
|
59 |
|
|
offset("#define TASK_PT_GR3 ", struct task_struct, thread.regs.gr[ 3]);
|
60 |
|
|
offset("#define TASK_PT_GR4 ", struct task_struct, thread.regs.gr[ 4]);
|
61 |
|
|
offset("#define TASK_PT_GR5 ", struct task_struct, thread.regs.gr[ 5]);
|
62 |
|
|
offset("#define TASK_PT_GR6 ", struct task_struct, thread.regs.gr[ 6]);
|
63 |
|
|
offset("#define TASK_PT_GR7 ", struct task_struct, thread.regs.gr[ 7]);
|
64 |
|
|
offset("#define TASK_PT_GR8 ", struct task_struct, thread.regs.gr[ 8]);
|
65 |
|
|
offset("#define TASK_PT_GR9 ", struct task_struct, thread.regs.gr[ 9]);
|
66 |
|
|
offset("#define TASK_PT_GR10 ", struct task_struct, thread.regs.gr[10]);
|
67 |
|
|
offset("#define TASK_PT_GR11 ", struct task_struct, thread.regs.gr[11]);
|
68 |
|
|
offset("#define TASK_PT_GR12 ", struct task_struct, thread.regs.gr[12]);
|
69 |
|
|
offset("#define TASK_PT_GR13 ", struct task_struct, thread.regs.gr[13]);
|
70 |
|
|
offset("#define TASK_PT_GR14 ", struct task_struct, thread.regs.gr[14]);
|
71 |
|
|
offset("#define TASK_PT_GR15 ", struct task_struct, thread.regs.gr[15]);
|
72 |
|
|
offset("#define TASK_PT_GR16 ", struct task_struct, thread.regs.gr[16]);
|
73 |
|
|
offset("#define TASK_PT_GR17 ", struct task_struct, thread.regs.gr[17]);
|
74 |
|
|
offset("#define TASK_PT_GR18 ", struct task_struct, thread.regs.gr[18]);
|
75 |
|
|
offset("#define TASK_PT_GR19 ", struct task_struct, thread.regs.gr[19]);
|
76 |
|
|
offset("#define TASK_PT_GR20 ", struct task_struct, thread.regs.gr[20]);
|
77 |
|
|
offset("#define TASK_PT_GR21 ", struct task_struct, thread.regs.gr[21]);
|
78 |
|
|
offset("#define TASK_PT_GR22 ", struct task_struct, thread.regs.gr[22]);
|
79 |
|
|
offset("#define TASK_PT_GR23 ", struct task_struct, thread.regs.gr[23]);
|
80 |
|
|
offset("#define TASK_PT_GR24 ", struct task_struct, thread.regs.gr[24]);
|
81 |
|
|
offset("#define TASK_PT_GR25 ", struct task_struct, thread.regs.gr[25]);
|
82 |
|
|
offset("#define TASK_PT_GR26 ", struct task_struct, thread.regs.gr[26]);
|
83 |
|
|
offset("#define TASK_PT_GR27 ", struct task_struct, thread.regs.gr[27]);
|
84 |
|
|
offset("#define TASK_PT_GR28 ", struct task_struct, thread.regs.gr[28]);
|
85 |
|
|
offset("#define TASK_PT_GR29 ", struct task_struct, thread.regs.gr[29]);
|
86 |
|
|
offset("#define TASK_PT_GR30 ", struct task_struct, thread.regs.gr[30]);
|
87 |
|
|
offset("#define TASK_PT_GR31 ", struct task_struct, thread.regs.gr[31]);
|
88 |
|
|
offset("#define TASK_PT_FR0 ", struct task_struct, thread.regs.fr[ 0]);
|
89 |
|
|
offset("#define TASK_PT_FR1 ", struct task_struct, thread.regs.fr[ 1]);
|
90 |
|
|
offset("#define TASK_PT_FR2 ", struct task_struct, thread.regs.fr[ 2]);
|
91 |
|
|
offset("#define TASK_PT_FR3 ", struct task_struct, thread.regs.fr[ 3]);
|
92 |
|
|
offset("#define TASK_PT_FR4 ", struct task_struct, thread.regs.fr[ 4]);
|
93 |
|
|
offset("#define TASK_PT_FR5 ", struct task_struct, thread.regs.fr[ 5]);
|
94 |
|
|
offset("#define TASK_PT_FR6 ", struct task_struct, thread.regs.fr[ 6]);
|
95 |
|
|
offset("#define TASK_PT_FR7 ", struct task_struct, thread.regs.fr[ 7]);
|
96 |
|
|
offset("#define TASK_PT_FR8 ", struct task_struct, thread.regs.fr[ 8]);
|
97 |
|
|
offset("#define TASK_PT_FR9 ", struct task_struct, thread.regs.fr[ 9]);
|
98 |
|
|
offset("#define TASK_PT_FR10 ", struct task_struct, thread.regs.fr[10]);
|
99 |
|
|
offset("#define TASK_PT_FR11 ", struct task_struct, thread.regs.fr[11]);
|
100 |
|
|
offset("#define TASK_PT_FR12 ", struct task_struct, thread.regs.fr[12]);
|
101 |
|
|
offset("#define TASK_PT_FR13 ", struct task_struct, thread.regs.fr[13]);
|
102 |
|
|
offset("#define TASK_PT_FR14 ", struct task_struct, thread.regs.fr[14]);
|
103 |
|
|
offset("#define TASK_PT_FR15 ", struct task_struct, thread.regs.fr[15]);
|
104 |
|
|
offset("#define TASK_PT_FR16 ", struct task_struct, thread.regs.fr[16]);
|
105 |
|
|
offset("#define TASK_PT_FR17 ", struct task_struct, thread.regs.fr[17]);
|
106 |
|
|
offset("#define TASK_PT_FR18 ", struct task_struct, thread.regs.fr[18]);
|
107 |
|
|
offset("#define TASK_PT_FR19 ", struct task_struct, thread.regs.fr[19]);
|
108 |
|
|
offset("#define TASK_PT_FR20 ", struct task_struct, thread.regs.fr[20]);
|
109 |
|
|
offset("#define TASK_PT_FR21 ", struct task_struct, thread.regs.fr[21]);
|
110 |
|
|
offset("#define TASK_PT_FR22 ", struct task_struct, thread.regs.fr[22]);
|
111 |
|
|
offset("#define TASK_PT_FR23 ", struct task_struct, thread.regs.fr[23]);
|
112 |
|
|
offset("#define TASK_PT_FR24 ", struct task_struct, thread.regs.fr[24]);
|
113 |
|
|
offset("#define TASK_PT_FR25 ", struct task_struct, thread.regs.fr[25]);
|
114 |
|
|
offset("#define TASK_PT_FR26 ", struct task_struct, thread.regs.fr[26]);
|
115 |
|
|
offset("#define TASK_PT_FR27 ", struct task_struct, thread.regs.fr[27]);
|
116 |
|
|
offset("#define TASK_PT_FR28 ", struct task_struct, thread.regs.fr[28]);
|
117 |
|
|
offset("#define TASK_PT_FR29 ", struct task_struct, thread.regs.fr[29]);
|
118 |
|
|
offset("#define TASK_PT_FR30 ", struct task_struct, thread.regs.fr[30]);
|
119 |
|
|
offset("#define TASK_PT_FR31 ", struct task_struct, thread.regs.fr[31]);
|
120 |
|
|
offset("#define TASK_PT_SR0 ", struct task_struct, thread.regs.sr[ 0]);
|
121 |
|
|
offset("#define TASK_PT_SR1 ", struct task_struct, thread.regs.sr[ 1]);
|
122 |
|
|
offset("#define TASK_PT_SR2 ", struct task_struct, thread.regs.sr[ 2]);
|
123 |
|
|
offset("#define TASK_PT_SR3 ", struct task_struct, thread.regs.sr[ 3]);
|
124 |
|
|
offset("#define TASK_PT_SR4 ", struct task_struct, thread.regs.sr[ 4]);
|
125 |
|
|
offset("#define TASK_PT_SR5 ", struct task_struct, thread.regs.sr[ 5]);
|
126 |
|
|
offset("#define TASK_PT_SR6 ", struct task_struct, thread.regs.sr[ 6]);
|
127 |
|
|
offset("#define TASK_PT_SR7 ", struct task_struct, thread.regs.sr[ 7]);
|
128 |
|
|
offset("#define TASK_PT_IASQ0 ", struct task_struct, thread.regs.iasq[0]);
|
129 |
|
|
offset("#define TASK_PT_IASQ1 ", struct task_struct, thread.regs.iasq[1]);
|
130 |
|
|
offset("#define TASK_PT_IAOQ0 ", struct task_struct, thread.regs.iaoq[0]);
|
131 |
|
|
offset("#define TASK_PT_IAOQ1 ", struct task_struct, thread.regs.iaoq[1]);
|
132 |
|
|
offset("#define TASK_PT_CR27 ", struct task_struct, thread.regs.cr27);
|
133 |
|
|
offset("#define TASK_PT_ORIG_R28 ", struct task_struct, thread.regs.orig_r28);
|
134 |
|
|
offset("#define TASK_PT_KSP ", struct task_struct, thread.regs.ksp);
|
135 |
|
|
offset("#define TASK_PT_KPC ", struct task_struct, thread.regs.kpc);
|
136 |
|
|
offset("#define TASK_PT_SAR ", struct task_struct, thread.regs.sar);
|
137 |
|
|
offset("#define TASK_PT_IIR ", struct task_struct, thread.regs.iir);
|
138 |
|
|
offset("#define TASK_PT_ISR ", struct task_struct, thread.regs.isr);
|
139 |
|
|
offset("#define TASK_PT_IOR ", struct task_struct, thread.regs.ior);
|
140 |
|
|
size("#define TASK_SZ ", struct task_struct);
|
141 |
|
|
size_align("#define TASK_SZ_ALGN ", struct task_struct, 64);
|
142 |
|
|
linefeed;
|
143 |
|
|
}
|
144 |
|
|
|
145 |
|
|
void output_ptreg_defines(void)
|
146 |
|
|
{
|
147 |
|
|
text("/* PA-RISC pt_regs offsets. */");
|
148 |
|
|
offset("#define PT_PSW ", struct pt_regs, gr[ 0]);
|
149 |
|
|
offset("#define PT_GR1 ", struct pt_regs, gr[ 1]);
|
150 |
|
|
offset("#define PT_GR2 ", struct pt_regs, gr[ 2]);
|
151 |
|
|
offset("#define PT_GR3 ", struct pt_regs, gr[ 3]);
|
152 |
|
|
offset("#define PT_GR4 ", struct pt_regs, gr[ 4]);
|
153 |
|
|
offset("#define PT_GR5 ", struct pt_regs, gr[ 5]);
|
154 |
|
|
offset("#define PT_GR6 ", struct pt_regs, gr[ 6]);
|
155 |
|
|
offset("#define PT_GR7 ", struct pt_regs, gr[ 7]);
|
156 |
|
|
offset("#define PT_GR8 ", struct pt_regs, gr[ 8]);
|
157 |
|
|
offset("#define PT_GR9 ", struct pt_regs, gr[ 9]);
|
158 |
|
|
offset("#define PT_GR10 ", struct pt_regs, gr[10]);
|
159 |
|
|
offset("#define PT_GR11 ", struct pt_regs, gr[11]);
|
160 |
|
|
offset("#define PT_GR12 ", struct pt_regs, gr[12]);
|
161 |
|
|
offset("#define PT_GR13 ", struct pt_regs, gr[13]);
|
162 |
|
|
offset("#define PT_GR14 ", struct pt_regs, gr[14]);
|
163 |
|
|
offset("#define PT_GR15 ", struct pt_regs, gr[15]);
|
164 |
|
|
offset("#define PT_GR16 ", struct pt_regs, gr[16]);
|
165 |
|
|
offset("#define PT_GR17 ", struct pt_regs, gr[17]);
|
166 |
|
|
offset("#define PT_GR18 ", struct pt_regs, gr[18]);
|
167 |
|
|
offset("#define PT_GR19 ", struct pt_regs, gr[19]);
|
168 |
|
|
offset("#define PT_GR20 ", struct pt_regs, gr[20]);
|
169 |
|
|
offset("#define PT_GR21 ", struct pt_regs, gr[21]);
|
170 |
|
|
offset("#define PT_GR22 ", struct pt_regs, gr[22]);
|
171 |
|
|
offset("#define PT_GR23 ", struct pt_regs, gr[23]);
|
172 |
|
|
offset("#define PT_GR24 ", struct pt_regs, gr[24]);
|
173 |
|
|
offset("#define PT_GR25 ", struct pt_regs, gr[25]);
|
174 |
|
|
offset("#define PT_GR26 ", struct pt_regs, gr[26]);
|
175 |
|
|
offset("#define PT_GR27 ", struct pt_regs, gr[27]);
|
176 |
|
|
offset("#define PT_GR28 ", struct pt_regs, gr[28]);
|
177 |
|
|
offset("#define PT_GR29 ", struct pt_regs, gr[29]);
|
178 |
|
|
offset("#define PT_GR30 ", struct pt_regs, gr[30]);
|
179 |
|
|
offset("#define PT_GR31 ", struct pt_regs, gr[31]);
|
180 |
|
|
offset("#define PT_FR0 ", struct pt_regs, fr[ 0]);
|
181 |
|
|
offset("#define PT_FR1 ", struct pt_regs, fr[ 1]);
|
182 |
|
|
offset("#define PT_FR2 ", struct pt_regs, fr[ 2]);
|
183 |
|
|
offset("#define PT_FR3 ", struct pt_regs, fr[ 3]);
|
184 |
|
|
offset("#define PT_FR4 ", struct pt_regs, fr[ 4]);
|
185 |
|
|
offset("#define PT_FR5 ", struct pt_regs, fr[ 5]);
|
186 |
|
|
offset("#define PT_FR6 ", struct pt_regs, fr[ 6]);
|
187 |
|
|
offset("#define PT_FR7 ", struct pt_regs, fr[ 7]);
|
188 |
|
|
offset("#define PT_FR8 ", struct pt_regs, fr[ 8]);
|
189 |
|
|
offset("#define PT_FR9 ", struct pt_regs, fr[ 9]);
|
190 |
|
|
offset("#define PT_FR10 ", struct pt_regs, fr[10]);
|
191 |
|
|
offset("#define PT_FR11 ", struct pt_regs, fr[11]);
|
192 |
|
|
offset("#define PT_FR12 ", struct pt_regs, fr[12]);
|
193 |
|
|
offset("#define PT_FR13 ", struct pt_regs, fr[13]);
|
194 |
|
|
offset("#define PT_FR14 ", struct pt_regs, fr[14]);
|
195 |
|
|
offset("#define PT_FR15 ", struct pt_regs, fr[15]);
|
196 |
|
|
offset("#define PT_FR16 ", struct pt_regs, fr[16]);
|
197 |
|
|
offset("#define PT_FR17 ", struct pt_regs, fr[17]);
|
198 |
|
|
offset("#define PT_FR18 ", struct pt_regs, fr[18]);
|
199 |
|
|
offset("#define PT_FR19 ", struct pt_regs, fr[19]);
|
200 |
|
|
offset("#define PT_FR20 ", struct pt_regs, fr[20]);
|
201 |
|
|
offset("#define PT_FR21 ", struct pt_regs, fr[21]);
|
202 |
|
|
offset("#define PT_FR22 ", struct pt_regs, fr[22]);
|
203 |
|
|
offset("#define PT_FR23 ", struct pt_regs, fr[23]);
|
204 |
|
|
offset("#define PT_FR24 ", struct pt_regs, fr[24]);
|
205 |
|
|
offset("#define PT_FR25 ", struct pt_regs, fr[25]);
|
206 |
|
|
offset("#define PT_FR26 ", struct pt_regs, fr[26]);
|
207 |
|
|
offset("#define PT_FR27 ", struct pt_regs, fr[27]);
|
208 |
|
|
offset("#define PT_FR28 ", struct pt_regs, fr[28]);
|
209 |
|
|
offset("#define PT_FR29 ", struct pt_regs, fr[29]);
|
210 |
|
|
offset("#define PT_FR30 ", struct pt_regs, fr[30]);
|
211 |
|
|
offset("#define PT_FR31 ", struct pt_regs, fr[31]);
|
212 |
|
|
offset("#define PT_SR0 ", struct pt_regs, sr[ 0]);
|
213 |
|
|
offset("#define PT_SR1 ", struct pt_regs, sr[ 1]);
|
214 |
|
|
offset("#define PT_SR2 ", struct pt_regs, sr[ 2]);
|
215 |
|
|
offset("#define PT_SR3 ", struct pt_regs, sr[ 3]);
|
216 |
|
|
offset("#define PT_SR4 ", struct pt_regs, sr[ 4]);
|
217 |
|
|
offset("#define PT_SR5 ", struct pt_regs, sr[ 5]);
|
218 |
|
|
offset("#define PT_SR6 ", struct pt_regs, sr[ 6]);
|
219 |
|
|
offset("#define PT_SR7 ", struct pt_regs, sr[ 7]);
|
220 |
|
|
offset("#define PT_IASQ0 ", struct pt_regs, iasq[0]);
|
221 |
|
|
offset("#define PT_IASQ1 ", struct pt_regs, iasq[1]);
|
222 |
|
|
offset("#define PT_IAOQ0 ", struct pt_regs, iaoq[0]);
|
223 |
|
|
offset("#define PT_IAOQ1 ", struct pt_regs, iaoq[1]);
|
224 |
|
|
offset("#define PT_CR27 ", struct pt_regs, cr27);
|
225 |
|
|
offset("#define PT_ORIG_R28 ", struct pt_regs, orig_r28);
|
226 |
|
|
offset("#define PT_KSP ", struct pt_regs, ksp);
|
227 |
|
|
offset("#define PT_KPC ", struct pt_regs, kpc);
|
228 |
|
|
offset("#define PT_SAR ", struct pt_regs, sar);
|
229 |
|
|
offset("#define PT_IIR ", struct pt_regs, iir);
|
230 |
|
|
offset("#define PT_ISR ", struct pt_regs, isr);
|
231 |
|
|
offset("#define PT_IOR ", struct pt_regs, ior);
|
232 |
|
|
size("#define PT_SIZE ", struct pt_regs);
|
233 |
|
|
size_align("#define PT_SZ_ALGN ", struct pt_regs, 64);
|
234 |
|
|
linefeed;
|
235 |
|
|
}
|
236 |
|
|
|
237 |
|
|
void output_task_defines(void)
|
238 |
|
|
{
|
239 |
|
|
text("/* PARISC task_struct offsets. */");
|
240 |
|
|
offset("#define TASK_STATE ", struct task_struct, state);
|
241 |
|
|
offset("#define TASK_FLAGS ", struct task_struct, flags);
|
242 |
|
|
offset("#define TASK_SIGPENDING ", struct task_struct, sigpending);
|
243 |
|
|
offset("#define TASK_SEGMENT ", struct task_struct, addr_limit);
|
244 |
|
|
offset("#define TASK_NEED_RESCHED ", struct task_struct, need_resched);
|
245 |
|
|
offset("#define TASK_COUNTER ", struct task_struct, counter);
|
246 |
|
|
offset("#define TASK_PTRACE ", struct task_struct, ptrace);
|
247 |
|
|
offset("#define TASK_NICE ", struct task_struct, nice);
|
248 |
|
|
offset("#define TASK_MM ", struct task_struct, mm);
|
249 |
|
|
offset("#define TASK_PROCESSOR ", struct task_struct, processor);
|
250 |
|
|
offset("#define TASK_PERSONALITY ", struct task_struct, personality);
|
251 |
|
|
size ("#define TASK_SZ ", struct task_struct);
|
252 |
|
|
size_align("#define TASK_SZ_ALGN ", struct task_struct, 64);
|
253 |
|
|
linefeed;
|
254 |
|
|
}
|
255 |
|
|
|
256 |
|
|
void output_irq_stat_defines(void)
|
257 |
|
|
{
|
258 |
|
|
text("/* PARISC irq_cpustat_t offsets. */");
|
259 |
|
|
offset("#define IRQSTAT_SIRQ_PEND ", irq_cpustat_t, __softirq_pending);
|
260 |
|
|
size ("#define IRQSTAT_SZ ", irq_cpustat_t);
|
261 |
|
|
linefeed;
|
262 |
|
|
}
|
263 |
|
|
|
264 |
|
|
void output_cache_info_defines(void)
|
265 |
|
|
{
|
266 |
|
|
text("/* PARISC pdc_cache_info offsets. */");
|
267 |
|
|
offset("#define ICACHE_BASE ", struct pdc_cache_info, ic_base);
|
268 |
|
|
offset("#define ICACHE_STRIDE ", struct pdc_cache_info, ic_stride);
|
269 |
|
|
offset("#define ICACHE_COUNT ", struct pdc_cache_info, ic_count);
|
270 |
|
|
offset("#define ICACHE_LOOP ", struct pdc_cache_info, ic_loop);
|
271 |
|
|
offset("#define DCACHE_BASE ", struct pdc_cache_info, dc_base);
|
272 |
|
|
offset("#define DCACHE_STRIDE ", struct pdc_cache_info, dc_stride);
|
273 |
|
|
offset("#define DCACHE_COUNT ", struct pdc_cache_info, dc_count);
|
274 |
|
|
offset("#define DCACHE_LOOP ", struct pdc_cache_info, dc_loop);
|
275 |
|
|
offset("#define ITLB_SID_BASE ", struct pdc_cache_info, it_sp_base);
|
276 |
|
|
offset("#define ITLB_SID_STRIDE ", struct pdc_cache_info, it_sp_stride);
|
277 |
|
|
offset("#define ITLB_SID_COUNT ", struct pdc_cache_info, it_sp_count);
|
278 |
|
|
offset("#define ITLB_OFF_BASE ", struct pdc_cache_info, it_off_base);
|
279 |
|
|
offset("#define ITLB_OFF_STRIDE ", struct pdc_cache_info, it_off_stride);
|
280 |
|
|
offset("#define ITLB_OFF_COUNT ", struct pdc_cache_info, it_off_count);
|
281 |
|
|
offset("#define ITLB_LOOP ", struct pdc_cache_info, it_loop);
|
282 |
|
|
offset("#define DTLB_SID_BASE ", struct pdc_cache_info, dt_sp_base);
|
283 |
|
|
offset("#define DTLB_SID_STRIDE ", struct pdc_cache_info, dt_sp_stride);
|
284 |
|
|
offset("#define DTLB_SID_COUNT ", struct pdc_cache_info, dt_sp_count);
|
285 |
|
|
offset("#define DTLB_OFF_BASE ", struct pdc_cache_info, dt_off_base);
|
286 |
|
|
offset("#define DTLB_OFF_STRIDE ", struct pdc_cache_info, dt_off_stride);
|
287 |
|
|
offset("#define DTLB_OFF_COUNT ", struct pdc_cache_info, dt_off_count);
|
288 |
|
|
offset("#define DTLB_LOOP ", struct pdc_cache_info, dt_loop);
|
289 |
|
|
linefeed;
|
290 |
|
|
}
|
291 |
|
|
|
292 |
|
|
#ifdef PRUMPF_HAD_MORE_TIME
|
293 |
|
|
void output_thread_defines(void)
|
294 |
|
|
{
|
295 |
|
|
text("/* PARISC specific thread_struct offsets. */");
|
296 |
|
|
offset("#define THREAD_REG16 ", struct task_struct, thread.reg16);
|
297 |
|
|
offset("#define THREAD_REG17 ", struct task_struct, thread.reg17);
|
298 |
|
|
offset("#define THREAD_REG18 ", struct task_struct, thread.reg18);
|
299 |
|
|
offset("#define THREAD_REG19 ", struct task_struct, thread.reg19);
|
300 |
|
|
offset("#define THREAD_REG20 ", struct task_struct, thread.reg20);
|
301 |
|
|
offset("#define THREAD_REG21 ", struct task_struct, thread.reg21);
|
302 |
|
|
offset("#define THREAD_REG22 ", struct task_struct, thread.reg22);
|
303 |
|
|
offset("#define THREAD_REG23 ", struct task_struct, thread.reg23);
|
304 |
|
|
offset("#define THREAD_REG29 ", struct task_struct, thread.reg29);
|
305 |
|
|
offset("#define THREAD_REG30 ", struct task_struct, thread.reg30);
|
306 |
|
|
offset("#define THREAD_REG31 ", struct task_struct, thread.reg31);
|
307 |
|
|
offset("#define THREAD_STATUS ", struct task_struct, thread.cp0_status);
|
308 |
|
|
offset("#define THREAD_FPU ", struct task_struct, thread.fpu);
|
309 |
|
|
offset("#define THREAD_BVADDR ", struct task_struct, thread.cp0_badvaddr);
|
310 |
|
|
offset("#define THREAD_BUADDR ", struct task_struct, thread.cp0_baduaddr);
|
311 |
|
|
offset("#define THREAD_ECODE ", struct task_struct, thread.error_code);
|
312 |
|
|
offset("#define THREAD_TRAPNO ", struct task_struct, thread.trap_no);
|
313 |
|
|
offset("#define THREAD_PGDIR ", struct task_struct, thread.pg_dir);
|
314 |
|
|
offset("#define THREAD_MFLAGS ", struct task_struct, thread.mflags);
|
315 |
|
|
offset("#define THREAD_CURDS ", struct task_struct, thread.current_ds);
|
316 |
|
|
offset("#define THREAD_TRAMP ", struct task_struct, thread.irix_trampoline);
|
317 |
|
|
offset("#define THREAD_OLDCTX ", struct task_struct, thread.irix_oldctx);
|
318 |
|
|
linefeed;
|
319 |
|
|
}
|
320 |
|
|
|
321 |
|
|
void output_mm_defines(void)
|
322 |
|
|
{
|
323 |
|
|
text("/* Linux mm_struct offsets. */");
|
324 |
|
|
offset("#define MM_COUNT ", struct mm_struct, count);
|
325 |
|
|
offset("#define MM_PGD ", struct mm_struct, pgd);
|
326 |
|
|
offset("#define MM_CONTEXT ", struct mm_struct, context);
|
327 |
|
|
linefeed;
|
328 |
|
|
}
|
329 |
|
|
|
330 |
|
|
void output_sc_defines(void)
|
331 |
|
|
{
|
332 |
|
|
text("/* Linux sigcontext offsets. */");
|
333 |
|
|
offset("#define SC_REGMASK ", struct sigcontext, sc_regmask);
|
334 |
|
|
offset("#define SC_STATUS ", struct sigcontext, sc_status);
|
335 |
|
|
offset("#define SC_PC ", struct sigcontext, sc_pc);
|
336 |
|
|
offset("#define SC_REGS ", struct sigcontext, sc_regs);
|
337 |
|
|
offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs);
|
338 |
|
|
offset("#define SC_OWNEDFP ", struct sigcontext, sc_ownedfp);
|
339 |
|
|
offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr);
|
340 |
|
|
offset("#define SC_FPC_EIR ", struct sigcontext, sc_fpc_eir);
|
341 |
|
|
offset("#define SC_SSFLAGS ", struct sigcontext, sc_ssflags);
|
342 |
|
|
offset("#define SC_MDHI ", struct sigcontext, sc_mdhi);
|
343 |
|
|
offset("#define SC_MDLO ", struct sigcontext, sc_mdlo);
|
344 |
|
|
offset("#define SC_CAUSE ", struct sigcontext, sc_cause);
|
345 |
|
|
offset("#define SC_BADVADDR ", struct sigcontext, sc_badvaddr);
|
346 |
|
|
offset("#define SC_SIGSET ", struct sigcontext, sc_sigset);
|
347 |
|
|
linefeed;
|
348 |
|
|
}
|
349 |
|
|
|
350 |
|
|
#endif
|
351 |
|
|
|
352 |
|
|
text("#endif /* !(_PARISC_OFFSET_H) */");
|