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("ACT_MACT_KSP", offsetof(struct thread_activation
*, mact
.ksp
));
82 DECLARE("ACT_MACT_BEDA", offsetof(struct thread_activation
*, mact
.bbDescAddr
));
83 DECLARE("ACT_MACT_BTS", offsetof(struct thread_activation
*, mact
.bbTableStart
));
84 DECLARE("ACT_MACT_BTE", offsetof(struct thread_activation
*, mact
.bbTaskEnv
));
85 DECLARE("ACT_MACT_SPF", offsetof(struct thread_activation
*, mact
.specFlags
));
86 DECLARE("qactTimer", offsetof(struct thread_activation
*, mact
.qactTimer
));
88 DECLARE("floatUsed", floatUsed
);
89 DECLARE("vectorUsed", vectorUsed
);
90 DECLARE("runningVM", runningVM
);
91 DECLARE("runningVMbit", runningVMbit
);
92 DECLARE("floatCng", floatCng
);
93 DECLARE("floatCngbit", floatCngbit
);
94 DECLARE("vectorCng", vectorCng
);
95 DECLARE("vectorCngbit", vectorCngbit
);
96 DECLARE("userProtKey", userProtKey
);
97 DECLARE("userProtKeybit", userProtKeybit
);
98 DECLARE("trapUnalign", trapUnalign
);
99 DECLARE("trapUnalignbit", trapUnalignbit
);
100 DECLARE("notifyUnalign", notifyUnalign
);
101 DECLARE("notifyUnalignbit", notifyUnalignbit
);
103 DECLARE("bbThread", bbThread
);
104 DECLARE("bbThreadbit", bbThreadbit
);
105 DECLARE("bbNoMachSCbit",bbNoMachSCbit
);
106 DECLARE("bbPreemptive", bbPreemptive
);
107 DECLARE("bbPreemptivebit", bbPreemptivebit
);
109 DECLARE("fvChkb", fvChkb
);
110 DECLARE("fvChk", fvChk
);
112 /* Per Proc info structure */
113 DECLARE("PP_CPU_NUMBER", offsetof(struct per_proc_info
*, cpu_number
));
114 DECLARE("PP_CPU_FLAGS", offsetof(struct per_proc_info
*, cpu_flags
));
115 DECLARE("PP_ISTACKPTR", offsetof(struct per_proc_info
*, istackptr
));
116 DECLARE("PP_INTSTACK_TOP_SS", offsetof(struct per_proc_info
*, intstack_top_ss
));
117 DECLARE("PP_DEBSTACKPTR", offsetof(struct per_proc_info
*, debstackptr
));
118 DECLARE("PP_DEBSTACK_TOP_SS", offsetof(struct per_proc_info
*, debstack_top_ss
));
119 DECLARE("PP_TEMPWORK1", offsetof(struct per_proc_info
*, tempwork1
));
120 DECLARE("PP_USERSPACE", offsetof(struct per_proc_info
*, userspace
));
121 DECLARE("PP_USERPMAP", offsetof(struct per_proc_info
*, userpmap
));
122 DECLARE("PP_LASTPMAP", offsetof(struct per_proc_info
*, Lastpmap
));
123 DECLARE("FPUowner", offsetof(struct per_proc_info
*, FPU_owner
));
124 DECLARE("VMXowner", offsetof(struct per_proc_info
*, VMX_owner
));
126 DECLARE("PP_SAVE_EXCEPTION_TYPE", offsetof(struct per_proc_info
*, save_exception_type
));
127 DECLARE("PP_ACTIVE_KLOADED", offsetof(struct per_proc_info
*, active_kloaded
));
128 DECLARE("PP_ACTIVE_STACKS", offsetof(struct per_proc_info
*, active_stacks
));
129 DECLARE("PP_NEED_AST", offsetof(struct per_proc_info
*, need_ast
));
130 DECLARE("quickfret", offsetof(struct per_proc_info
*, quickfret
));
131 DECLARE("lclfree", offsetof(struct per_proc_info
*, lclfree
));
132 DECLARE("lclfreecnt", offsetof(struct per_proc_info
*, lclfreecnt
));
133 DECLARE("PP_INTS_ENABLED", offsetof(struct per_proc_info
*, interrupts_enabled
));
134 DECLARE("UAW", offsetof(struct per_proc_info
*, Uassist
));
135 DECLARE("next_savearea", offsetof(struct per_proc_info
*, next_savearea
));
136 DECLARE("PP_ACTIVE_THREAD", offsetof(struct per_proc_info
*, pp_active_thread
));
137 DECLARE("PP_PREEMPT_CNT", offsetof(struct per_proc_info
*, pp_preemption_count
));
138 DECLARE("PP_SIMPLE_LOCK_CNT", offsetof(struct per_proc_info
*, pp_simple_lock_count
));
139 DECLARE("PP_INTERRUPT_LVL", offsetof(struct per_proc_info
*, pp_interrupt_level
));
140 DECLARE("ppbbTaskEnv", offsetof(struct per_proc_info
*, ppbbTaskEnv
));
141 DECLARE("liveVRS", offsetof(struct per_proc_info
*, liveVRSave
));
142 DECLARE("spcFlags", offsetof(struct per_proc_info
*, spcFlags
));
143 DECLARE("spcTRc", offsetof(struct per_proc_info
*, spcTRc
));
144 DECLARE("spcTRp", offsetof(struct per_proc_info
*, spcTRp
));
145 DECLARE("ruptStamp", offsetof(struct per_proc_info
*, ruptStamp
));
146 DECLARE("pfAvailable", offsetof(struct per_proc_info
*, pf
.Available
));
147 DECLARE("pfFloat", pfFloat
);
148 DECLARE("pfFloatb", pfFloatb
);
149 DECLARE("pfAltivec", pfAltivec
);
150 DECLARE("pfAltivecb", pfAltivecb
);
151 DECLARE("pfAvJava", pfAvJava
);
152 DECLARE("pfAvJavab", pfAvJavab
);
153 DECLARE("pfSMPcap", pfSMPcap
);
154 DECLARE("pfSMPcapb", pfSMPcapb
);
155 DECLARE("pfCanSleep", pfCanSleep
);
156 DECLARE("pfCanSleepb", pfCanSleepb
);
157 DECLARE("pfCanNap", pfCanNap
);
158 DECLARE("pfCanNapb", pfCanNapb
);
159 DECLARE("pfCanDoze", pfCanDoze
);
160 DECLARE("pfCanDozeb", pfCanDozeb
);
161 DECLARE("pfCanDoze", pfCanDoze
);
162 DECLARE("pfCanDozeb", pfCanDozeb
);
163 DECLARE("pfThermal", pfThermal
);
164 DECLARE("pfThermalb", pfThermalb
);
165 DECLARE("pfThermInt", pfThermInt
);
166 DECLARE("pfThermIntb", pfThermIntb
);
167 DECLARE("pfWillNap", pfWillNap
);
168 DECLARE("pfWillNapb", pfWillNapb
);
169 DECLARE("pfNoMSRir", pfNoMSRir
);
170 DECLARE("pfNoMSRirb", pfNoMSRirb
);
171 DECLARE("pfNoL2PFNap", pfNoL2PFNap
);
172 DECLARE("pfNoL2PFNapb", pfNoL2PFNapb
);
173 DECLARE("pfSlowNap", pfSlowNap
);
174 DECLARE("pfSlowNapb", pfSlowNapb
);
175 DECLARE("pfNoMuMMCK", pfNoMuMMCK
);
176 DECLARE("pfNoMuMMCKb", pfNoMuMMCKb
);
177 DECLARE("pfLClck", pfLClck
);
178 DECLARE("pfLClckb", pfLClckb
);
179 DECLARE("pfL3pdet", pfL3pdet
);
180 DECLARE("pfL3pdetb", pfL3pdetb
);
181 DECLARE("pfL1i", pfL1i
);
182 DECLARE("pfL1ib", pfL1ib
);
183 DECLARE("pfL1d", pfL1d
);
184 DECLARE("pfL1db", pfL1db
);
185 DECLARE("pfL1fa", pfL1fa
);
186 DECLARE("pfL1fab", pfL1fab
);
187 DECLARE("pfL2", pfL2
);
188 DECLARE("pfL2b", pfL2b
);
189 DECLARE("pfL2fa", pfL2fa
);
190 DECLARE("pfL2fab", pfL2fab
);
191 DECLARE("pfL2i", pfL2i
);
192 DECLARE("pfL2ib", pfL2ib
);
193 DECLARE("pfL3", pfL3
);
194 DECLARE("pfL3b", pfL3b
);
195 DECLARE("pfL3fa", pfL3fa
);
196 DECLARE("pfL3fab", pfL3fab
);
197 DECLARE("pfValid", pfValid
);
198 DECLARE("pfValidb", pfValidb
);
199 DECLARE("pfrptdProc", offsetof(struct per_proc_info
*, pf
.rptdProc
));
200 DECLARE("pflineSize", offsetof(struct per_proc_info
*, pf
.lineSize
));
201 DECLARE("pfl1iSize", offsetof(struct per_proc_info
*, pf
.l1iSize
));
202 DECLARE("pfl1dSize", offsetof(struct per_proc_info
*, pf
.l1dSize
));
203 DECLARE("pfl2cr", offsetof(struct per_proc_info
*, pf
.l2cr
));
204 DECLARE("pfl2Size", offsetof(struct per_proc_info
*, pf
.l2Size
));
205 DECLARE("pfl3cr", offsetof(struct per_proc_info
*, pf
.l3cr
));
206 DECLARE("pfl3Size", offsetof(struct per_proc_info
*, pf
.l3Size
));
207 DECLARE("pfHID0", offsetof(struct per_proc_info
*, pf
.pfHID0
));
208 DECLARE("pfHID1", offsetof(struct per_proc_info
*, pf
.pfHID1
));
209 DECLARE("pfHID2", offsetof(struct per_proc_info
*, pf
.pfHID2
));
210 DECLARE("pfHID3", offsetof(struct per_proc_info
*, pf
.pfHID3
));
211 DECLARE("pfMSSCR0", offsetof(struct per_proc_info
*, pf
.pfMSSCR0
));
212 DECLARE("pfMSSCR1", offsetof(struct per_proc_info
*, pf
.pfMSSCR1
));
213 DECLARE("pfICTRL", offsetof(struct per_proc_info
*, pf
.pfICTRL
));
214 DECLARE("pfLDSTCR", offsetof(struct per_proc_info
*, pf
.pfLDSTCR
));
215 DECLARE("pfLDSTDB", offsetof(struct per_proc_info
*, pf
.pfLDSTDB
));
216 DECLARE("pfl2crOriginal", offsetof(struct per_proc_info
*, pf
.l2crOriginal
));
217 DECLARE("pfl3crOriginal", offsetof(struct per_proc_info
*, pf
.l3crOriginal
));
218 DECLARE("pfBootConfig", offsetof(struct per_proc_info
*, pf
.pfBootConfig
));
219 DECLARE("pfSize", sizeof(procFeatures
));
221 DECLARE("thrmmaxTemp", offsetof(struct per_proc_info
*, thrm
.maxTemp
));
222 DECLARE("thrmthrottleTemp", offsetof(struct per_proc_info
*, thrm
.throttleTemp
));
223 DECLARE("thrmlowTemp", offsetof(struct per_proc_info
*, thrm
.lowTemp
));
224 DECLARE("thrmhighTemp", offsetof(struct per_proc_info
*, thrm
.highTemp
));
225 DECLARE("thrm3val", offsetof(struct per_proc_info
*, thrm
.thrm3val
));
226 DECLARE("thrmSize", sizeof(thrmControl
));
228 DECLARE("napStamp", offsetof(struct per_proc_info
*, napStamp
));
229 DECLARE("napTotal", offsetof(struct per_proc_info
*, napTotal
));
231 DECLARE("emfp0", offsetof(struct per_proc_info
*, emfp0
));
232 DECLARE("emfp1", offsetof(struct per_proc_info
*, emfp1
));
233 DECLARE("emfp2", offsetof(struct per_proc_info
*, emfp2
));
234 DECLARE("emfp3", offsetof(struct per_proc_info
*, emfp3
));
235 DECLARE("emfp4", offsetof(struct per_proc_info
*, emfp4
));
236 DECLARE("emfp5", offsetof(struct per_proc_info
*, emfp5
));
237 DECLARE("emfp6", offsetof(struct per_proc_info
*, emfp6
));
238 DECLARE("emfp7", offsetof(struct per_proc_info
*, emfp7
));
239 DECLARE("emfp8", offsetof(struct per_proc_info
*, emfp8
));
240 DECLARE("emfp9", offsetof(struct per_proc_info
*, emfp9
));
241 DECLARE("emfp10", offsetof(struct per_proc_info
*, emfp10
));
242 DECLARE("emfp11", offsetof(struct per_proc_info
*, emfp11
));
243 DECLARE("emfp12", offsetof(struct per_proc_info
*, emfp12
));
244 DECLARE("emfp13", offsetof(struct per_proc_info
*, emfp13
));
245 DECLARE("emfp14", offsetof(struct per_proc_info
*, emfp14
));
246 DECLARE("emfp15", offsetof(struct per_proc_info
*, emfp15
));
247 DECLARE("emfp16", offsetof(struct per_proc_info
*, emfp16
));
248 DECLARE("emfp17", offsetof(struct per_proc_info
*, emfp17
));
249 DECLARE("emfp18", offsetof(struct per_proc_info
*, emfp18
));
250 DECLARE("emfp19", offsetof(struct per_proc_info
*, emfp19
));
251 DECLARE("emfp20", offsetof(struct per_proc_info
*, emfp20
));
252 DECLARE("emfp21", offsetof(struct per_proc_info
*, emfp21
));
253 DECLARE("emfp22", offsetof(struct per_proc_info
*, emfp22
));
254 DECLARE("emfp23", offsetof(struct per_proc_info
*, emfp23
));
255 DECLARE("emfp24", offsetof(struct per_proc_info
*, emfp24
));
256 DECLARE("emfp25", offsetof(struct per_proc_info
*, emfp25
));
257 DECLARE("emfp26", offsetof(struct per_proc_info
*, emfp26
));
258 DECLARE("emfp27", offsetof(struct per_proc_info
*, emfp27
));
259 DECLARE("emfp28", offsetof(struct per_proc_info
*, emfp28
));
260 DECLARE("emfp29", offsetof(struct per_proc_info
*, emfp29
));
261 DECLARE("emfp30", offsetof(struct per_proc_info
*, emfp30
));
262 DECLARE("emfp31", offsetof(struct per_proc_info
*, emfp31
));
263 DECLARE("emfpscr_pad", offsetof(struct per_proc_info
*, emfpscr_pad
));
264 DECLARE("emfpscr", offsetof(struct per_proc_info
*, emfpscr
));
266 DECLARE("emvr0", offsetof(struct per_proc_info
*, emvr0
));
267 DECLARE("emvr1", offsetof(struct per_proc_info
*, emvr1
));
268 DECLARE("emvr2", offsetof(struct per_proc_info
*, emvr2
));
269 DECLARE("emvr3", offsetof(struct per_proc_info
*, emvr3
));
270 DECLARE("emvr4", offsetof(struct per_proc_info
*, emvr4
));
271 DECLARE("emvr5", offsetof(struct per_proc_info
*, emvr5
));
272 DECLARE("emvr6", offsetof(struct per_proc_info
*, emvr6
));
273 DECLARE("emvr7", offsetof(struct per_proc_info
*, emvr7
));
274 DECLARE("emvr8", offsetof(struct per_proc_info
*, emvr8
));
275 DECLARE("emvr9", offsetof(struct per_proc_info
*, emvr9
));
276 DECLARE("emvr10", offsetof(struct per_proc_info
*, emvr10
));
277 DECLARE("emvr11", offsetof(struct per_proc_info
*, emvr11
));
278 DECLARE("emvr12", offsetof(struct per_proc_info
*, emvr12
));
279 DECLARE("emvr13", offsetof(struct per_proc_info
*, emvr13
));
280 DECLARE("emvr14", offsetof(struct per_proc_info
*, emvr14
));
281 DECLARE("emvr15", offsetof(struct per_proc_info
*, emvr15
));
282 DECLARE("emvr16", offsetof(struct per_proc_info
*, emvr16
));
283 DECLARE("emvr17", offsetof(struct per_proc_info
*, emvr17
));
284 DECLARE("emvr18", offsetof(struct per_proc_info
*, emvr18
));
285 DECLARE("emvr19", offsetof(struct per_proc_info
*, emvr19
));
286 DECLARE("emvr20", offsetof(struct per_proc_info
*, emvr20
));
287 DECLARE("emvr21", offsetof(struct per_proc_info
*, emvr21
));
288 DECLARE("emvr22", offsetof(struct per_proc_info
*, emvr22
));
289 DECLARE("emvr23", offsetof(struct per_proc_info
*, emvr23
));
290 DECLARE("emvr24", offsetof(struct per_proc_info
*, emvr24
));
291 DECLARE("emvr25", offsetof(struct per_proc_info
*, emvr25
));
292 DECLARE("emvr26", offsetof(struct per_proc_info
*, emvr26
));
293 DECLARE("emvr27", offsetof(struct per_proc_info
*, emvr27
));
294 DECLARE("emvr28", offsetof(struct per_proc_info
*, emvr28
));
295 DECLARE("emvr29", offsetof(struct per_proc_info
*, emvr29
));
296 DECLARE("emvr30", offsetof(struct per_proc_info
*, emvr30
));
297 DECLARE("emvr31", offsetof(struct per_proc_info
*, emvr31
));
298 DECLARE("empadvr", offsetof(struct per_proc_info
*, empadvr
));
299 DECLARE("ppSize", sizeof(struct per_proc_info
));
300 DECLARE("patcharea", offsetof(struct per_proc_info
*, patcharea
));
302 DECLARE("RESETHANDLER_TYPE", offsetof(struct resethandler
*, type
));
303 DECLARE("RESETHANDLER_CALL", offsetof(struct resethandler
*, call_paddr
));
304 DECLARE("RESETHANDLER_ARG", offsetof(struct resethandler
*, arg__paddr
));
306 /* we want offset from
307 * bottom of kernel stack, not offset into structure
309 #define IKSBASE (u_int)STACK_IKS(0)
311 /* values from kern/thread.h */
312 DECLARE("THREAD_TOP_ACT", offsetof(struct thread_shuttle
*, top_act
));
313 DECLARE("THREAD_KERNEL_STACK", offsetof(struct thread_shuttle
*, kernel_stack
));
314 DECLARE("THREAD_CONTINUATION", offsetof(struct thread_shuttle
*, continuation
));
315 DECLARE("THREAD_RECOVER", offsetof(struct thread_shuttle
*, recover
));
316 DECLARE("THREAD_FUNNEL_LOCK",
317 offsetof(struct thread_shuttle
*, funnel_lock
));
318 DECLARE("THREAD_FUNNEL_STATE",
319 offsetof(struct thread_shuttle
*, funnel_state
));
320 DECLARE("LOCK_FNL_MUTEX",
321 offsetof(struct funnel_lock
*, fnl_mutex
));
323 DECLARE("THREAD_MUTEX_COUNT", offsetof(struct thread_shuttle
*, mutex_count
));
324 #endif /* MACH_LDEBUG */
325 DECLARE("THREAD_PSET", offsetof(struct thread_shuttle
*, processor_set
));
326 DECLARE("THREAD_LINKS", offsetof(struct thread_shuttle
*, links
));
327 DECLARE("THREAD_PSTHRN", offsetof(struct thread_shuttle
*, pset_threads
.next
));
329 /* values from kern/thread_act.h */
330 DECLARE("ACT_TASK", offsetof(struct thread_activation
*, task
));
331 DECLARE("ACT_THREAD", offsetof(struct thread_activation
*, thread
));
332 DECLARE("ACT_LOWER", offsetof(struct thread_activation
*, lower
));
333 DECLARE("ACT_MACT_PCB", offsetof(struct thread_activation
*, mact
.pcb
));
334 DECLARE("ACT_AST", offsetof(struct thread_activation
*, ast
));
335 DECLARE("ACT_VMMAP", offsetof(struct thread_activation
*, map
));
336 DECLARE("ACT_KLOADED", offsetof(struct thread_activation
*, kernel_loaded
));
337 DECLARE("ACT_KLOADING", offsetof(struct thread_activation
*, kernel_loading
));
338 DECLARE("vmmCEntry", offsetof(struct thread_activation
*, mact
.vmmCEntry
));
339 DECLARE("vmmControl", offsetof(struct thread_activation
*, mact
.vmmControl
));
340 DECLARE("curctx", offsetof(struct thread_activation
*, mact
.curctx
));
341 DECLARE("deferctx", offsetof(struct thread_activation
*, mact
.deferctx
));
342 DECLARE("facctx", offsetof(struct thread_activation
*, mact
.facctx
));
344 DECLARE("CTHREAD_SELF", offsetof(struct thread_activation
*, mact
.cthread_self
));
347 DECLARE("FPUsave", offsetof(struct facility_context
*,FPUsave
));
348 DECLARE("FPUlevel", offsetof(struct facility_context
*,FPUlevel
));
349 DECLARE("FPUcpu", offsetof(struct facility_context
*,FPUcpu
));
350 DECLARE("VMXsave", offsetof(struct facility_context
*,VMXsave
));
351 DECLARE("VMXlevel", offsetof(struct facility_context
*,VMXlevel
));
352 DECLARE("VMXcpu", offsetof(struct facility_context
*,VMXcpu
));
353 DECLARE("facAct", offsetof(struct facility_context
*,facAct
));
355 /* Values from vmachmon.h */
357 DECLARE("kVmmGetVersion", kVmmGetVersion
);
358 DECLARE("kVmmvGetFeatures", kVmmvGetFeatures
);
359 DECLARE("kVmmInitContext", kVmmInitContext
);
360 DECLARE("kVmmTearDownContext", kVmmTearDownContext
);
361 DECLARE("kVmmTearDownAll", kVmmTearDownAll
);
362 DECLARE("kVmmMapPage", kVmmMapPage
);
363 DECLARE("kVmmGetPageMapping", kVmmGetPageMapping
);
364 DECLARE("kVmmUnmapPage", kVmmUnmapPage
);
365 DECLARE("kVmmUnmapAllPages", kVmmUnmapAllPages
);
366 DECLARE("kVmmGetPageDirtyFlag", kVmmGetPageDirtyFlag
);
367 DECLARE("kVmmGetFloatState", kVmmGetFloatState
);
368 DECLARE("kVmmGetVectorState", kVmmGetVectorState
);
369 DECLARE("kVmmSetTimer", kVmmSetTimer
);
370 DECLARE("kVmmExecuteVM", kVmmExecuteVM
);
371 DECLARE("kVmmProtectPage", kVmmProtectPage
);
373 DECLARE("kVmmReturnNull", kVmmReturnNull
);
374 DECLARE("kVmmStopped", kVmmStopped
);
375 DECLARE("kVmmBogusContext", kVmmBogusContext
);
376 DECLARE("kVmmReturnDataPageFault", kVmmReturnDataPageFault
);
377 DECLARE("kVmmReturnInstrPageFault", kVmmReturnInstrPageFault
);
378 DECLARE("kVmmReturnAlignmentFault", kVmmReturnAlignmentFault
);
379 DECLARE("kVmmReturnProgramException", kVmmReturnProgramException
);
380 DECLARE("kVmmReturnSystemCall", kVmmReturnSystemCall
);
381 DECLARE("kVmmReturnTraceException", kVmmReturnTraceException
);
383 DECLARE("kVmmProtXtnd", kVmmProtXtnd
);
384 DECLARE("kVmmProtNARW", kVmmProtNARW
);
385 DECLARE("kVmmProtRORW", kVmmProtRORW
);
386 DECLARE("kVmmProtRWRW", kVmmProtRWRW
);
387 DECLARE("kVmmProtRORO", kVmmProtRORO
);
389 DECLARE("vmmFlags", offsetof(struct vmmCntrlEntry
*, vmmFlags
));
390 DECLARE("vmmInUseb", vmmInUseb
);
391 DECLARE("vmmInUse", vmmInUse
);
392 DECLARE("vmmPmap", offsetof(struct vmmCntrlEntry
*, vmmPmap
));
393 DECLARE("vmmContextKern", offsetof(struct vmmCntrlEntry
*, vmmContextKern
));
394 DECLARE("vmmContextUser", offsetof(struct vmmCntrlEntry
*, vmmContextUser
));
395 DECLARE("vmmFacCtx", offsetof(struct vmmCntrlEntry
*, vmmFacCtx
));
396 DECLARE("vmmLastMap", offsetof(struct vmmCntrlEntry
*, vmmLastMap
));
397 DECLARE("vmmCEntrySize", sizeof(struct vmmCntrlEntry
));
398 DECLARE("kVmmMaxContextsPerThread", kVmmMaxContextsPerThread
);
400 DECLARE("interface_version", offsetof(struct vmm_state_page_t
*, interface_version
));
401 DECLARE("thread_index", offsetof(struct vmm_state_page_t
*, thread_index
));
402 DECLARE("vmmStat", offsetof(struct vmm_state_page_t
*, vmmStat
));
403 DECLARE("vmmCntrl", offsetof(struct vmm_state_page_t
*, vmmCntrl
));
404 DECLARE("return_code", offsetof(struct vmm_state_page_t
*, return_code
));
405 DECLARE("return_params", offsetof(struct vmm_state_page_t
*, return_params
));
406 DECLARE("vmm_proc_state", offsetof(struct vmm_state_page_t
*, vmm_proc_state
));
407 DECLARE("return_params", offsetof(struct vmm_state_page_t
*, return_params
));
408 DECLARE("vmmppcVRs", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcVRs
));
409 DECLARE("vmmppcVSCR", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcVSCR
));
410 DECLARE("vmmppcVSCRshadow", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcVSCRshadow
));
411 DECLARE("vmmppcFPRs", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcFPRs
));
412 DECLARE("vmmppcFPSCR", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcFPSCR
));
413 DECLARE("vmmppcFPSCRshadow", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcFPSCRshadow
));
415 DECLARE("vmmppcpc", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcPC
));
416 DECLARE("vmmppcmsr", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcMSR
));
417 DECLARE("vmmppcr0", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x00));
418 DECLARE("vmmppcr1", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x04));
419 DECLARE("vmmppcr2", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x08));
420 DECLARE("vmmppcr3", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x0C));
421 DECLARE("vmmppcr4", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x10));
422 DECLARE("vmmppcr5", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x14));
424 DECLARE("vmmppcr6", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x18));
425 DECLARE("vmmppcr7", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x1C));
426 DECLARE("vmmppcr8", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x20));
427 DECLARE("vmmppcr9", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x24));
428 DECLARE("vmmppcr10", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x28));
429 DECLARE("vmmppcr11", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x2C));
430 DECLARE("vmmppcr12", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x30));
431 DECLARE("vmmppcr13", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x34));
433 DECLARE("vmmppcr14", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x38));
434 DECLARE("vmmppcr15", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x3C));
435 DECLARE("vmmppcr16", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x40));
436 DECLARE("vmmppcr17", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x44));
437 DECLARE("vmmppcr18", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x48));
438 DECLARE("vmmppcr19", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x4C));
439 DECLARE("vmmppcr20", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x50));
440 DECLARE("vmmppcr21", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x54));
442 DECLARE("vmmppcr22", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x58));
443 DECLARE("vmmppcr23", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x5C));
444 DECLARE("vmmppcr24", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x60));
445 DECLARE("vmmppcr25", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x64));
446 DECLARE("vmmppcr26", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x68));
447 DECLARE("vmmppcr27", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x6C));
448 DECLARE("vmmppcr28", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x70));
449 DECLARE("vmmppcr29", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x74));
451 DECLARE("vmmppcr30", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x78));
452 DECLARE("vmmppcr31", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcGPRs
+0x7C));
453 DECLARE("vmmppccr", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcCR
));
454 DECLARE("vmmppcxer", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcXER
));
455 DECLARE("vmmppclr", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcLR
));
456 DECLARE("vmmppcctr", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcCTR
));
457 DECLARE("vmmppcmq", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcMQ
));
458 DECLARE("vmmppcvrsave", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcVRSave
));
460 DECLARE("vmmppcvscr", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcVSCR
+0x00));
461 DECLARE("vmmppcfpscrpad", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcFPSCR
));
462 DECLARE("vmmppcfpscr", offsetof(struct vmm_state_page_t
*, vmm_proc_state
.ppcFPSCR
+4));
464 DECLARE("vmmFloatCngd", vmmFloatCngd
);
465 DECLARE("vmmFloatCngdb", vmmFloatCngdb
);
466 DECLARE("vmmVectCngd", vmmVectCngd
);
467 DECLARE("vmmVectCngdb", vmmVectCngdb
);
468 DECLARE("vmmTimerPop", vmmTimerPop
);
469 DECLARE("vmmTimerPopb", vmmTimerPopb
);
470 DECLARE("vmmMapDone", vmmMapDone
);
471 DECLARE("vmmMapDoneb", vmmMapDoneb
);
472 DECLARE("vmmSpfSave", vmmSpfSave
);
473 DECLARE("vmmSpfSaveb", vmmSpfSaveb
);
474 DECLARE("vmmFloatLoad", vmmFloatLoad
);
475 DECLARE("vmmFloatLoadb", vmmFloatLoadb
);
476 DECLARE("vmmVectLoad", vmmVectLoad
);
477 DECLARE("vmmVectLoadb", vmmVectLoadb
);
478 DECLARE("vmmVectVRall", vmmVectVRall
);
479 DECLARE("vmmVectVRallb", vmmVectVRallb
);
480 DECLARE("vmmVectVAss", vmmVectVAss
);
481 DECLARE("vmmVectVAssb", vmmVectVAssb
);
482 DECLARE("vmmXStart", vmmXStart
);
483 DECLARE("vmmXStartb", vmmXStartb
);
484 DECLARE("vmmXStop", vmmXStop
);
485 DECLARE("vmmXStopb", vmmXStopb
);
486 DECLARE("vmmKey", vmmKey
);
487 DECLARE("vmmKeyb", vmmKeyb
);
489 /* values from kern/task.h */
490 DECLARE("TASK_SYSCALLS_MACH",
491 offsetof(struct task
*, syscalls_mach
));
492 DECLARE("TASK_SYSCALLS_UNIX",
493 offsetof(struct task
*, syscalls_unix
));
495 /* values from vm/vm_map.h */
496 DECLARE("VMMAP_PMAP", offsetof(struct vm_map
*, pmap
));
498 /* values from machine/pmap.h */
499 DECLARE("PMAP_SPACE", offsetof(struct pmap
*, space
));
500 DECLARE("PMAP_BMAPS", offsetof(struct pmap
*, bmaps
));
501 DECLARE("PMAP_PMAPVR", offsetof(struct pmap
*, pmapvr
));
502 DECLARE("PMAP_VFLAGS", offsetof(struct pmap
*, vflags
));
503 DECLARE("PMAP_USAGE", offsetof(struct pmap
*, pmapUsage
));
504 DECLARE("PMAP_SEGS", offsetof(struct pmap
*, pmapSegs
));
505 DECLARE("PMAP_SIZE", pmapSize
);
507 /* values from kern/processor.h */
508 DECLARE("psthreads", offsetof(struct processor_set
*, threads
));
509 DECLARE("psthreadcnt", offsetof(struct processor_set
*, thread_count
));
512 /* Constants from pmap.h */
513 DECLARE("PPC_SID_KERNEL", PPC_SID_KERNEL
);
515 /* values for accessing mach_trap table */
516 DECLARE("MACH_TRAP_OFFSET_POW2", 4);
518 DECLARE("MACH_TRAP_ARGC",
519 offsetof(mach_trap_t
*, mach_trap_arg_count
));
520 DECLARE("MACH_TRAP_FUNCTION",
521 offsetof(mach_trap_t
*, mach_trap_function
));
523 DECLARE("HOST_SELF", offsetof(host_t
, host_self
));
525 DECLARE("PPCcallmax", sizeof(PPCcalls
));
527 /* values from cpu_data.h */
528 DECLARE("CPU_ACTIVE_THREAD", offsetof(cpu_data_t
*, active_thread
));
529 DECLARE("CPU_PREEMPTION_LEVEL", offsetof(cpu_data_t
*, preemption_level
));
530 DECLARE("CPU_SIMPLE_LOCK_COUNT",
531 offsetof(cpu_data_t
*, simple_lock_count
));
532 DECLARE("CPU_INTERRUPT_LEVEL",offsetof(cpu_data_t
*, interrupt_level
));
534 /* Misc values used by assembler */
535 DECLARE("AST_ALL", AST_ALL
);
536 DECLARE("AST_URGENT", AST_URGENT
);
538 /* Simple Lock structure */
539 DECLARE("SLOCK_ILK", offsetof(usimple_lock_t
, interlock
));
541 DECLARE("SLOCK_TYPE", offsetof(usimple_lock_t
, lock_type
));
542 DECLARE("SLOCK_PC", offsetof(usimple_lock_t
, debug
.lock_pc
));
543 DECLARE("SLOCK_THREAD", offsetof(usimple_lock_t
, debug
.lock_thread
));
544 DECLARE("SLOCK_DURATIONH",offsetof(usimple_lock_t
, debug
.duration
[0]));
545 DECLARE("SLOCK_DURATIONL",offsetof(usimple_lock_t
, debug
.duration
[1]));
546 DECLARE("USLOCK_TAG", USLOCK_TAG
);
547 #endif /* MACH_LDEBUG */
549 /* Mutex structure */
550 DECLARE("LOCK_DATA", offsetof(mutex_t
*, interlock
));
551 DECLARE("MUTEX_WAITERS",offsetof(mutex_t
*, waiters
));
552 DECLARE("MUTEX_PROMOTED_PRI",offsetof(mutex_t
*, promoted_pri
));
554 DECLARE("MUTEX_TYPE", offsetof(mutex_t
*, type
));
555 DECLARE("MUTEX_PC", offsetof(mutex_t
*, pc
));
556 DECLARE("MUTEX_THREAD", offsetof(mutex_t
*, thread
));
557 DECLARE("MUTEX_TAG", MUTEX_TAG
);
558 #endif /* MACH_LDEBUG */
560 /* values from low_trace.h */
561 DECLARE("LTR_cpu", offsetof(struct LowTraceRecord
*, LTR_cpu
));
562 DECLARE("LTR_excpt", offsetof(struct LowTraceRecord
*, LTR_excpt
));
563 DECLARE("LTR_timeHi", offsetof(struct LowTraceRecord
*, LTR_timeHi
));
564 DECLARE("LTR_timeLo", offsetof(struct LowTraceRecord
*, LTR_timeLo
));
565 DECLARE("LTR_cr", offsetof(struct LowTraceRecord
*, LTR_cr
));
566 DECLARE("LTR_srr0", offsetof(struct LowTraceRecord
*, LTR_srr0
));
567 DECLARE("LTR_srr1", offsetof(struct LowTraceRecord
*, LTR_srr1
));
568 DECLARE("LTR_dar", offsetof(struct LowTraceRecord
*, LTR_dar
));
569 DECLARE("LTR_save", offsetof(struct LowTraceRecord
*, LTR_save
));
570 DECLARE("LTR_lr", offsetof(struct LowTraceRecord
*, LTR_lr
));
571 DECLARE("LTR_ctr", offsetof(struct LowTraceRecord
*, LTR_ctr
));
572 DECLARE("LTR_r0", offsetof(struct LowTraceRecord
*, LTR_r0
));
573 DECLARE("LTR_r1", offsetof(struct LowTraceRecord
*, LTR_r1
));
574 DECLARE("LTR_r2", offsetof(struct LowTraceRecord
*, LTR_r2
));
575 DECLARE("LTR_r3", offsetof(struct LowTraceRecord
*, LTR_r3
));
576 DECLARE("LTR_r4", offsetof(struct LowTraceRecord
*, LTR_r4
));
577 DECLARE("LTR_r5", offsetof(struct LowTraceRecord
*, LTR_r5
));
578 DECLARE("LTR_size", sizeof(struct LowTraceRecord
));
580 /* Values from pexpert.h */
581 DECLARE("PECFIcpurate", offsetof(struct clock_frequency_info_t
*, cpu_clock_rate_hz
));
582 DECLARE("PECFIbusrate", offsetof(struct clock_frequency_info_t
*, bus_clock_rate_hz
));
584 /* Values from pmap_internals.h and mappings.h */
585 DECLARE("mmnext", offsetof(struct mapping
*, next
));
586 DECLARE("mmhashnext", offsetof(struct mapping
*, hashnext
));
587 DECLARE("mmPTEhash", offsetof(struct mapping
*, PTEhash
));
588 DECLARE("mmPTEent", offsetof(struct mapping
*, PTEent
));
589 DECLARE("mmPTEv", offsetof(struct mapping
*, PTEv
));
590 DECLARE("mmPTEr", offsetof(struct mapping
*, PTEr
));
591 DECLARE("mmphysent", offsetof(struct mapping
*, physent
));
592 DECLARE("mmpmap", offsetof(struct mapping
*, pmap
));
594 DECLARE("bmnext", offsetof(struct blokmap
*, next
));
595 DECLARE("bmstart", offsetof(struct blokmap
*, start
));
596 DECLARE("bmend", offsetof(struct blokmap
*, end
));
597 DECLARE("bmcurrent", offsetof(struct blokmap
*, current
));
598 DECLARE("bmPTEr", offsetof(struct blokmap
*, PTEr
));
599 DECLARE("bmspace", offsetof(struct blokmap
*, space
));
600 DECLARE("blkFlags", offsetof(struct blokmap
*, blkFlags
));
601 DECLARE("blkPerm", blkPerm
);
602 DECLARE("blkRem", blkRem
);
603 DECLARE("blkPermbit", blkPermbit
);
604 DECLARE("blkRembit", blkRembit
);
605 DECLARE("BLKREMMAX", BLKREMMAX
);
607 DECLARE("mbvrswap", offsetof(struct mappingblok
*, mapblokvrswap
));
608 DECLARE("mbfree", offsetof(struct mappingblok
*, mapblokfree
));
609 DECLARE("mapcsize", sizeof(struct mappingctl
));
611 DECLARE("pephyslink", offsetof(struct phys_entry
*, phys_link
));
612 DECLARE("pepte1", offsetof(struct phys_entry
*, pte1
));
614 DECLARE("PCAlock", offsetof(struct PCA
*, PCAlock
));
615 DECLARE("PCAallo", offsetof(struct PCA
*, flgs
.PCAallo
));
616 DECLARE("PCAfree", offsetof(struct PCA
*, flgs
.PCAalflgs
.PCAfree
));
617 DECLARE("PCAauto", offsetof(struct PCA
*, flgs
.PCAalflgs
.PCAauto
));
618 DECLARE("PCAslck", offsetof(struct PCA
*, flgs
.PCAalflgs
.PCAslck
));
619 DECLARE("PCAsteal", offsetof(struct PCA
*, flgs
.PCAalflgs
.PCAsteal
));
620 DECLARE("PCAgas", offsetof(struct PCA
*, PCAgas
));
621 DECLARE("PCAhash", offsetof(struct PCA
*, PCAhash
));
623 DECLARE("MFpcaptr", offsetof(struct mappingflush
*, pcaptr
));
624 DECLARE("MFmappingcnt", offsetof(struct mappingflush
*, mappingcnt
));
625 DECLARE("MFmapping", offsetof(struct mappingflush
*, mapping
));
626 DECLARE("MFmappingSize", sizeof(struct mfmapping
));
628 DECLARE("SVlock", offsetof(struct Saveanchor
*, savelock
));
629 DECLARE("SVpoolfwd", offsetof(struct Saveanchor
*, savepoolfwd
));
630 DECLARE("SVpoolbwd", offsetof(struct Saveanchor
*, savepoolbwd
));
631 DECLARE("SVfree", offsetof(struct Saveanchor
*, savefree
));
632 DECLARE("SVfreecnt", offsetof(struct Saveanchor
*, savefreecnt
));
633 DECLARE("SVadjust", offsetof(struct Saveanchor
*, saveadjust
));
634 DECLARE("SVinuse", offsetof(struct Saveanchor
*, saveinuse
));
635 DECLARE("SVtarget", offsetof(struct Saveanchor
*, savetarget
));
636 DECLARE("SVsize", sizeof(struct Saveanchor
));
639 DECLARE("GDsave", offsetof(struct GDWorkArea
*, GDsave
));
640 DECLARE("GDfp0", offsetof(struct GDWorkArea
*, GDfp0
));
641 DECLARE("GDfp1", offsetof(struct GDWorkArea
*, GDfp1
));
642 DECLARE("GDfp2", offsetof(struct GDWorkArea
*, GDfp2
));
643 DECLARE("GDfp3", offsetof(struct GDWorkArea
*, GDfp3
));
644 DECLARE("GDtop", offsetof(struct GDWorkArea
*, GDtop
));
645 DECLARE("GDleft", offsetof(struct GDWorkArea
*, GDleft
));
646 DECLARE("GDtopleft", offsetof(struct GDWorkArea
*, GDtopleft
));
647 DECLARE("GDrowbytes", offsetof(struct GDWorkArea
*, GDrowbytes
));
648 DECLARE("GDrowchar", offsetof(struct GDWorkArea
*, GDrowchar
));
649 DECLARE("GDdepth", offsetof(struct GDWorkArea
*, GDdepth
));
650 DECLARE("GDcollgn", offsetof(struct GDWorkArea
*, GDcollgn
));
651 DECLARE("GDready", offsetof(struct GDWorkArea
*, GDready
));
652 DECLARE("GDrowbuf1", offsetof(struct GDWorkArea
*, GDrowbuf1
));
653 DECLARE("GDrowbuf2", offsetof(struct GDWorkArea
*, GDrowbuf2
));
656 DECLARE("dgLock", offsetof(struct diagWork
*, dgLock
));
657 DECLARE("dgFlags", offsetof(struct diagWork
*, dgFlags
));
658 DECLARE("dgMisc0", offsetof(struct diagWork
*, dgMisc0
));
659 DECLARE("enaExpTrace", enaExpTrace
);
660 DECLARE("enaExpTraceb", enaExpTraceb
);
661 DECLARE("enaUsrFCall", enaUsrFCall
);
662 DECLARE("enaUsrFCallb", enaUsrFCallb
);
663 DECLARE("enaUsrPhyMp", enaUsrPhyMp
);
664 DECLARE("enaUsrPhyMpb", enaUsrPhyMpb
);
665 DECLARE("enaDiagSCs", enaDiagSCs
);
666 DECLARE("enaDiagSCsb", enaDiagSCsb
);
667 DECLARE("enaDiagEM", enaDiagEM
);
668 DECLARE("enaDiagEMb", enaDiagEMb
);
669 DECLARE("disLkType", disLkType
);
670 DECLARE("disLktypeb", disLktypeb
);
671 DECLARE("disLkThread", disLkThread
);
672 DECLARE("disLkThreadb", disLkThreadb
);
673 DECLARE("disLkNmSimp", disLkNmSimp
);
674 DECLARE("disLkNmSimpb", disLkNmSimpb
);
675 DECLARE("disLkMyLck", disLkMyLck
);
676 DECLARE("disLkMyLckb", disLkMyLckb
);
677 DECLARE("dgMisc1", offsetof(struct diagWork
*, dgMisc1
));
678 DECLARE("dgMisc2", offsetof(struct diagWork
*, dgMisc2
));
679 DECLARE("dgMisc3", offsetof(struct diagWork
*, dgMisc3
));
680 DECLARE("dgMisc4", offsetof(struct diagWork
*, dgMisc4
));
681 DECLARE("dgMisc5", offsetof(struct diagWork
*, dgMisc5
));
683 DECLARE("traceMask", offsetof(struct traceWork
*, traceMask
));
684 DECLARE("traceCurr", offsetof(struct traceWork
*, traceCurr
));
685 DECLARE("traceStart", offsetof(struct traceWork
*, traceStart
));
686 DECLARE("traceEnd", offsetof(struct traceWork
*, traceEnd
));
687 DECLARE("traceMsnd", offsetof(struct traceWork
*, traceMsnd
));
689 DECLARE("SACnext", offsetof(struct savearea_comm
*, sac_next
));
690 DECLARE("SACprev", offsetof(struct savearea_comm
*, sac_prev
));
691 DECLARE("SACvrswap", offsetof(struct savearea_comm
*, sac_vrswap
));
692 DECLARE("SACalloc", offsetof(struct savearea_comm
*, sac_alloc
));
693 DECLARE("SACflags", offsetof(struct savearea_comm
*, sac_flags
));
694 DECLARE("sac_cnt", sac_cnt
);
695 DECLARE("sac_empty", sac_empty
);
696 DECLARE("sac_perm", sac_perm
);
697 DECLARE("sac_permb", sac_permb
);
699 DECLARE("LocalSaveTarget", LocalSaveTarget
);
700 DECLARE("LocalSaveMin", LocalSaveMin
);
701 DECLARE("LocalSaveMax", LocalSaveMax
);
702 DECLARE("FreeListMin", FreeListMin
);
703 DECLARE("SaveLowHysteresis", SaveLowHysteresis
);
704 DECLARE("SaveHighHysteresis", SaveHighHysteresis
);
705 DECLARE("InitialSaveAreas", InitialSaveAreas
);
706 DECLARE("InitialSaveTarget", InitialSaveTarget
);
707 DECLARE("InitialSaveBloks", InitialSaveBloks
);
709 DECLARE("SAVprev", offsetof(struct savearea_comm
*, save_prev
));
710 DECLARE("SAVact", offsetof(struct savearea_comm
*, save_act
));
711 DECLARE("SAVflags", offsetof(struct savearea_comm
*, save_flags
));
712 DECLARE("SAVlevel", offsetof(struct savearea_comm
*, save_level
));
713 DECLARE("SAVtime", offsetof(struct savearea_comm
*, save_time
));
714 DECLARE("SAVsize", sizeof(struct savearea
));
715 DECLARE("SAVsizefpu", sizeof(struct savearea_vec
));
716 DECLARE("SAVsizevec", sizeof(struct savearea_fpu
));
717 DECLARE("SAVcommsize", sizeof(struct savearea_comm
));
719 DECLARE("savesrr0", offsetof(struct savearea
*, save_srr0
));
720 DECLARE("savesrr1", offsetof(struct savearea
*, save_srr1
));
721 DECLARE("savecr", offsetof(struct savearea
*, save_cr
));
722 DECLARE("savexer", offsetof(struct savearea
*, save_xer
));
723 DECLARE("savelr", offsetof(struct savearea
*, save_lr
));
724 DECLARE("savectr", offsetof(struct savearea
*, save_ctr
));
725 DECLARE("savedar", offsetof(struct savearea
*, save_dar
));
726 DECLARE("savedsisr", offsetof(struct savearea
*, save_dsisr
));
727 DECLARE("saveexception", offsetof(struct savearea
*, save_exception
));
728 DECLARE("savefpscrpad", offsetof(struct savearea
*, save_fpscrpad
));
729 DECLARE("savefpscr", offsetof(struct savearea
*, save_fpscr
));
730 DECLARE("savevrsave", offsetof(struct savearea
*, save_vrsave
));
731 DECLARE("savevscr", offsetof(struct savearea
*, save_vscr
));
733 DECLARE("saver0", offsetof(struct savearea
*, save_r0
));
734 DECLARE("saver1", offsetof(struct savearea
*, save_r1
));
735 DECLARE("saver2", offsetof(struct savearea
*, save_r2
));
736 DECLARE("saver3", offsetof(struct savearea
*, save_r3
));
737 DECLARE("saver4", offsetof(struct savearea
*, save_r4
));
738 DECLARE("saver5", offsetof(struct savearea
*, save_r5
));
739 DECLARE("saver6", offsetof(struct savearea
*, save_r6
));
740 DECLARE("saver7", offsetof(struct savearea
*, save_r7
));
741 DECLARE("saver8", offsetof(struct savearea
*, save_r8
));
742 DECLARE("saver9", offsetof(struct savearea
*, save_r9
));
743 DECLARE("saver10", offsetof(struct savearea
*, save_r10
));
744 DECLARE("saver11", offsetof(struct savearea
*, save_r11
));
745 DECLARE("saver12", offsetof(struct savearea
*, save_r12
));
746 DECLARE("saver13", offsetof(struct savearea
*, save_r13
));
747 DECLARE("saver14", offsetof(struct savearea
*, save_r14
));
748 DECLARE("saver15", offsetof(struct savearea
*, save_r15
));
749 DECLARE("saver16", offsetof(struct savearea
*, save_r16
));
750 DECLARE("saver17", offsetof(struct savearea
*, save_r17
));
751 DECLARE("saver18", offsetof(struct savearea
*, save_r18
));
752 DECLARE("saver19", offsetof(struct savearea
*, save_r19
));
753 DECLARE("saver20", offsetof(struct savearea
*, save_r20
));
754 DECLARE("saver21", offsetof(struct savearea
*, save_r21
));
755 DECLARE("saver22", offsetof(struct savearea
*, save_r22
));
756 DECLARE("saver23", offsetof(struct savearea
*, save_r23
));
757 DECLARE("saver24", offsetof(struct savearea
*, save_r24
));
758 DECLARE("saver25", offsetof(struct savearea
*, save_r25
));
759 DECLARE("saver26", offsetof(struct savearea
*, save_r26
));
760 DECLARE("saver27", offsetof(struct savearea
*, save_r27
));
761 DECLARE("saver28", offsetof(struct savearea
*, save_r28
));
762 DECLARE("saver29", offsetof(struct savearea
*, save_r29
));
763 DECLARE("saver30", offsetof(struct savearea
*, save_r30
));
764 DECLARE("saver31", offsetof(struct savearea
*, save_r31
));
766 DECLARE("savesr0", offsetof(struct savearea
*, save_sr0
));
767 DECLARE("savesr1", offsetof(struct savearea
*, save_sr1
));
768 DECLARE("savesr2", offsetof(struct savearea
*, save_sr2
));
769 DECLARE("savesr3", offsetof(struct savearea
*, save_sr3
));
770 DECLARE("savesr4", offsetof(struct savearea
*, save_sr4
));
771 DECLARE("savesr5", offsetof(struct savearea
*, save_sr5
));
772 DECLARE("savesr6", offsetof(struct savearea
*, save_sr6
));
773 DECLARE("savesr7", offsetof(struct savearea
*, save_sr7
));
774 DECLARE("savesr8", offsetof(struct savearea
*, save_sr8
));
775 DECLARE("savesr9", offsetof(struct savearea
*, save_sr9
));
776 DECLARE("savesr10", offsetof(struct savearea
*, save_sr10
));
777 DECLARE("savesr11", offsetof(struct savearea
*, save_sr11
));
778 DECLARE("savesr12", offsetof(struct savearea
*, save_sr12
));
779 DECLARE("savesr13", offsetof(struct savearea
*, save_sr13
));
780 DECLARE("savesr14", offsetof(struct savearea
*, save_sr14
));
781 DECLARE("savesr15", offsetof(struct savearea
*, save_sr15
));
783 DECLARE("savefp0", offsetof(struct savearea_fpu
*, save_fp0
));
784 DECLARE("savefp1", offsetof(struct savearea_fpu
*, save_fp1
));
785 DECLARE("savefp2", offsetof(struct savearea_fpu
*, save_fp2
));
786 DECLARE("savefp3", offsetof(struct savearea_fpu
*, save_fp3
));
787 DECLARE("savefp4", offsetof(struct savearea_fpu
*, save_fp4
));
788 DECLARE("savefp5", offsetof(struct savearea_fpu
*, save_fp5
));
789 DECLARE("savefp6", offsetof(struct savearea_fpu
*, save_fp6
));
790 DECLARE("savefp7", offsetof(struct savearea_fpu
*, save_fp7
));
791 DECLARE("savefp8", offsetof(struct savearea_fpu
*, save_fp8
));
792 DECLARE("savefp9", offsetof(struct savearea_fpu
*, save_fp9
));
793 DECLARE("savefp10", offsetof(struct savearea_fpu
*, save_fp10
));
794 DECLARE("savefp11", offsetof(struct savearea_fpu
*, save_fp11
));
795 DECLARE("savefp12", offsetof(struct savearea_fpu
*, save_fp12
));
796 DECLARE("savefp13", offsetof(struct savearea_fpu
*, save_fp13
));
797 DECLARE("savefp14", offsetof(struct savearea_fpu
*, save_fp14
));
798 DECLARE("savefp15", offsetof(struct savearea_fpu
*, save_fp15
));
799 DECLARE("savefp16", offsetof(struct savearea_fpu
*, save_fp16
));
800 DECLARE("savefp17", offsetof(struct savearea_fpu
*, save_fp17
));
801 DECLARE("savefp18", offsetof(struct savearea_fpu
*, save_fp18
));
802 DECLARE("savefp19", offsetof(struct savearea_fpu
*, save_fp19
));
803 DECLARE("savefp20", offsetof(struct savearea_fpu
*, save_fp20
));
804 DECLARE("savefp21", offsetof(struct savearea_fpu
*, save_fp21
));
805 DECLARE("savefp22", offsetof(struct savearea_fpu
*, save_fp22
));
806 DECLARE("savefp23", offsetof(struct savearea_fpu
*, save_fp23
));
807 DECLARE("savefp24", offsetof(struct savearea_fpu
*, save_fp24
));
808 DECLARE("savefp25", offsetof(struct savearea_fpu
*, save_fp25
));
809 DECLARE("savefp26", offsetof(struct savearea_fpu
*, save_fp26
));
810 DECLARE("savefp27", offsetof(struct savearea_fpu
*, save_fp27
));
811 DECLARE("savefp28", offsetof(struct savearea_fpu
*, save_fp28
));
812 DECLARE("savefp29", offsetof(struct savearea_fpu
*, save_fp29
));
813 DECLARE("savefp30", offsetof(struct savearea_fpu
*, save_fp30
));
814 DECLARE("savefp31", offsetof(struct savearea_fpu
*, save_fp31
));
816 DECLARE("savevr0", offsetof(struct savearea_vec
*, save_vr0
));
817 DECLARE("savevr1", offsetof(struct savearea_vec
*, save_vr1
));
818 DECLARE("savevr2", offsetof(struct savearea_vec
*, save_vr2
));
819 DECLARE("savevr3", offsetof(struct savearea_vec
*, save_vr3
));
820 DECLARE("savevr4", offsetof(struct savearea_vec
*, save_vr4
));
821 DECLARE("savevr5", offsetof(struct savearea_vec
*, save_vr5
));
822 DECLARE("savevr6", offsetof(struct savearea_vec
*, save_vr6
));
823 DECLARE("savevr7", offsetof(struct savearea_vec
*, save_vr7
));
824 DECLARE("savevr8", offsetof(struct savearea_vec
*, save_vr8
));
825 DECLARE("savevr9", offsetof(struct savearea_vec
*, save_vr9
));
826 DECLARE("savevr10", offsetof(struct savearea_vec
*, save_vr10
));
827 DECLARE("savevr11", offsetof(struct savearea_vec
*, save_vr11
));
828 DECLARE("savevr12", offsetof(struct savearea_vec
*, save_vr12
));
829 DECLARE("savevr13", offsetof(struct savearea_vec
*, save_vr13
));
830 DECLARE("savevr14", offsetof(struct savearea_vec
*, save_vr14
));
831 DECLARE("savevr15", offsetof(struct savearea_vec
*, save_vr15
));
832 DECLARE("savevr16", offsetof(struct savearea_vec
*, save_vr16
));
833 DECLARE("savevr17", offsetof(struct savearea_vec
*, save_vr17
));
834 DECLARE("savevr18", offsetof(struct savearea_vec
*, save_vr18
));
835 DECLARE("savevr19", offsetof(struct savearea_vec
*, save_vr19
));
836 DECLARE("savevr20", offsetof(struct savearea_vec
*, save_vr20
));
837 DECLARE("savevr21", offsetof(struct savearea_vec
*, save_vr21
));
838 DECLARE("savevr22", offsetof(struct savearea_vec
*, save_vr22
));
839 DECLARE("savevr23", offsetof(struct savearea_vec
*, save_vr23
));
840 DECLARE("savevr24", offsetof(struct savearea_vec
*, save_vr24
));
841 DECLARE("savevr25", offsetof(struct savearea_vec
*, save_vr25
));
842 DECLARE("savevr26", offsetof(struct savearea_vec
*, save_vr26
));
843 DECLARE("savevr27", offsetof(struct savearea_vec
*, save_vr27
));
844 DECLARE("savevr28", offsetof(struct savearea_vec
*, save_vr28
));
845 DECLARE("savevr29", offsetof(struct savearea_vec
*, save_vr29
));
846 DECLARE("savevr30", offsetof(struct savearea_vec
*, save_vr30
));
847 DECLARE("savevr31", offsetof(struct savearea_vec
*, save_vr31
));
848 DECLARE("savevrvalid", offsetof(struct savearea_vec
*, save_vrvalid
));
850 /* PseudoKernel Exception Descriptor info */
851 DECLARE("BEDA_SRR0", offsetof(BEDA_t
*, srr0
));
852 DECLARE("BEDA_SRR1", offsetof(BEDA_t
*, srr1
));
853 DECLARE("BEDA_SPRG0", offsetof(BEDA_t
*, sprg0
));
854 DECLARE("BEDA_SPRG1", offsetof(BEDA_t
*, sprg1
));
856 /* PseudoKernel Interrupt Control Word */
857 DECLARE("BTTD_INTCONTROLWORD", offsetof(BTTD_t
*, InterruptControlWord
));
859 /* New state when exiting the pseudokernel */
860 DECLARE("BTTD_NEWEXITSTATE", offsetof(BTTD_t
*, NewExitState
));
862 /* PseudoKernel Test/Post Interrupt */
863 DECLARE("BTTD_TESTINTMASK", offsetof(BTTD_t
*, testIntMask
));
864 DECLARE("BTTD_POSTINTMASK", offsetof(BTTD_t
*, postIntMask
));
866 /* PseudoKernel Vectors */
867 DECLARE("BTTD_TRAP_VECTOR", offsetof(BTTD_t
*, TrapVector
));
868 DECLARE("BTTD_SYSCALL_VECTOR", offsetof(BTTD_t
*, SysCallVector
));
869 DECLARE("BTTD_INTERRUPT_VECTOR", offsetof(BTTD_t
*, InterruptVector
));
870 DECLARE("BTTD_PENDINGINT_VECTOR", offsetof(BTTD_t
*, PendingIntVector
));
872 /* PseudoKernel Bits, Masks and misc */
873 DECLARE("SYSCONTEXTSTATE", kInSystemContext
);
874 DECLARE("PSEUDOKERNELSTATE", kInPseudoKernel
);
875 DECLARE("INTSTATEMASK_B", 12);
876 DECLARE("INTSTATEMASK_E", 15);
877 DECLARE("INTCR2MASK_B", 8);
878 DECLARE("INTCR2MASK_E", 11);
879 DECLARE("INTBACKUPCR2MASK_B", 28);
880 DECLARE("INTBACKUPCR2MASK_E", 31);
881 DECLARE("INTCR2TOBACKUPSHIFT", kCR2ToBackupShift
);
882 DECLARE("BB_MAX_TRAP", bbMaxTrap
);
883 DECLARE("BB_RFI_TRAP", bbRFITrap
);
885 /* Various hackery */
886 DECLARE("procState", offsetof(struct processor
*, state
));
888 DECLARE("CPU_SUBTYPE_POWERPC_ALL", CPU_SUBTYPE_POWERPC_ALL
);
889 DECLARE("CPU_SUBTYPE_POWERPC_601", CPU_SUBTYPE_POWERPC_601
);
890 DECLARE("CPU_SUBTYPE_POWERPC_602", CPU_SUBTYPE_POWERPC_602
);
891 DECLARE("CPU_SUBTYPE_POWERPC_603", CPU_SUBTYPE_POWERPC_603
);
892 DECLARE("CPU_SUBTYPE_POWERPC_603e", CPU_SUBTYPE_POWERPC_603e
);
893 DECLARE("CPU_SUBTYPE_POWERPC_603ev", CPU_SUBTYPE_POWERPC_603ev
);
894 DECLARE("CPU_SUBTYPE_POWERPC_604", CPU_SUBTYPE_POWERPC_604
);
895 DECLARE("CPU_SUBTYPE_POWERPC_604e", CPU_SUBTYPE_POWERPC_604e
);
896 DECLARE("CPU_SUBTYPE_POWERPC_620", CPU_SUBTYPE_POWERPC_620
);
897 DECLARE("CPU_SUBTYPE_POWERPC_750", CPU_SUBTYPE_POWERPC_750
);
898 DECLARE("CPU_SUBTYPE_POWERPC_7400", CPU_SUBTYPE_POWERPC_7400
);
899 DECLARE("CPU_SUBTYPE_POWERPC_7450", CPU_SUBTYPE_POWERPC_7450
);
901 DECLARE("shdIBAT", offsetof(struct shadowBAT
*, IBATs
));
902 DECLARE("shdDBAT", offsetof(struct shadowBAT
*, DBATs
));
906 return(0); /* For ANSI C :-) */