2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
28 * genassym.c is used to produce an
29 * assembly file which, intermingled with unuseful assembly code,
30 * has all the necessary definitions emitted. This assembly file is
31 * then postprocessed with sed to extract only these definitions
32 * and thus the final assyms.s is created.
34 * This convoluted means is necessary since the structure alignment
35 * and packing may be different between the host machine and the
36 * target so we are forced into using the cross compiler to generate
37 * the values, but we cannot run anything on the target machine.
44 #include <kern/task.h>
45 #include <kern/thread.h>
46 #include <kern/thread_act.h>
47 #include <kern/host.h>
48 #include <kern/lock.h>
49 #include <kern/processor.h>
50 #include <ppc/exception.h>
51 #include <ppc/thread_act.h>
52 #include <ppc/misc_protos.h>
53 #include <kern/syscall_sw.h>
55 #include <ppc/low_trace.h>
56 #include <ppc/PseudoKernel.h>
57 #include <ppc/mappings.h>
58 #include <ppc/Firmware.h>
59 #include <ppc/low_trace.h>
60 #include <vm/vm_map.h>
63 #include <ppc/pmap_internals.h>
64 #include <ppc/Diagnostics.h>
65 #include <ppc/POWERMAC/mp/MPPlugIn.h>
66 #include <pexpert/pexpert.h>
67 #include <mach/machine.h>
68 #include <ppc/vmachmon.h>
69 #include <ppc/PPCcalls.h>
72 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE)0)->MEMBER)
74 #define DECLARE(SYM,VAL) \
75 __asm("#DEFINITION##define\t" SYM "\t%0" : : "n" ((u_int)(VAL)))
77 int main(int argc
, char *argv
[])
79 /* Process Control Block */
81 DECLARE("PCB_FLOAT_STATE", offsetof(struct pcb
*, fs
));
83 /* Floating point state */
85 DECLARE("PCB_FS_F0", offsetof(struct pcb
*, fs
.fpregs
[0]));
86 DECLARE("PCB_FS_F1", offsetof(struct pcb
*, fs
.fpregs
[1]));
87 DECLARE("PCB_FS_F2", offsetof(struct pcb
*, fs
.fpregs
[2]));
88 DECLARE("PCB_FS_F3", offsetof(struct pcb
*, fs
.fpregs
[3]));
89 DECLARE("PCB_FS_F4", offsetof(struct pcb
*, fs
.fpregs
[4]));
90 DECLARE("PCB_FS_F5", offsetof(struct pcb
*, fs
.fpregs
[5]));
91 DECLARE("PCB_FS_F6", offsetof(struct pcb
*, fs
.fpregs
[6]));
92 DECLARE("PCB_FS_F7", offsetof(struct pcb
*, fs
.fpregs
[7]));
93 DECLARE("PCB_FS_F8", offsetof(struct pcb
*, fs
.fpregs
[8]));
94 DECLARE("PCB_FS_F9", offsetof(struct pcb
*, fs
.fpregs
[9]));
95 DECLARE("PCB_FS_F10", offsetof(struct pcb
*, fs
.fpregs
[10]));
96 DECLARE("PCB_FS_F11", offsetof(struct pcb
*, fs
.fpregs
[11]));
97 DECLARE("PCB_FS_F12", offsetof(struct pcb
*, fs
.fpregs
[12]));
98 DECLARE("PCB_FS_F13", offsetof(struct pcb
*, fs
.fpregs
[13]));
99 DECLARE("PCB_FS_F14", offsetof(struct pcb
*, fs
.fpregs
[14]));
100 DECLARE("PCB_FS_F15", offsetof(struct pcb
*, fs
.fpregs
[15]));
101 DECLARE("PCB_FS_F16", offsetof(struct pcb
*, fs
.fpregs
[16]));
102 DECLARE("PCB_FS_F17", offsetof(struct pcb
*, fs
.fpregs
[17]));
103 DECLARE("PCB_FS_F18", offsetof(struct pcb
*, fs
.fpregs
[18]));
104 DECLARE("PCB_FS_F19", offsetof(struct pcb
*, fs
.fpregs
[19]));
105 DECLARE("PCB_FS_F20", offsetof(struct pcb
*, fs
.fpregs
[20]));
106 DECLARE("PCB_FS_F21", offsetof(struct pcb
*, fs
.fpregs
[21]));
107 DECLARE("PCB_FS_F22", offsetof(struct pcb
*, fs
.fpregs
[22]));
108 DECLARE("PCB_FS_F23", offsetof(struct pcb
*, fs
.fpregs
[23]));
109 DECLARE("PCB_FS_F24", offsetof(struct pcb
*, fs
.fpregs
[24]));
110 DECLARE("PCB_FS_F25", offsetof(struct pcb
*, fs
.fpregs
[25]));
111 DECLARE("PCB_FS_F26", offsetof(struct pcb
*, fs
.fpregs
[26]));
112 DECLARE("PCB_FS_F27", offsetof(struct pcb
*, fs
.fpregs
[27]));
113 DECLARE("PCB_FS_F28", offsetof(struct pcb
*, fs
.fpregs
[28]));
114 DECLARE("PCB_FS_F29", offsetof(struct pcb
*, fs
.fpregs
[29]));
115 DECLARE("PCB_FS_F30", offsetof(struct pcb
*, fs
.fpregs
[30]));
116 DECLARE("PCB_FS_F31", offsetof(struct pcb
*, fs
.fpregs
[31]));
117 DECLARE("PCB_FS_FPSCR", offsetof(struct pcb
*, fs
.fpscr_pad
));
119 DECLARE("PCB_SAVED_STATE",offsetof(struct pcb
*, ss
));
120 DECLARE("ACT_MACT_KSP", offsetof(struct thread_activation
*, mact
.ksp
));
121 DECLARE("ACT_MACT_BEDA", offsetof(struct thread_activation
*, mact
.bbDescAddr
));
122 DECLARE("ACT_MACT_BTS", offsetof(struct thread_activation
*, mact
.bbTableStart
));
123 DECLARE("ACT_MACT_BTE", offsetof(struct thread_activation
*, mact
.bbTaskEnv
));
124 DECLARE("ACT_MACT_SPF", offsetof(struct thread_activation
*, mact
.specFlags
));
125 DECLARE("qactTimer", offsetof(struct thread_activation
*, mact
.qactTimer
));
126 DECLARE("floatUsed", floatUsed
);
127 DECLARE("vectorUsed", vectorUsed
);
128 DECLARE("bbNoMachSCbit",bbNoMachSCbit
);
129 DECLARE("runningVM", runningVM
);
130 DECLARE("floatCng", floatCng
);
131 DECLARE("vectorCng", vectorCng
);
132 DECLARE("floatCngbit", floatCngbit
);
133 DECLARE("vectorCngbit", vectorCngbit
);
134 DECLARE("bbThreadbit", bbThreadbit
);
135 DECLARE("bbPreemptivebit", bbPreemptivebit
);
136 DECLARE("bbThread", bbThread
);
137 DECLARE("bbPreemptive", bbPreemptive
);
138 DECLARE("fvChkb", fvChkb
);
139 DECLARE("fvChk", fvChk
);
140 DECLARE("userProtKeybit", userProtKeybit
);
141 DECLARE("userProtKey", userProtKey
);
143 DECLARE("PCB_SIZE", sizeof(struct pcb
));
145 /* Save State Structure */
146 DECLARE("SS_R0", offsetof(struct ppc_saved_state
*, r0
));
147 DECLARE("SS_R1", offsetof(struct ppc_saved_state
*, r1
));
148 DECLARE("SS_R2", offsetof(struct ppc_saved_state
*, r2
));
149 DECLARE("SS_R3", offsetof(struct ppc_saved_state
*, r3
));
150 DECLARE("SS_R4", offsetof(struct ppc_saved_state
*, r4
));
151 DECLARE("SS_R5", offsetof(struct ppc_saved_state
*, r5
));
152 DECLARE("SS_R6", offsetof(struct ppc_saved_state
*, r6
));
153 DECLARE("SS_R7", offsetof(struct ppc_saved_state
*, r7
));
154 DECLARE("SS_R8", offsetof(struct ppc_saved_state
*, r8
));
155 DECLARE("SS_R9", offsetof(struct ppc_saved_state
*, r9
));
156 DECLARE("SS_R10", offsetof(struct ppc_saved_state
*, r10
));
157 DECLARE("SS_R11", offsetof(struct ppc_saved_state
*, r11
));
158 DECLARE("SS_R12", offsetof(struct ppc_saved_state
*, r12
));
159 DECLARE("SS_R13", offsetof(struct ppc_saved_state
*, r13
));
160 DECLARE("SS_R14", offsetof(struct ppc_saved_state
*, r14
));
161 DECLARE("SS_R15", offsetof(struct ppc_saved_state
*, r15
));
162 DECLARE("SS_R16", offsetof(struct ppc_saved_state
*, r16
));
163 DECLARE("SS_R17", offsetof(struct ppc_saved_state
*, r17
));
164 DECLARE("SS_R18", offsetof(struct ppc_saved_state
*, r18
));
165 DECLARE("SS_R19", offsetof(struct ppc_saved_state
*, r19
));
166 DECLARE("SS_R20", offsetof(struct ppc_saved_state
*, r20
));
167 DECLARE("SS_R21", offsetof(struct ppc_saved_state
*, r21
));
168 DECLARE("SS_R22", offsetof(struct ppc_saved_state
*, r22
));
169 DECLARE("SS_R23", offsetof(struct ppc_saved_state
*, r23
));
170 DECLARE("SS_R24", offsetof(struct ppc_saved_state
*, r24
));
171 DECLARE("SS_R25", offsetof(struct ppc_saved_state
*, r25
));
172 DECLARE("SS_R26", offsetof(struct ppc_saved_state
*, r26
));
173 DECLARE("SS_R27", offsetof(struct ppc_saved_state
*, r27
));
174 DECLARE("SS_R28", offsetof(struct ppc_saved_state
*, r28
));
175 DECLARE("SS_R29", offsetof(struct ppc_saved_state
*, r29
));
176 DECLARE("SS_R30", offsetof(struct ppc_saved_state
*, r30
));
177 DECLARE("SS_R31", offsetof(struct ppc_saved_state
*, r31
));
178 DECLARE("SS_CR", offsetof(struct ppc_saved_state
*, cr
));
179 DECLARE("SS_XER", offsetof(struct ppc_saved_state
*, xer
));
180 DECLARE("SS_LR", offsetof(struct ppc_saved_state
*, lr
));
181 DECLARE("SS_CTR", offsetof(struct ppc_saved_state
*, ctr
));
182 DECLARE("SS_SRR0", offsetof(struct ppc_saved_state
*, srr0
));
183 DECLARE("SS_SRR1", offsetof(struct ppc_saved_state
*, srr1
));
184 DECLARE("SS_MQ", offsetof(struct ppc_saved_state
*, mq
));
185 DECLARE("SS_SR_COPYIN", offsetof(struct ppc_saved_state
*, sr_copyin
));
186 DECLARE("SS_SIZE", sizeof(struct ppc_saved_state
));
188 /* Per Proc info structure */
189 DECLARE("PP_CPU_NUMBER", offsetof(struct per_proc_info
*, cpu_number
));
190 DECLARE("PP_CPU_FLAGS", offsetof(struct per_proc_info
*, cpu_flags
));
191 DECLARE("PP_ISTACKPTR", offsetof(struct per_proc_info
*, istackptr
));
192 DECLARE("PP_INTSTACK_TOP_SS", offsetof(struct per_proc_info
*, intstack_top_ss
));
193 DECLARE("PP_DEBSTACKPTR", offsetof(struct per_proc_info
*, debstackptr
));
194 DECLARE("PP_DEBSTACK_TOP_SS", offsetof(struct per_proc_info
*, debstack_top_ss
));
195 DECLARE("PP_TEMPWORK1", offsetof(struct per_proc_info
*, tempwork1
));
196 DECLARE("PP_USERSPACE", offsetof(struct per_proc_info
*, userspace
));
197 DECLARE("PP_USERPMAP", offsetof(struct per_proc_info
*, userpmap
));
198 DECLARE("PP_LASTPMAP", offsetof(struct per_proc_info
*, Lastpmap
));
199 DECLARE("savedSave", offsetof(struct per_proc_info
*, savedSave
));
201 DECLARE("PP_SAVE_EXCEPTION_TYPE", offsetof(struct per_proc_info
*, save_exception_type
));
202 DECLARE("PP_CPU_DATA", offsetof(struct per_proc_info
*, cpu_data
));
203 DECLARE("PP_ACTIVE_KLOADED", offsetof(struct per_proc_info
*, active_kloaded
));
204 DECLARE("PP_ACTIVE_STACKS", offsetof(struct per_proc_info
*, active_stacks
));
205 DECLARE("PP_NEED_AST", offsetof(struct per_proc_info
*, need_ast
));
206 DECLARE("PP_FPU_THREAD", offsetof(struct per_proc_info
*, FPU_thread
));
207 DECLARE("FPU_vmmCtx", offsetof(struct per_proc_info
*, FPU_vmmCtx
));
208 DECLARE("PP_VMX_THREAD", offsetof(struct per_proc_info
*, VMX_thread
));
209 DECLARE("VMX_vmmCtx", offsetof(struct per_proc_info
*, VMX_vmmCtx
));
210 DECLARE("PP_QUICKFRET", offsetof(struct per_proc_info
*, quickfret
));
211 DECLARE("PP_INTS_ENABLED", offsetof(struct per_proc_info
*, interrupts_enabled
));
212 DECLARE("UAW", offsetof(struct per_proc_info
*, Uassist
));
213 DECLARE("ppbbTaskEnv", offsetof(struct per_proc_info
*, ppbbTaskEnv
));
214 DECLARE("liveVRS", offsetof(struct per_proc_info
*, liveVRSave
));
215 DECLARE("liveFPSCR", offsetof(struct per_proc_info
*, liveFPSCR
));
216 DECLARE("spcFlags", offsetof(struct per_proc_info
*, spcFlags
));
217 DECLARE("spcTRc", offsetof(struct per_proc_info
*, spcTRc
));
218 DECLARE("spcTRp", offsetof(struct per_proc_info
*, spcTRp
));
219 DECLARE("ruptStamp", offsetof(struct per_proc_info
*, ruptStamp
));
220 DECLARE("pfAvailable", offsetof(struct per_proc_info
*, pf
.Available
));
221 DECLARE("pfFloat", pfFloat
);
222 DECLARE("pfFloatb", pfFloatb
);
223 DECLARE("pfAltivec", pfAltivec
);
224 DECLARE("pfAltivecb", pfAltivecb
);
225 DECLARE("pfAvJava", pfAvJava
);
226 DECLARE("pfAvJavab", pfAvJavab
);
227 DECLARE("pfSMPcap", pfSMPcap
);
228 DECLARE("pfSMPcapb", pfSMPcapb
);
229 DECLARE("pfCanSleep", pfCanSleep
);
230 DECLARE("pfCanSleepb", pfCanSleepb
);
231 DECLARE("pfCanNap", pfCanNap
);
232 DECLARE("pfCanNapb", pfCanNapb
);
233 DECLARE("pfCanDoze", pfCanDoze
);
234 DECLARE("pfCanDozeb", pfCanDozeb
);
235 DECLARE("pfCanDoze", pfCanDoze
);
236 DECLARE("pfCanDozeb", pfCanDozeb
);
237 DECLARE("pfThermal", pfThermal
);
238 DECLARE("pfThermalb", pfThermalb
);
239 DECLARE("pfThermInt", pfThermInt
);
240 DECLARE("pfThermIntb", pfThermIntb
);
241 DECLARE("pfWillNap", pfWillNap
);
242 DECLARE("pfWillNapb", pfWillNapb
);
243 DECLARE("pfNoMSRir", pfNoMSRir
);
244 DECLARE("pfNoMSRirb", pfNoMSRirb
);
245 DECLARE("pfSlowNap", pfSlowNap
);
246 DECLARE("pfSlowNapb", pfSlowNapb
);
247 DECLARE("pfNoMuMMCK", pfNoMuMMCK
);
248 DECLARE("pfNoMuMMCKb", pfNoMuMMCKb
);
249 DECLARE("pfLClck", pfLClck
);
250 DECLARE("pfLClckb", pfLClckb
);
251 DECLARE("pfL3pdet", pfL3pdet
);
252 DECLARE("pfL3pdetb", pfL3pdetb
);
253 DECLARE("pfL1i", pfL1i
);
254 DECLARE("pfL1ib", pfL1ib
);
255 DECLARE("pfL1d", pfL1d
);
256 DECLARE("pfL1db", pfL1db
);
257 DECLARE("pfL1fa", pfL1fa
);
258 DECLARE("pfL1fab", pfL1fab
);
259 DECLARE("pfL2", pfL2
);
260 DECLARE("pfL2b", pfL2b
);
261 DECLARE("pfL2fa", pfL2fa
);
262 DECLARE("pfL2fab", pfL2fab
);
263 DECLARE("pfL2i", pfL2i
);
264 DECLARE("pfL2ib", pfL2ib
);
265 DECLARE("pfL3", pfL3
);
266 DECLARE("pfL3b", pfL3b
);
267 DECLARE("pfL3fa", pfL3fa
);
268 DECLARE("pfL3fab", pfL3fab
);
269 DECLARE("pfValid", pfValid
);
270 DECLARE("pfValidb", pfValidb
);
271 DECLARE("pfrptdProc", offsetof(struct per_proc_info
*, pf
.rptdProc
));
272 DECLARE("pflineSize", offsetof(struct per_proc_info
*, pf
.lineSize
));
273 DECLARE("pfl1iSize", offsetof(struct per_proc_info
*, pf
.l1iSize
));
274 DECLARE("pfl1dSize", offsetof(struct per_proc_info
*, pf
.l1dSize
));
275 DECLARE("pfl2cr", offsetof(struct per_proc_info
*, pf
.l2cr
));
276 DECLARE("pfl2Size", offsetof(struct per_proc_info
*, pf
.l2Size
));
277 DECLARE("pfl3cr", offsetof(struct per_proc_info
*, pf
.l3cr
));
278 DECLARE("pfl3Size", offsetof(struct per_proc_info
*, pf
.l3Size
));
279 DECLARE("pfHID0", offsetof(struct per_proc_info
*, pf
.pfHID0
));
280 DECLARE("pfHID1", offsetof(struct per_proc_info
*, pf
.pfHID1
));
281 DECLARE("pfHID2", offsetof(struct per_proc_info
*, pf
.pfHID2
));
282 DECLARE("pfHID3", offsetof(struct per_proc_info
*, pf
.pfHID3
));
283 DECLARE("pfMSSCR0", offsetof(struct per_proc_info
*, pf
.pfMSSCR0
));
284 DECLARE("pfMSSCR1", offsetof(struct per_proc_info
*, pf
.pfMSSCR1
));
285 DECLARE("pfICTRL", offsetof(struct per_proc_info
*, pf
.pfICTRL
));
286 DECLARE("pfLDSTCR", offsetof(struct per_proc_info
*, pf
.pfLDSTCR
));
287 DECLARE("pfLDSTDB", offsetof(struct per_proc_info
*, pf
.pfLDSTDB
));
288 DECLARE("pfl2crOriginal", offsetof(struct per_proc_info
*, pf
.l2crOriginal
));
289 DECLARE("pfl3crOriginal", offsetof(struct per_proc_info
*, pf
.l3crOriginal
));
290 DECLARE("pfBootConfig", offsetof(struct per_proc_info
*, pf
.pfBootConfig
));
291 DECLARE("pfSize", sizeof(procFeatures
));
293 DECLARE("thrmmaxTemp", offsetof(struct per_proc_info
*, thrm
.maxTemp
));
294 DECLARE("thrmthrottleTemp", offsetof(struct per_proc_info
*, thrm
.throttleTemp
));
295 DECLARE("thrmlowTemp", offsetof(struct per_proc_info
*, thrm
.lowTemp
));
296 DECLARE("thrmhighTemp", offsetof(struct per_proc_info
*, thrm
.highTemp
));
297 DECLARE("thrm3val", offsetof(struct per_proc_info
*, thrm
.thrm3val
));
298 DECLARE("thrmSize", sizeof(thrmControl
));
300 DECLARE("napStamp", offsetof(struct per_proc_info
*, napStamp
));
301 DECLARE("napTotal", offsetof(struct per_proc_info
*, napTotal
));
303 DECLARE("emfp0", offsetof(struct per_proc_info
*, emfp0
));
304 DECLARE("emfp1", offsetof(struct per_proc_info
*, emfp1
));
305 DECLARE("emfp2", offsetof(struct per_proc_info
*, emfp2
));
306 DECLARE("emfp3", offsetof(struct per_proc_info
*, emfp3
));
307 DECLARE("emfp4", offsetof(struct per_proc_info
*, emfp4
));
308 DECLARE("emfp5", offsetof(struct per_proc_info
*, emfp5
));
309 DECLARE("emfp6", offsetof(struct per_proc_info
*, emfp6
));
310 DECLARE("emfp7", offsetof(struct per_proc_info
*, emfp7
));
311 DECLARE("emfp8", offsetof(struct per_proc_info
*, emfp8
));
312 DECLARE("emfp9", offsetof(struct per_proc_info
*, emfp9
));
313 DECLARE("emfp10", offsetof(struct per_proc_info
*, emfp10
));
314 DECLARE("emfp11", offsetof(struct per_proc_info
*, emfp11
));
315 DECLARE("emfp12", offsetof(struct per_proc_info
*, emfp12
));
316 DECLARE("emfp13", offsetof(struct per_proc_info
*, emfp13
));
317 DECLARE("emfp14", offsetof(struct per_proc_info
*, emfp14
));
318 DECLARE("emfp15", offsetof(struct per_proc_info
*, emfp15
));
319 DECLARE("emfp16", offsetof(struct per_proc_info
*, emfp16
));
320 DECLARE("emfp17", offsetof(struct per_proc_info
*, emfp17
));
321 DECLARE("emfp18", offsetof(struct per_proc_info
*, emfp18
));
322 DECLARE("emfp19", offsetof(struct per_proc_info
*, emfp19
));
323 DECLARE("emfp20", offsetof(struct per_proc_info
*, emfp20
));
324 DECLARE("emfp21", offsetof(struct per_proc_info
*, emfp21
));
325 DECLARE("emfp22", offsetof(struct per_proc_info
*, emfp22
));
326 DECLARE("emfp23", offsetof(struct per_proc_info
*, emfp23
));
327 DECLARE("emfp24", offsetof(struct per_proc_info
*, emfp24
));
328 DECLARE("emfp25", offsetof(struct per_proc_info
*, emfp25
));
329 DECLARE("emfp26", offsetof(struct per_proc_info
*, emfp26
));
330 DECLARE("emfp27", offsetof(struct per_proc_info
*, emfp27
));
331 DECLARE("emfp28", offsetof(struct per_proc_info
*, emfp28
));
332 DECLARE("emfp29", offsetof(struct per_proc_info
*, emfp29
));
333 DECLARE("emfp30", offsetof(struct per_proc_info
*, emfp30
));
334 DECLARE("emfp31", offsetof(struct per_proc_info
*, emfp31
));
335 DECLARE("emfpscr_pad", offsetof(struct per_proc_info
*, emfpscr_pad
));
336 DECLARE("emfpscr", offsetof(struct per_proc_info
*, emfpscr
));
338 DECLARE("emvr0", offsetof(struct per_proc_info
*, emvr0
));
339 DECLARE("emvr1", offsetof(struct per_proc_info
*, emvr1
));
340 DECLARE("emvr2", offsetof(struct per_proc_info
*, emvr2
));
341 DECLARE("emvr3", offsetof(struct per_proc_info
*, emvr3
));
342 DECLARE("emvr4", offsetof(struct per_proc_info
*, emvr4
));
343 DECLARE("emvr5", offsetof(struct per_proc_info
*, emvr5
));
344 DECLARE("emvr6", offsetof(struct per_proc_info
*, emvr6
));
345 DECLARE("emvr7", offsetof(struct per_proc_info
*, emvr7
));
346 DECLARE("emvr8", offsetof(struct per_proc_info
*, emvr8
));
347 DECLARE("emvr9", offsetof(struct per_proc_info
*, emvr9
));
348 DECLARE("emvr10", offsetof(struct per_proc_info
*, emvr10
));
349 DECLARE("emvr11", offsetof(struct per_proc_info
*, emvr11
));
350 DECLARE("emvr12", offsetof(struct per_proc_info
*, emvr12
));
351 DECLARE("emvr13", offsetof(struct per_proc_info
*, emvr13
));
352 DECLARE("emvr14", offsetof(struct per_proc_info
*, emvr14
));
353 DECLARE("emvr15", offsetof(struct per_proc_info
*, emvr15
));
354 DECLARE("emvr16", offsetof(struct per_proc_info
*, emvr16
));
355 DECLARE("emvr17", offsetof(struct per_proc_info
*, emvr17
));
356 DECLARE("emvr18", offsetof(struct per_proc_info
*, emvr18
));
357 DECLARE("emvr19", offsetof(struct per_proc_info
*, emvr19
));
358 DECLARE("emvr20", offsetof(struct per_proc_info
*, emvr20
));
359 DECLARE("emvr21", offsetof(struct per_proc_info
*, emvr21
));
360 DECLARE("emvr22", offsetof(struct per_proc_info
*, emvr22
));
361 DECLARE("emvr23", offsetof(struct per_proc_info
*, emvr23
));
362 DECLARE("emvr24", offsetof(struct per_proc_info
*, emvr24
));
363 DECLARE("emvr25", offsetof(struct per_proc_info
*, emvr25
));
364 DECLARE("emvr26", offsetof(struct per_proc_info
*, emvr26
));
365 DECLARE("emvr27", offsetof(struct per_proc_info
*, emvr27
));
366 DECLARE("emvr28", offsetof(struct per_proc_info
*, emvr28
));
367 DECLARE("emvr29", offsetof(struct per_proc_info
*, emvr29
));
368 DECLARE("emvr30", offsetof(struct per_proc_info
*, emvr30
));
369 DECLARE("emvr31", offsetof(struct per_proc_info
*, emvr31
));
370 DECLARE("empadvr", offsetof(struct per_proc_info
*, empadvr
));
371 DECLARE("ppSize", sizeof(struct per_proc_info
));
372 DECLARE("patcharea", offsetof(struct per_proc_info
*, patcharea
));
374 DECLARE("RESETHANDLER_TYPE", offsetof(struct resethandler
*, type
));
375 DECLARE("RESETHANDLER_CALL", offsetof(struct resethandler
*, call_paddr
));
376 DECLARE("RESETHANDLER_ARG", offsetof(struct resethandler
*, arg__paddr
));
378 /* we want offset from
379 * bottom of kernel stack, not offset into structure
381 #define IKSBASE (u_int)STACK_IKS(0)
383 /* values from kern/thread.h */
384 DECLARE("THREAD_TOP_ACT",
385 offsetof(struct thread_shuttle
*, top_act
));
386 DECLARE("THREAD_KERNEL_STACK",
387 offsetof(struct thread_shuttle
*, kernel_stack
));
388 DECLARE("THREAD_CONTINUATION",
389 offsetof(struct thread_shuttle
*, continuation
));
390 DECLARE("THREAD_RECOVER",
391 offsetof(struct thread_shuttle
*, recover
));
393 DECLARE("THREAD_MUTEX_COUNT",
394 offsetof(struct thread_shuttle
*, mutex_count
));
395 #endif /* MACH_LDEBUG */
396 DECLARE("THREAD_PSET", offsetof(struct thread_shuttle
*, processor_set
));
397 DECLARE("THREAD_LINKS", offsetof(struct thread_shuttle
*, links
));
398 DECLARE("THREAD_PSTHRN", offsetof(struct thread_shuttle
*, pset_threads
.next
));
400 /* values from kern/thread_act.h */
401 DECLARE("ACT_TASK", offsetof(struct thread_activation
*, task
));
402 DECLARE("ACT_THREAD", offsetof(struct thread_activation
*, thread
));
403 DECLARE("ACT_LOWER", offsetof(struct thread_activation
*, lower
));
404 DECLARE("ACT_MACT_PCB",offsetof(struct thread_activation
*, mact
.pcb
));
405 DECLARE("ACT_MACT_FPU",offsetof(struct thread_activation
*, mact
.FPU_pcb
));
406 DECLARE("ACT_MACT_FPUlvl",offsetof(struct thread_activation
*, mact
.FPU_lvl
));
407 DECLARE("ACT_MACT_FPUcpu",offsetof(struct thread_activation
*, mact
.FPU_cpu
));
408 DECLARE("ACT_MACT_VMX",offsetof(struct thread_activation
*, mact
.VMX_pcb
));
409 DECLARE("ACT_MACT_VMXlvl",offsetof(struct thread_activation
*, mact
.VMX_lvl
));
410 DECLARE("ACT_MACT_VMXcpu",offsetof(struct thread_activation
*, mact
.VMX_cpu
));
411 DECLARE("ACT_AST", offsetof(struct thread_activation
*, ast
));
412 DECLARE("ACT_VMMAP", offsetof(struct thread_activation
*, map
));
413 DECLARE("runningVM", runningVM
);
414 DECLARE("runningVMbit", runningVMbit
);
415 DECLARE("ACT_KLOADED",
416 offsetof(struct thread_activation
*, kernel_loaded
));
417 DECLARE("ACT_KLOADING",
418 offsetof(struct thread_activation
*, kernel_loading
));
419 DECLARE("ACT_MACH_EXC_PORT",
420 offsetof(struct thread_activation
*,
421 exc_actions
[EXC_MACH_SYSCALL
].port
));
422 DECLARE("vmmCEntry", offsetof(struct thread_activation
*, mact
.vmmCEntry
));
423 DECLARE("vmmControl", offsetof(struct thread_activation
*, mact
.vmmControl
));
425 DECLARE("CTHREAD_SELF", offsetof(struct thread_activation
*, mact
.cthread_self
));
428 /* Values from vmachmon.h */
430 DECLARE("kVmmGetVersion", kVmmGetVersion
);
431 DECLARE("kVmmvGetFeatures", kVmmvGetFeatures
);
432 DECLARE("kVmmInitContext", kVmmInitContext
);
433 DECLARE("kVmmTearDownContext", kVmmTearDownContext
);
434 DECLARE("kVmmTearDownAll", kVmmTearDownAll
);
435 DECLARE("kVmmMapPage", kVmmMapPage
);
436 DECLARE("kVmmGetPageMapping", kVmmGetPageMapping
);
437 DECLARE("kVmmUnmapPage", kVmmUnmapPage
);
438 DECLARE("kVmmUnmapAllPages", kVmmUnmapAllPages
);
439 DECLARE("kVmmGetPageDirtyFlag", kVmmGetPageDirtyFlag
);
440 DECLARE("kVmmGetFloatState", kVmmGetFloatState
);
441 DECLARE("kVmmGetVectorState", kVmmGetVectorState
);
442 DECLARE("kVmmSetTimer", kVmmSetTimer
);
443 DECLARE("kVmmExecuteVM", kVmmExecuteVM
);
444 DECLARE("kVmmProtectPage", kVmmProtectPage
);
446 DECLARE("kVmmReturnNull", kVmmReturnNull
);
447 DECLARE("kVmmStopped", kVmmStopped
);
448 DECLARE("kVmmBogusContext", kVmmBogusContext
);
449 DECLARE("kVmmReturnDataPageFault", kVmmReturnDataPageFault
);
450 DECLARE("kVmmReturnInstrPageFault", kVmmReturnInstrPageFault
);
451 DECLARE("kVmmReturnAlignmentFault", kVmmReturnAlignmentFault
);
452 DECLARE("kVmmReturnProgramException", kVmmReturnProgramException
);
453 DECLARE("kVmmReturnSystemCall", kVmmReturnSystemCall
);
454 DECLARE("kVmmReturnTraceException", kVmmReturnTraceException
);
456 DECLARE("kVmmProtXtnd", kVmmProtXtnd
);
457 DECLARE("kVmmProtNARW", kVmmProtNARW
);
458 DECLARE("kVmmProtRORW", kVmmProtRORW
);
459 DECLARE("kVmmProtRWRW", kVmmProtRWRW
);
460 DECLARE("kVmmProtRORO", kVmmProtRORO
);
462 DECLARE("vmmFlags", offsetof(struct vmmCntrlEntry
*, vmmFlags
));
463 DECLARE("vmmInUseb", vmmInUseb
);
464 DECLARE("vmmInUse", vmmInUse
);
465 DECLARE("vmmPmap", offsetof(struct vmmCntrlEntry
*, vmmPmap
));
466 DECLARE("vmmContextKern", offsetof(struct vmmCntrlEntry
*, vmmContextKern
));
467 DECLARE("vmmContextUser", offsetof(struct vmmCntrlEntry
*, vmmContextUser
));
468 DECLARE("vmmFPU_pcb", offsetof(struct vmmCntrlEntry
*, vmmFPU_pcb
));
469 DECLARE("vmmFPU_cpu", offsetof(struct vmmCntrlEntry
*, vmmFPU_cpu
));
470 DECLARE("vmmVMX_pcb", offsetof(struct vmmCntrlEntry
*, vmmVMX_pcb
));
471 DECLARE("vmmVMX_cpu", offsetof(struct vmmCntrlEntry
*, vmmVMX_cpu
));
472 DECLARE("vmmLastMap", offsetof(struct vmmCntrlEntry
*, vmmLastMap
));
473 DECLARE("vmmCEntrySize", sizeof(struct vmmCntrlEntry
));
474 DECLARE("kVmmMaxContextsPerThread", kVmmMaxContextsPerThread
);
476 DECLARE("interface_version", offsetof(struct vmm_state_page_t
*, interface_version
));
477 DECLARE("thread_index", offsetof(struct vmm_state_page_t
*, thread_index
));
478 DECLARE("vmmStat", offsetof(struct vmm_state_page_t
*, vmmStat
));
479 DECLARE("vmmCntrl", offsetof(struct vmm_state_page_t
*, vmmCntrl
));
480 DECLARE("return_code", offsetof(struct vmm_state_page_t
*, return_code
));
481 DECLARE("return_params", offsetof(struct vmm_state_page_t
*, return_params
));
482 DECLARE("vmm_proc_state", offsetof(struct vmm_state_page_t
*, vmm_proc_state
));
483 DECLARE("return_params", offsetof(struct vmm_state_page_t
*, return_params
));
484 DECLARE("vmmppcVRs", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcVRs
));
485 DECLARE("vmmppcVSCR", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcVSCR
));
486 DECLARE("vmmppcFPRs", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcFPRs
));
487 DECLARE("vmmppcFPSCR", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcFPSCR
));
488 DECLARE("vmmFloatCngd", vmmFloatCngd
);
489 DECLARE("vmmFloatCngdb", vmmFloatCngdb
);
490 DECLARE("vmmVectCngd", vmmVectCngd
);
491 DECLARE("vmmVectCngdb", vmmVectCngdb
);
492 DECLARE("vmmTimerPop", vmmTimerPop
);
493 DECLARE("vmmTimerPopb", vmmTimerPopb
);
494 DECLARE("vmmMapDone", vmmMapDone
);
495 DECLARE("vmmMapDoneb", vmmMapDoneb
);
496 DECLARE("vmmSpfSave", vmmSpfSave
);
497 DECLARE("vmmSpfSaveb", vmmSpfSaveb
);
498 DECLARE("vmmFloatLoad", vmmFloatLoad
);
499 DECLARE("vmmFloatLoadb", vmmFloatLoadb
);
500 DECLARE("vmmVectLoad", vmmVectLoad
);
501 DECLARE("vmmVectLoadb", vmmVectLoadb
);
502 DECLARE("vmmVectVRall", vmmVectVRall
);
503 DECLARE("vmmVectVRallb", vmmVectVRallb
);
504 DECLARE("vmmVectVAss", vmmVectVAss
);
505 DECLARE("vmmVectVAssb", vmmVectVAssb
);
506 DECLARE("vmmXStart", vmmXStart
);
507 DECLARE("vmmXStartb", vmmXStartb
);
508 DECLARE("vmmXStop", vmmXStop
);
509 DECLARE("vmmXStopb", vmmXStopb
);
510 DECLARE("vmmKey", vmmKey
);
511 DECLARE("vmmKeyb", vmmKeyb
);
513 /* values from kern/task.h */
514 DECLARE("TASK_MACH_EXC_PORT",
515 offsetof(struct task
*, exc_actions
[EXC_MACH_SYSCALL
].port
));
516 DECLARE("TASK_SYSCALLS_MACH",
517 offsetof(struct task
*, syscalls_mach
));
519 /* values from vm/vm_map.h */
520 DECLARE("VMMAP_PMAP", offsetof(struct vm_map
*, pmap
));
522 /* values from machine/pmap.h */
523 DECLARE("PMAP_SPACE", offsetof(struct pmap
*, space
));
524 DECLARE("PMAP_BMAPS", offsetof(struct pmap
*, bmaps
));
525 DECLARE("PMAP_PMAPVR", offsetof(struct pmap
*, pmapvr
));
526 DECLARE("PMAP_VFLAGS", offsetof(struct pmap
*, vflags
));
527 DECLARE("PMAP_USAGE", offsetof(struct pmap
*, pmapUsage
));
528 DECLARE("PMAP_SEGS", offsetof(struct pmap
*, pmapSegs
));
529 DECLARE("PMAP_SIZE", pmapSize
);
532 /* Constants from pmap.h */
533 DECLARE("PPC_SID_KERNEL", PPC_SID_KERNEL
);
535 /* values for accessing mach_trap table */
536 DECLARE("MACH_TRAP_OFFSET_POW2", 4);
538 DECLARE("MACH_TRAP_ARGC",
539 offsetof(mach_trap_t
*, mach_trap_arg_count
));
540 DECLARE("MACH_TRAP_FUNCTION",
541 offsetof(mach_trap_t
*, mach_trap_function
));
543 DECLARE("HOST_SELF", offsetof(host_t
, host_self
));
545 DECLARE("PPCcallmax", sizeof(PPCcalls
));
547 /* values from cpu_data.h */
548 DECLARE("CPU_ACTIVE_THREAD", offsetof(cpu_data_t
*, active_thread
));
549 DECLARE("CPU_PREEMPTION_LEVEL", offsetof(cpu_data_t
*, preemption_level
));
550 DECLARE("CPU_SIMPLE_LOCK_COUNT",
551 offsetof(cpu_data_t
*, simple_lock_count
));
552 DECLARE("CPU_INTERRUPT_LEVEL",offsetof(cpu_data_t
*, interrupt_level
));
554 /* Misc values used by assembler */
555 DECLARE("AST_ALL", AST_ALL
);
556 DECLARE("AST_URGENT", AST_URGENT
);
558 /* Simple Lock structure */
559 DECLARE("SLOCK_ILK", offsetof(simple_lock_t
, interlock
));
561 DECLARE("SLOCK_TYPE", offsetof(simple_lock_t
, lock_type
));
562 DECLARE("SLOCK_PC", offsetof(simple_lock_t
, debug
.lock_pc
));
563 DECLARE("SLOCK_THREAD", offsetof(simple_lock_t
, debug
.lock_thread
));
564 DECLARE("SLOCK_DURATIONH",offsetof(simple_lock_t
, debug
.duration
[0]));
565 DECLARE("SLOCK_DURATIONL",offsetof(simple_lock_t
, debug
.duration
[1]));
566 DECLARE("USLOCK_TAG", USLOCK_TAG
);
567 #endif /* MACH_LDEBUG */
569 /* Mutex structure */
570 DECLARE("LOCK_DATA", offsetof(mutex_t
*, interlock
));
571 DECLARE("MUTEX_WAITERS",offsetof(mutex_t
*, waiters
));
573 DECLARE("MUTEX_TYPE", offsetof(mutex_t
*, type
));
574 DECLARE("MUTEX_PC", offsetof(mutex_t
*, pc
));
575 DECLARE("MUTEX_THREAD", offsetof(mutex_t
*, thread
));
576 DECLARE("MUTEX_TAG", MUTEX_TAG
);
577 #endif /* MACH_LDEBUG */
580 /* values from mp/PlugIn.h */
582 DECLARE("MPSversionID", offsetof(struct MPPlugInSpec
*, versionID
));
583 DECLARE("MPSareaAddr", offsetof(struct MPPlugInSpec
*, areaAddr
));
584 DECLARE("MPSareaSize", offsetof(struct MPPlugInSpec
*, areaSize
));
585 DECLARE("MPSoffsetTableAddr", offsetof(struct MPPlugInSpec
*, offsetTableAddr
));
586 DECLARE("MPSbaseAddr", offsetof(struct MPPlugInSpec
*, baseAddr
));
587 DECLARE("MPSdataArea", offsetof(struct MPPlugInSpec
*, dataArea
));
588 DECLARE("MPSCPUArea", offsetof(struct MPPlugInSpec
*, CPUArea
));
589 DECLARE("MPSSIGPhandler", offsetof(struct MPPlugInSpec
*, SIGPhandler
));
591 DECLARE("CSAstate", offsetof(struct CPUStatusArea
*, state
));
592 DECLARE("CSAregsAreValid", offsetof(struct CPUStatusArea
*,
594 DECLARE("CSAgpr", offsetof(struct CPUStatusArea
*, gpr
));
595 DECLARE("CSAfpr", offsetof(struct CPUStatusArea
*, fpr
));
596 DECLARE("CSAcr", offsetof(struct CPUStatusArea
*, cr
));
597 DECLARE("CSAfpscr", offsetof(struct CPUStatusArea
*, fpscr
));
598 DECLARE("CSAxer", offsetof(struct CPUStatusArea
*, xer
));
599 DECLARE("CSAlr", offsetof(struct CPUStatusArea
*, lr
));
600 DECLARE("CSActr", offsetof(struct CPUStatusArea
*, ctr
));
601 DECLARE("CSAtbu", offsetof(struct CPUStatusArea
*, tbu
));
602 DECLARE("CSAtbl", offsetof(struct CPUStatusArea
*, tbl
));
603 DECLARE("CSApvr", offsetof(struct CPUStatusArea
*, pvr
));
604 DECLARE("CSAibat", offsetof(struct CPUStatusArea
*, ibat
));
605 DECLARE("CSAdbat", offsetof(struct CPUStatusArea
*, dbat
));
606 DECLARE("CSAsdr1", offsetof(struct CPUStatusArea
*, sdr1
));
607 DECLARE("CSAsr", offsetof(struct CPUStatusArea
*, sr
));
608 DECLARE("CSAdar", offsetof(struct CPUStatusArea
*, dar
));
609 DECLARE("CSAdsisr", offsetof(struct CPUStatusArea
*, dsisr
));
610 DECLARE("CSAsprg", offsetof(struct CPUStatusArea
*, sprg
));
611 DECLARE("CSAsrr0", offsetof(struct CPUStatusArea
*, srr0
));
612 DECLARE("CSAsrr1", offsetof(struct CPUStatusArea
*, srr1
));
613 DECLARE("CSAdec", offsetof(struct CPUStatusArea
*, dec
));
614 DECLARE("CSAdabr", offsetof(struct CPUStatusArea
*, dabr
));
615 DECLARE("CSAiabr", offsetof(struct CPUStatusArea
*, iabr
));
616 DECLARE("CSAear", offsetof(struct CPUStatusArea
*, ear
));
617 DECLARE("CSAhid", offsetof(struct CPUStatusArea
*, hid
));
618 DECLARE("CSAmmcr", offsetof(struct CPUStatusArea
*, mmcr
));
619 DECLARE("CSApmc", offsetof(struct CPUStatusArea
*, pmc
));
620 DECLARE("CSApir", offsetof(struct CPUStatusArea
*, pir
));
621 DECLARE("CSAsda", offsetof(struct CPUStatusArea
*, sda
));
622 DECLARE("CSAsia", offsetof(struct CPUStatusArea
*, sia
));
623 DECLARE("CSAmq", offsetof(struct CPUStatusArea
*, mq
));
624 DECLARE("CSAmsr", offsetof(struct CPUStatusArea
*, msr
));
625 DECLARE("CSApc", offsetof(struct CPUStatusArea
*, pc
));
626 DECLARE("CSAsysregs", offsetof(struct CPUStatusArea
*, sysregs
));
627 DECLARE("CSAsize", sizeof(struct CPUStatusArea
));
630 DECLARE("MPPICStat", offsetof(struct MPPInterface
*, MPPICStat
));
631 DECLARE("MPPICParm0", offsetof(struct MPPInterface
*, MPPICParm0
));
632 DECLARE("MPPICParm1", offsetof(struct MPPInterface
*, MPPICParm1
));
633 DECLARE("MPPICParm2", offsetof(struct MPPInterface
*, MPPICParm2
));
634 DECLARE("MPPICspare0", offsetof(struct MPPInterface
*, MPPICspare0
));
635 DECLARE("MPPICspare1", offsetof(struct MPPInterface
*, MPPICspare1
));
636 DECLARE("MPPICParm0BU", offsetof(struct MPPInterface
*, MPPICParm0BU
));
637 DECLARE("MPPICPriv", offsetof(struct MPPInterface
*, MPPICPriv
));
641 #endif /* NCPUS > 1 */
643 /* values from low_trace.h */
644 DECLARE("LTR_cpu", offsetof(struct LowTraceRecord
*, LTR_cpu
));
645 DECLARE("LTR_excpt", offsetof(struct LowTraceRecord
*, LTR_excpt
));
646 DECLARE("LTR_timeHi", offsetof(struct LowTraceRecord
*, LTR_timeHi
));
647 DECLARE("LTR_timeLo", offsetof(struct LowTraceRecord
*, LTR_timeLo
));
648 DECLARE("LTR_cr", offsetof(struct LowTraceRecord
*, LTR_cr
));
649 DECLARE("LTR_srr0", offsetof(struct LowTraceRecord
*, LTR_srr0
));
650 DECLARE("LTR_srr1", offsetof(struct LowTraceRecord
*, LTR_srr1
));
651 DECLARE("LTR_dar", offsetof(struct LowTraceRecord
*, LTR_dar
));
652 DECLARE("LTR_save", offsetof(struct LowTraceRecord
*, LTR_save
));
653 DECLARE("LTR_lr", offsetof(struct LowTraceRecord
*, LTR_lr
));
654 DECLARE("LTR_ctr", offsetof(struct LowTraceRecord
*, LTR_ctr
));
655 DECLARE("LTR_r0", offsetof(struct LowTraceRecord
*, LTR_r0
));
656 DECLARE("LTR_r1", offsetof(struct LowTraceRecord
*, LTR_r1
));
657 DECLARE("LTR_r2", offsetof(struct LowTraceRecord
*, LTR_r2
));
658 DECLARE("LTR_r3", offsetof(struct LowTraceRecord
*, LTR_r3
));
659 DECLARE("LTR_r4", offsetof(struct LowTraceRecord
*, LTR_r4
));
660 DECLARE("LTR_r5", offsetof(struct LowTraceRecord
*, LTR_r5
));
661 DECLARE("LTR_size", sizeof(struct LowTraceRecord
));
663 /* Values from pexpert.h */
664 DECLARE("PECFIcpurate", offsetof(struct clock_frequency_info_t
*, cpu_clock_rate_hz
));
665 DECLARE("PECFIbusrate", offsetof(struct clock_frequency_info_t
*, bus_clock_rate_hz
));
667 /* Values from pmap_internals.h and mappings.h */
668 DECLARE("mmnext", offsetof(struct mapping
*, next
));
669 DECLARE("mmhashnext", offsetof(struct mapping
*, hashnext
));
670 DECLARE("mmPTEhash", offsetof(struct mapping
*, PTEhash
));
671 DECLARE("mmPTEent", offsetof(struct mapping
*, PTEent
));
672 DECLARE("mmPTEv", offsetof(struct mapping
*, PTEv
));
673 DECLARE("mmPTEr", offsetof(struct mapping
*, PTEr
));
674 DECLARE("mmphysent", offsetof(struct mapping
*, physent
));
675 DECLARE("mmpmap", offsetof(struct mapping
*, pmap
));
677 DECLARE("bmnext", offsetof(struct blokmap
*, next
));
678 DECLARE("bmstart", offsetof(struct blokmap
*, start
));
679 DECLARE("bmend", offsetof(struct blokmap
*, end
));
680 DECLARE("bmPTEr", offsetof(struct blokmap
*, PTEr
));
681 DECLARE("bmspace", offsetof(struct blokmap
*, space
));
682 DECLARE("blkFlags", offsetof(struct blokmap
*, blkFlags
));
683 DECLARE("blkPerm", blkPerm
);
684 DECLARE("blkPermbit", blkPermbit
);
686 DECLARE("mbvrswap", offsetof(struct mappingblok
*, mapblokvrswap
));
687 DECLARE("mbfree", offsetof(struct mappingblok
*, mapblokfree
));
688 DECLARE("mapcsize", sizeof(struct mappingctl
));
690 DECLARE("pephyslink", offsetof(struct phys_entry
*, phys_link
));
691 DECLARE("pepte1", offsetof(struct phys_entry
*, pte1
));
693 DECLARE("PCAlock", offsetof(struct PCA
*, PCAlock
));
694 DECLARE("PCAallo", offsetof(struct PCA
*, flgs
.PCAallo
));
695 DECLARE("PCAfree", offsetof(struct PCA
*, flgs
.PCAalflgs
.PCAfree
));
696 DECLARE("PCAauto", offsetof(struct PCA
*, flgs
.PCAalflgs
.PCAauto
));
697 DECLARE("PCAslck", offsetof(struct PCA
*, flgs
.PCAalflgs
.PCAslck
));
698 DECLARE("PCAsteal", offsetof(struct PCA
*, flgs
.PCAalflgs
.PCAsteal
));
699 DECLARE("PCAgas", offsetof(struct PCA
*, PCAgas
));
700 DECLARE("PCAhash", offsetof(struct PCA
*, PCAhash
));
702 DECLARE("SVlock", offsetof(struct Saveanchor
*, savelock
));
703 DECLARE("SVcount", offsetof(struct Saveanchor
*, savecount
));
704 DECLARE("SVinuse", offsetof(struct Saveanchor
*, saveinuse
));
705 DECLARE("SVmin", offsetof(struct Saveanchor
*, savemin
));
706 DECLARE("SVneghyst", offsetof(struct Saveanchor
*, saveneghyst
));
707 DECLARE("SVtarget", offsetof(struct Saveanchor
*, savetarget
));
708 DECLARE("SVposhyst", offsetof(struct Saveanchor
*, saveposhyst
));
709 DECLARE("SVfree", offsetof(struct Saveanchor
*, savefree
));
710 DECLARE("SVsize", sizeof(struct Saveanchor
));
713 DECLARE("GDsave", offsetof(struct GDWorkArea
*, GDsave
));
714 DECLARE("GDfp0", offsetof(struct GDWorkArea
*, GDfp0
));
715 DECLARE("GDfp1", offsetof(struct GDWorkArea
*, GDfp1
));
716 DECLARE("GDfp2", offsetof(struct GDWorkArea
*, GDfp2
));
717 DECLARE("GDfp3", offsetof(struct GDWorkArea
*, GDfp3
));
718 DECLARE("GDtop", offsetof(struct GDWorkArea
*, GDtop
));
719 DECLARE("GDleft", offsetof(struct GDWorkArea
*, GDleft
));
720 DECLARE("GDtopleft", offsetof(struct GDWorkArea
*, GDtopleft
));
721 DECLARE("GDrowbytes", offsetof(struct GDWorkArea
*, GDrowbytes
));
722 DECLARE("GDrowchar", offsetof(struct GDWorkArea
*, GDrowchar
));
723 DECLARE("GDdepth", offsetof(struct GDWorkArea
*, GDdepth
));
724 DECLARE("GDcollgn", offsetof(struct GDWorkArea
*, GDcollgn
));
725 DECLARE("GDready", offsetof(struct GDWorkArea
*, GDready
));
726 DECLARE("GDrowbuf1", offsetof(struct GDWorkArea
*, GDrowbuf1
));
727 DECLARE("GDrowbuf2", offsetof(struct GDWorkArea
*, GDrowbuf2
));
730 DECLARE("dgLock", offsetof(struct diagWork
*, dgLock
));
731 DECLARE("dgFlags", offsetof(struct diagWork
*, dgFlags
));
732 DECLARE("dgMisc0", offsetof(struct diagWork
*, dgMisc0
));
733 DECLARE("enaExpTrace", enaExpTrace
);
734 DECLARE("enaExpTraceb", enaExpTraceb
);
735 DECLARE("enaUsrFCall", enaUsrFCall
);
736 DECLARE("enaUsrFCallb", enaUsrFCallb
);
737 DECLARE("enaUsrPhyMp", enaUsrPhyMp
);
738 DECLARE("enaUsrPhyMpb", enaUsrPhyMpb
);
739 DECLARE("enaDiagSCs", enaDiagSCs
);
740 DECLARE("enaDiagSCsb", enaDiagSCsb
);
741 DECLARE("disLkType", disLkType
);
742 DECLARE("disLktypeb", disLktypeb
);
743 DECLARE("disLkThread", disLkThread
);
744 DECLARE("disLkThreadb", disLkThreadb
);
745 DECLARE("disLkNmSimp", disLkNmSimp
);
746 DECLARE("disLkNmSimpb", disLkNmSimpb
);
747 DECLARE("disLkMyLck", disLkMyLck
);
748 DECLARE("disLkMyLckb", disLkMyLckb
);
749 DECLARE("dgMisc1", offsetof(struct diagWork
*, dgMisc1
));
750 DECLARE("dgMisc2", offsetof(struct diagWork
*, dgMisc2
));
751 DECLARE("dgMisc3", offsetof(struct diagWork
*, dgMisc3
));
752 DECLARE("dgMisc4", offsetof(struct diagWork
*, dgMisc4
));
753 DECLARE("dgMisc5", offsetof(struct diagWork
*, dgMisc5
));
755 DECLARE("traceMask", offsetof(struct traceWork
*, traceMask
));
756 DECLARE("traceCurr", offsetof(struct traceWork
*, traceCurr
));
757 DECLARE("traceStart", offsetof(struct traceWork
*, traceStart
));
758 DECLARE("traceEnd", offsetof(struct traceWork
*, traceEnd
));
759 DECLARE("traceMsnd", offsetof(struct traceWork
*, traceMsnd
));
761 DECLARE("SACsize", sizeof(struct savectl
));
762 DECLARE("SACspot", 4096-sizeof(struct savectl
));
763 DECLARE("SACnext", offsetof(struct savectl
*, sac_next
)+4096-sizeof(struct savectl
));
764 DECLARE("SACvrswap", offsetof(struct savectl
*, sac_vrswap
)+4096-sizeof(struct savectl
));
765 DECLARE("SACalloc", offsetof(struct savectl
*, sac_alloc
)+4096-sizeof(struct savectl
));
766 DECLARE("SACflags", offsetof(struct savectl
*, sac_flags
)+4096-sizeof(struct savectl
));
768 DECLARE("SAVprev", offsetof(struct savearea
*, save_prev
));
769 DECLARE("SAVprefp", offsetof(struct savearea
*, save_prev_float
));
770 DECLARE("SAVprevec", offsetof(struct savearea
*, save_prev_vector
));
771 DECLARE("SAVphys", offsetof(struct savearea
*, save_phys
));
772 DECLARE("SAVqfret", offsetof(struct savearea
*, save_qfret
));
773 DECLARE("SAVact", offsetof(struct savearea
*, save_act
));
774 DECLARE("SAVflags", offsetof(struct savearea
*, save_flags
));
775 DECLARE("SAVlvlfp", offsetof(struct savearea
*, save_level_fp
));
776 DECLARE("SAVlvlvec", offsetof(struct savearea
*, save_level_vec
));
777 DECLARE("SAVsize", sizeof(struct savearea
));
779 DECLARE("savesrr0", offsetof(struct savearea
*, save_srr0
));
780 DECLARE("savesrr1", offsetof(struct savearea
*, save_srr1
));
781 DECLARE("savecr", offsetof(struct savearea
*, save_cr
));
782 DECLARE("savexer", offsetof(struct savearea
*, save_xer
));
783 DECLARE("savelr", offsetof(struct savearea
*, save_lr
));
784 DECLARE("savectr", offsetof(struct savearea
*, save_ctr
));
785 DECLARE("savemq", offsetof(struct savearea
*, save_mq
));
786 DECLARE("savecopyin", offsetof(struct savearea
*, save_sr_copyin
));
787 DECLARE("savedar", offsetof(struct savearea
*, save_dar
));
788 DECLARE("savedsisr", offsetof(struct savearea
*, save_dsisr
));
789 DECLARE("saveexception", offsetof(struct savearea
*, save_exception
));
790 DECLARE("savexfpscrpad", offsetof(struct savearea
*, save_xfpscrpad
));
791 DECLARE("savexfpscr", offsetof(struct savearea
*, save_xfpscr
));
792 DECLARE("savevrsave", offsetof(struct savearea
*, save_vrsave
));
794 DECLARE("saver0", offsetof(struct savearea
*, save_r0
));
795 DECLARE("saver1", offsetof(struct savearea
*, save_r1
));
796 DECLARE("saver2", offsetof(struct savearea
*, save_r2
));
797 DECLARE("saver3", offsetof(struct savearea
*, save_r3
));
798 DECLARE("saver4", offsetof(struct savearea
*, save_r4
));
799 DECLARE("saver5", offsetof(struct savearea
*, save_r5
));
800 DECLARE("saver6", offsetof(struct savearea
*, save_r6
));
801 DECLARE("saver7", offsetof(struct savearea
*, save_r7
));
802 DECLARE("saver8", offsetof(struct savearea
*, save_r8
));
803 DECLARE("saver9", offsetof(struct savearea
*, save_r9
));
804 DECLARE("saver10", offsetof(struct savearea
*, save_r10
));
805 DECLARE("saver11", offsetof(struct savearea
*, save_r11
));
806 DECLARE("saver12", offsetof(struct savearea
*, save_r12
));
807 DECLARE("saver13", offsetof(struct savearea
*, save_r13
));
808 DECLARE("saver14", offsetof(struct savearea
*, save_r14
));
809 DECLARE("saver15", offsetof(struct savearea
*, save_r15
));
810 DECLARE("saver16", offsetof(struct savearea
*, save_r16
));
811 DECLARE("saver17", offsetof(struct savearea
*, save_r17
));
812 DECLARE("saver18", offsetof(struct savearea
*, save_r18
));
813 DECLARE("saver19", offsetof(struct savearea
*, save_r19
));
814 DECLARE("saver20", offsetof(struct savearea
*, save_r20
));
815 DECLARE("saver21", offsetof(struct savearea
*, save_r21
));
816 DECLARE("saver22", offsetof(struct savearea
*, save_r22
));
817 DECLARE("saver23", offsetof(struct savearea
*, save_r23
));
818 DECLARE("saver24", offsetof(struct savearea
*, save_r24
));
819 DECLARE("saver25", offsetof(struct savearea
*, save_r25
));
820 DECLARE("saver26", offsetof(struct savearea
*, save_r26
));
821 DECLARE("saver27", offsetof(struct savearea
*, save_r27
));
822 DECLARE("saver28", offsetof(struct savearea
*, save_r28
));
823 DECLARE("saver29", offsetof(struct savearea
*, save_r29
));
824 DECLARE("saver30", offsetof(struct savearea
*, save_r30
));
825 DECLARE("saver31", offsetof(struct savearea
*, save_r31
));
827 DECLARE("savefp0", offsetof(struct savearea
*, save_fp0
));
828 DECLARE("savefp1", offsetof(struct savearea
*, save_fp1
));
829 DECLARE("savefp2", offsetof(struct savearea
*, save_fp2
));
830 DECLARE("savefp3", offsetof(struct savearea
*, save_fp3
));
831 DECLARE("savefp4", offsetof(struct savearea
*, save_fp4
));
832 DECLARE("savefp5", offsetof(struct savearea
*, save_fp5
));
833 DECLARE("savefp6", offsetof(struct savearea
*, save_fp6
));
834 DECLARE("savefp7", offsetof(struct savearea
*, save_fp7
));
835 DECLARE("savefp8", offsetof(struct savearea
*, save_fp8
));
836 DECLARE("savefp9", offsetof(struct savearea
*, save_fp9
));
837 DECLARE("savefp10", offsetof(struct savearea
*, save_fp10
));
838 DECLARE("savefp11", offsetof(struct savearea
*, save_fp11
));
839 DECLARE("savefp12", offsetof(struct savearea
*, save_fp12
));
840 DECLARE("savefp13", offsetof(struct savearea
*, save_fp13
));
841 DECLARE("savefp14", offsetof(struct savearea
*, save_fp14
));
842 DECLARE("savefp15", offsetof(struct savearea
*, save_fp15
));
843 DECLARE("savefp16", offsetof(struct savearea
*, save_fp16
));
844 DECLARE("savefp17", offsetof(struct savearea
*, save_fp17
));
845 DECLARE("savefp18", offsetof(struct savearea
*, save_fp18
));
846 DECLARE("savefp19", offsetof(struct savearea
*, save_fp19
));
847 DECLARE("savefp20", offsetof(struct savearea
*, save_fp20
));
848 DECLARE("savefp21", offsetof(struct savearea
*, save_fp21
));
849 DECLARE("savefp22", offsetof(struct savearea
*, save_fp22
));
850 DECLARE("savefp23", offsetof(struct savearea
*, save_fp23
));
851 DECLARE("savefp24", offsetof(struct savearea
*, save_fp24
));
852 DECLARE("savefp25", offsetof(struct savearea
*, save_fp25
));
853 DECLARE("savefp26", offsetof(struct savearea
*, save_fp26
));
854 DECLARE("savefp27", offsetof(struct savearea
*, save_fp27
));
855 DECLARE("savefp28", offsetof(struct savearea
*, save_fp28
));
856 DECLARE("savefp29", offsetof(struct savearea
*, save_fp29
));
857 DECLARE("savefp30", offsetof(struct savearea
*, save_fp30
));
858 DECLARE("savefp31", offsetof(struct savearea
*, save_fp31
));
859 DECLARE("savefpscrpad", offsetof(struct savearea
*, save_fpscr_pad
));
860 DECLARE("savefpscr", offsetof(struct savearea
*, save_fpscr
));
862 DECLARE("savesr0", offsetof(struct savearea
*, save_sr0
));
863 DECLARE("savesr1", offsetof(struct savearea
*, save_sr1
));
864 DECLARE("savesr2", offsetof(struct savearea
*, save_sr2
));
865 DECLARE("savesr3", offsetof(struct savearea
*, save_sr3
));
866 DECLARE("savesr4", offsetof(struct savearea
*, save_sr4
));
867 DECLARE("savesr5", offsetof(struct savearea
*, save_sr5
));
868 DECLARE("savesr6", offsetof(struct savearea
*, save_sr6
));
869 DECLARE("savesr7", offsetof(struct savearea
*, save_sr7
));
870 DECLARE("savesr8", offsetof(struct savearea
*, save_sr8
));
871 DECLARE("savesr9", offsetof(struct savearea
*, save_sr9
));
872 DECLARE("savesr10", offsetof(struct savearea
*, save_sr10
));
873 DECLARE("savesr11", offsetof(struct savearea
*, save_sr11
));
874 DECLARE("savesr12", offsetof(struct savearea
*, save_sr12
));
875 DECLARE("savesr13", offsetof(struct savearea
*, save_sr13
));
876 DECLARE("savesr14", offsetof(struct savearea
*, save_sr14
));
877 DECLARE("savesr15", offsetof(struct savearea
*, save_sr15
));
879 DECLARE("savevr0", offsetof(struct savearea
*, save_vr0
));
880 DECLARE("savevr1", offsetof(struct savearea
*, save_vr1
));
881 DECLARE("savevr2", offsetof(struct savearea
*, save_vr2
));
882 DECLARE("savevr3", offsetof(struct savearea
*, save_vr3
));
883 DECLARE("savevr4", offsetof(struct savearea
*, save_vr4
));
884 DECLARE("savevr5", offsetof(struct savearea
*, save_vr5
));
885 DECLARE("savevr6", offsetof(struct savearea
*, save_vr6
));
886 DECLARE("savevr7", offsetof(struct savearea
*, save_vr7
));
887 DECLARE("savevr8", offsetof(struct savearea
*, save_vr8
));
888 DECLARE("savevr9", offsetof(struct savearea
*, save_vr9
));
889 DECLARE("savevr10", offsetof(struct savearea
*, save_vr10
));
890 DECLARE("savevr11", offsetof(struct savearea
*, save_vr11
));
891 DECLARE("savevr12", offsetof(struct savearea
*, save_vr12
));
892 DECLARE("savevr13", offsetof(struct savearea
*, save_vr13
));
893 DECLARE("savevr14", offsetof(struct savearea
*, save_vr14
));
894 DECLARE("savevr15", offsetof(struct savearea
*, save_vr15
));
895 DECLARE("savevr16", offsetof(struct savearea
*, save_vr16
));
896 DECLARE("savevr17", offsetof(struct savearea
*, save_vr17
));
897 DECLARE("savevr18", offsetof(struct savearea
*, save_vr18
));
898 DECLARE("savevr19", offsetof(struct savearea
*, save_vr19
));
899 DECLARE("savevr20", offsetof(struct savearea
*, save_vr20
));
900 DECLARE("savevr21", offsetof(struct savearea
*, save_vr21
));
901 DECLARE("savevr22", offsetof(struct savearea
*, save_vr22
));
902 DECLARE("savevr23", offsetof(struct savearea
*, save_vr23
));
903 DECLARE("savevr24", offsetof(struct savearea
*, save_vr24
));
904 DECLARE("savevr25", offsetof(struct savearea
*, save_vr25
));
905 DECLARE("savevr26", offsetof(struct savearea
*, save_vr26
));
906 DECLARE("savevr27", offsetof(struct savearea
*, save_vr27
));
907 DECLARE("savevr28", offsetof(struct savearea
*, save_vr28
));
908 DECLARE("savevr29", offsetof(struct savearea
*, save_vr29
));
909 DECLARE("savevr30", offsetof(struct savearea
*, save_vr30
));
910 DECLARE("savevr31", offsetof(struct savearea
*, save_vr31
));
911 DECLARE("savevscr", offsetof(struct savearea
*, save_vscr
));
912 DECLARE("savevrvalid", offsetof(struct savearea
*, save_vrvalid
));
914 /* PseudoKernel Exception Descriptor info */
915 DECLARE("BEDA_SRR0", offsetof(BEDA_t
*, srr0
));
916 DECLARE("BEDA_SRR1", offsetof(BEDA_t
*, srr1
));
917 DECLARE("BEDA_SPRG0", offsetof(BEDA_t
*, sprg0
));
918 DECLARE("BEDA_SPRG1", offsetof(BEDA_t
*, sprg1
));
920 /* PseudoKernel Interrupt Control Word */
921 DECLARE("BTTD_INTCONTROLWORD", offsetof(BTTD_t
*, InterruptControlWord
));
923 /* New state when exiting the pseudokernel */
924 DECLARE("BTTD_NEWEXITSTATE", offsetof(BTTD_t
*, NewExitState
));
926 /* PseudoKernel Test/Post Interrupt */
927 DECLARE("BTTD_TESTINTMASK", offsetof(BTTD_t
*, testIntMask
));
928 DECLARE("BTTD_POSTINTMASK", offsetof(BTTD_t
*, postIntMask
));
930 /* PseudoKernel Vectors */
931 DECLARE("BTTD_TRAP_VECTOR", offsetof(BTTD_t
*, TrapVector
));
932 DECLARE("BTTD_SYSCALL_VECTOR", offsetof(BTTD_t
*, SysCallVector
));
933 DECLARE("BTTD_INTERRUPT_VECTOR", offsetof(BTTD_t
*, InterruptVector
));
934 DECLARE("BTTD_PENDINGINT_VECTOR", offsetof(BTTD_t
*, PendingIntVector
));
936 /* PseudoKernel Bits, Masks and misc */
937 DECLARE("SYSCONTEXTSTATE", kInSystemContext
);
938 DECLARE("PSEUDOKERNELSTATE", kInPseudoKernel
);
939 DECLARE("INTSTATEMASK_B", 12);
940 DECLARE("INTSTATEMASK_E", 15);
941 DECLARE("INTCR2MASK_B", 8);
942 DECLARE("INTCR2MASK_E", 11);
943 DECLARE("INTBACKUPCR2MASK_B", 28);
944 DECLARE("INTBACKUPCR2MASK_E", 31);
945 DECLARE("INTCR2TOBACKUPSHIFT", kCR2ToBackupShift
);
946 DECLARE("BB_MAX_TRAP", bbMaxTrap
);
947 DECLARE("BB_RFI_TRAP", bbRFITrap
);
949 /* Various hackery */
950 DECLARE("procState", offsetof(struct processor
*, state
));
952 DECLARE("CPU_SUBTYPE_POWERPC_ALL", CPU_SUBTYPE_POWERPC_ALL
);
953 DECLARE("CPU_SUBTYPE_POWERPC_601", CPU_SUBTYPE_POWERPC_601
);
954 DECLARE("CPU_SUBTYPE_POWERPC_602", CPU_SUBTYPE_POWERPC_602
);
955 DECLARE("CPU_SUBTYPE_POWERPC_603", CPU_SUBTYPE_POWERPC_603
);
956 DECLARE("CPU_SUBTYPE_POWERPC_603e", CPU_SUBTYPE_POWERPC_603e
);
957 DECLARE("CPU_SUBTYPE_POWERPC_603ev", CPU_SUBTYPE_POWERPC_603ev
);
958 DECLARE("CPU_SUBTYPE_POWERPC_604", CPU_SUBTYPE_POWERPC_604
);
959 DECLARE("CPU_SUBTYPE_POWERPC_604e", CPU_SUBTYPE_POWERPC_604e
);
960 DECLARE("CPU_SUBTYPE_POWERPC_620", CPU_SUBTYPE_POWERPC_620
);
961 DECLARE("CPU_SUBTYPE_POWERPC_750", CPU_SUBTYPE_POWERPC_750
);
962 DECLARE("CPU_SUBTYPE_POWERPC_7400", CPU_SUBTYPE_POWERPC_7400
);
963 DECLARE("CPU_SUBTYPE_POWERPC_7450", CPU_SUBTYPE_POWERPC_7450
);
965 DECLARE("shdIBAT", offsetof(struct shadowBAT
*, IBATs
));
966 DECLARE("shdDBAT", offsetof(struct shadowBAT
*, DBATs
));
968 return(0); /* For ANSI C :-) */