]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ppc/genassym.c
a09dbb5cde520de6af47ae303686e46f68585a4c
[apple/xnu.git] / osfmk / ppc / genassym.c
1 /*
2 * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23 /*
24 * @OSF_COPYRIGHT@
25 *
26 */
27
28 /*
29 * genassym.c is used to produce an
30 * assembly file which, intermingled with unuseful assembly code,
31 * has all the necessary definitions emitted. This assembly file is
32 * then postprocessed with sed to extract only these definitions
33 * and thus the final assyms.s is created.
34 *
35 * This convoluted means is necessary since the structure alignment
36 * and packing may be different between the host machine and the
37 * target so we are forced into using the cross compiler to generate
38 * the values, but we cannot run anything on the target machine.
39 */
40
41 #include <va_list.h>
42 #include <types.h>
43
44 #include <kern/task.h>
45 #include <kern/thread.h>
46 #include <kern/host.h>
47 #include <kern/lock.h>
48 #include <kern/locks.h>
49 #include <kern/processor.h>
50 #include <ppc/exception.h>
51 #include <ppc/thread.h>
52 #include <ppc/misc_protos.h>
53 #include <kern/syscall_sw.h>
54 #include <ppc/low_trace.h>
55 #include <ppc/PseudoKernel.h>
56 #include <ppc/mappings.h>
57 #include <ppc/Firmware.h>
58 #include <ppc/low_trace.h>
59 #include <vm/vm_map.h>
60 #include <vm/pmap.h>
61 #include <ppc/pmap.h>
62 #include <ppc/Diagnostics.h>
63 #include <pexpert/pexpert.h>
64 #include <mach/machine.h>
65 #include <ppc/vmachmon.h>
66 #include <ppc/hw_perfmon.h>
67 #include <ppc/PPCcalls.h>
68 #include <ppc/mem.h>
69 #include <ppc/boot.h>
70 #include <ppc/lowglobals.h>
71
72 /* Undefine standard offsetof because it is different than the one here */
73 #undef offsetof
74 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE)0)->MEMBER)
75
76 #define DECLARE(SYM,VAL) \
77 __asm("#DEFINITION##define\t" SYM "\t%0" : : "n" ((u_int)(VAL)))
78
79 int main(int argc, char *argv[])
80 {
81 /* Process Control Block */
82 DECLARE("ACT_MACT_KSP", offsetof(thread_t, machine.ksp));
83 DECLARE("ACT_MACT_BEDA", offsetof(thread_t, machine.bbDescAddr));
84 DECLARE("ACT_MACT_BTS", offsetof(thread_t, machine.bbTableStart));
85 DECLARE("ACT_MACT_BTE", offsetof(thread_t, machine.bbTaskEnv));
86 DECLARE("ACT_MACT_SPF", offsetof(thread_t, machine.specFlags));
87 DECLARE("ACT_PREEMPT_CNT", offsetof(thread_t, machine.preemption_count));
88 DECLARE("ACT_PER_PROC", offsetof(thread_t, machine.PerProc));
89 DECLARE("qactTimer", offsetof(thread_t, machine.qactTimer));
90 DECLARE("umwSpace", offsetof(thread_t, machine.umwSpace));
91 DECLARE("umwRelo", offsetof(thread_t, machine.umwRelo));
92 DECLARE("umwSwitchAway", umwSwitchAway);
93 DECLARE("umwSwitchAwayb", umwSwitchAwayb);
94 DECLARE("bbTrap", offsetof(thread_t, machine.bbTrap));
95 DECLARE("bbSysCall", offsetof(thread_t, machine.bbSysCall));
96 DECLARE("bbInterrupt", offsetof(thread_t, machine.bbInterrupt));
97 DECLARE("bbPending", offsetof(thread_t, machine.bbPending));
98
99 DECLARE("floatUsed", floatUsed);
100 DECLARE("vectorUsed", vectorUsed);
101 DECLARE("runningVM", runningVM);
102 DECLARE("runningVMbit", runningVMbit);
103 DECLARE("floatCng", floatCng);
104 DECLARE("floatCngbit", floatCngbit);
105 DECLARE("vectorCng", vectorCng);
106 DECLARE("vectorCngbit", vectorCngbit);
107 DECLARE("userProtKey", userProtKey);
108 DECLARE("userProtKeybit", userProtKeybit);
109
110 DECLARE("bbThread", bbThread);
111 DECLARE("bbThreadbit", bbThreadbit);
112 DECLARE("bbNoMachSC", bbNoMachSC);
113 DECLARE("bbNoMachSCbit",bbNoMachSCbit);
114 DECLARE("bbPreemptive", bbPreemptive);
115 DECLARE("bbPreemptivebit", bbPreemptivebit);
116
117 DECLARE("fvChkb", fvChkb);
118 DECLARE("fvChk", fvChk);
119 DECLARE("FamVMena", FamVMena);
120 DECLARE("FamVMenabit", FamVMenabit);
121 DECLARE("FamVMmode", FamVMmode);
122 DECLARE("FamVMmodebit", FamVMmodebit);
123 DECLARE("perfMonitor", perfMonitor);
124 DECLARE("perfMonitorbit", perfMonitorbit);
125 DECLARE("OnProc", OnProc);
126 DECLARE("OnProcbit", OnProcbit);
127
128 /* Per Proc info structure */
129 DECLARE("PP_CPU_NUMBER", offsetof(struct per_proc_info *, cpu_number));
130 DECLARE("PP_CPU_FLAGS", offsetof(struct per_proc_info *, cpu_flags));
131 DECLARE("PP_ISTACKPTR", offsetof(struct per_proc_info *, istackptr));
132 DECLARE("PP_INTSTACK_TOP_SS", offsetof(struct per_proc_info *, intstack_top_ss));
133 DECLARE("PP_DEBSTACKPTR", offsetof(struct per_proc_info *, debstackptr));
134 DECLARE("PP_DEBSTACK_TOP_SS", offsetof(struct per_proc_info *, debstack_top_ss));
135 DECLARE("PP_HIBERNATE", offsetof(struct per_proc_info *, hibernate));
136 DECLARE("FPUowner", offsetof(struct per_proc_info *, FPU_owner));
137 DECLARE("VMXowner", offsetof(struct per_proc_info *, VMX_owner));
138 DECLARE("holdQFret", offsetof(struct per_proc_info *, holdQFret));
139 DECLARE("rtcPop", offsetof(struct per_proc_info *, rtcPop));
140
141 DECLARE("PP_PENDING_AST", offsetof(struct per_proc_info *, pending_ast));
142 DECLARE("quickfret", offsetof(struct per_proc_info *, quickfret));
143 DECLARE("lclfree", offsetof(struct per_proc_info *, lclfree));
144 DECLARE("lclfreecnt", offsetof(struct per_proc_info *, lclfreecnt));
145 DECLARE("PP_INTS_ENABLED", offsetof(struct per_proc_info *, interrupts_enabled));
146 DECLARE("UAW", offsetof(struct per_proc_info *, Uassist));
147 DECLARE("next_savearea", offsetof(struct per_proc_info *, next_savearea));
148 DECLARE("ppbbTaskEnv", offsetof(struct per_proc_info *, ppbbTaskEnv));
149 DECLARE("liveVRS", offsetof(struct per_proc_info *, liveVRSave));
150 DECLARE("spcFlags", offsetof(struct per_proc_info *, spcFlags));
151 DECLARE("spcTRc", offsetof(struct per_proc_info *, spcTRc));
152 DECLARE("spcTRp", offsetof(struct per_proc_info *, spcTRp));
153 DECLARE("ruptStamp", offsetof(struct per_proc_info *, ruptStamp));
154 DECLARE("pfAvailable", offsetof(struct per_proc_info *, pf.Available));
155 DECLARE("pfFloat", pfFloat);
156 DECLARE("pfFloatb", pfFloatb);
157 DECLARE("pfAltivec", pfAltivec);
158 DECLARE("pfAltivecb", pfAltivecb);
159 DECLARE("pfAvJava", pfAvJava);
160 DECLARE("pfAvJavab", pfAvJavab);
161 DECLARE("pfSMPcap", pfSMPcap);
162 DECLARE("pfSMPcapb", pfSMPcapb);
163 DECLARE("pfCanSleep", pfCanSleep);
164 DECLARE("pfCanSleepb", pfCanSleepb);
165 DECLARE("pfCanNap", pfCanNap);
166 DECLARE("pfCanNapb", pfCanNapb);
167 DECLARE("pfCanDoze", pfCanDoze);
168 DECLARE("pfCanDozeb", pfCanDozeb);
169 DECLARE("pfSlowNap", pfSlowNap);
170 DECLARE("pfSlowNapb", pfSlowNapb);
171 DECLARE("pfNoMuMMCK", pfNoMuMMCK);
172 DECLARE("pfNoMuMMCKb", pfNoMuMMCKb);
173 DECLARE("pfNoL2PFNap", pfNoL2PFNap);
174 DECLARE("pfNoL2PFNapb", pfNoL2PFNapb);
175 DECLARE("pfSCOMFixUp", pfSCOMFixUp);
176 DECLARE("pfSCOMFixUpb", pfSCOMFixUpb);
177 DECLARE("pfHasDcba", pfHasDcba);
178 DECLARE("pfHasDcbab", pfHasDcbab);
179 DECLARE("pfL1fa", pfL1fa);
180 DECLARE("pfL1fab", pfL1fab);
181 DECLARE("pfL2", pfL2);
182 DECLARE("pfL2b", pfL2b);
183 DECLARE("pfL2fa", pfL2fa);
184 DECLARE("pfL2fab", pfL2fab);
185 DECLARE("pfL2i", pfL2i);
186 DECLARE("pfL2ib", pfL2ib);
187 DECLARE("pfLClck", pfLClck);
188 DECLARE("pfLClckb", pfLClckb);
189 DECLARE("pfWillNap", pfWillNap);
190 DECLARE("pfWillNapb", pfWillNapb);
191 DECLARE("pfNoMSRir", pfNoMSRir);
192 DECLARE("pfNoMSRirb", pfNoMSRirb);
193 DECLARE("pfL3pdet", pfL3pdet);
194 DECLARE("pfL3pdetb", pfL3pdetb);
195 DECLARE("pf128Byte", pf128Byte);
196 DECLARE("pf128Byteb", pf128Byteb);
197 DECLARE("pf32Byte", pf32Byte);
198 DECLARE("pf32Byteb", pf32Byteb);
199 DECLARE("pf64Bit", pf64Bit);
200 DECLARE("pf64Bitb", pf64Bitb);
201 DECLARE("pfL3", pfL3);
202 DECLARE("pfL3b", pfL3b);
203 DECLARE("pfL3fa", pfL3fa);
204 DECLARE("pfL3fab", pfL3fab);
205 DECLARE("pfValid", pfValid);
206 DECLARE("pfValidb", pfValidb);
207 DECLARE("pfrptdProc", offsetof(struct per_proc_info *, pf.rptdProc));
208 DECLARE("pflineSize", offsetof(struct per_proc_info *, pf.lineSize));
209 DECLARE("pfl1iSize", offsetof(struct per_proc_info *, pf.l1iSize));
210 DECLARE("pfl1dSize", offsetof(struct per_proc_info *, pf.l1dSize));
211 DECLARE("pfl2cr", offsetof(struct per_proc_info *, pf.l2cr));
212 DECLARE("pfl2Size", offsetof(struct per_proc_info *, pf.l2Size));
213 DECLARE("pfl3cr", offsetof(struct per_proc_info *, pf.l3cr));
214 DECLARE("pfl3Size", offsetof(struct per_proc_info *, pf.l3Size));
215 DECLARE("pfHID0", offsetof(struct per_proc_info *, pf.pfHID0));
216 DECLARE("pfHID1", offsetof(struct per_proc_info *, pf.pfHID1));
217 DECLARE("pfHID2", offsetof(struct per_proc_info *, pf.pfHID2));
218 DECLARE("pfHID3", offsetof(struct per_proc_info *, pf.pfHID3));
219 DECLARE("pfHID4", offsetof(struct per_proc_info *, pf.pfHID4));
220 DECLARE("pfHID5", offsetof(struct per_proc_info *, pf.pfHID5));
221 DECLARE("pfMSSCR0", offsetof(struct per_proc_info *, pf.pfMSSCR0));
222 DECLARE("pfMSSCR1", offsetof(struct per_proc_info *, pf.pfMSSCR1));
223 DECLARE("pfICTRL", offsetof(struct per_proc_info *, pf.pfICTRL));
224 DECLARE("pfLDSTCR", offsetof(struct per_proc_info *, pf.pfLDSTCR));
225 DECLARE("pfLDSTDB", offsetof(struct per_proc_info *, pf.pfLDSTDB));
226 DECLARE("pfl2crOriginal", offsetof(struct per_proc_info *, pf.l2crOriginal));
227 DECLARE("pfl3crOriginal", offsetof(struct per_proc_info *, pf.l3crOriginal));
228 DECLARE("pfBootConfig", offsetof(struct per_proc_info *, pf.pfBootConfig));
229 DECLARE("pfPowerModes", offsetof(struct per_proc_info *, pf.pfPowerModes));
230 DECLARE("pfPowerTune0", offsetof(struct per_proc_info *, pf.pfPowerTune0));
231 DECLARE("pfPowerTune1", offsetof(struct per_proc_info *, pf.pfPowerTune1));
232 DECLARE("pmType", pmType);
233 DECLARE("pmDPLLVmin", pmDPLLVmin);
234 DECLARE("pmDPLLVminb", pmDPLLVminb);
235 DECLARE("pmPowerTune", pmPowerTune);
236 DECLARE("pmDFS", pmDFS);
237 DECLARE("pmDualPLL", pmDualPLL);
238 DECLARE("pfPTEG", offsetof(struct per_proc_info *, pf.pfPTEG));
239 DECLARE("pfMaxVAddr", offsetof(struct per_proc_info *, pf.pfMaxVAddr));
240 DECLARE("pfMaxPAddr", offsetof(struct per_proc_info *, pf.pfMaxPAddr));
241 DECLARE("pfSize", sizeof(procFeatures));
242
243 DECLARE("validSegs", offsetof(struct per_proc_info *, validSegs));
244 DECLARE("ppUserPmapVirt", offsetof(struct per_proc_info *, ppUserPmapVirt));
245 DECLARE("ppUserPmap", offsetof(struct per_proc_info *, ppUserPmap));
246 DECLARE("ppMapFlags", offsetof(struct per_proc_info *, ppMapFlags));
247 DECLARE("ppInvSeg", offsetof(struct per_proc_info *, ppInvSeg));
248 DECLARE("ppCurSeg", offsetof(struct per_proc_info *, ppCurSeg));
249 DECLARE("ppSegSteal", offsetof(struct per_proc_info *, ppSegSteal));
250
251 DECLARE("VMMareaPhys", offsetof(struct per_proc_info *, VMMareaPhys));
252 DECLARE("VMMXAFlgs", offsetof(struct per_proc_info *, VMMXAFlgs));
253 DECLARE("FAMintercept", offsetof(struct per_proc_info *, FAMintercept));
254
255 DECLARE("ppUMWmp", offsetof(struct per_proc_info *, ppUMWmp));
256
257 DECLARE("tempr0", offsetof(struct per_proc_info *, tempr0));
258 DECLARE("tempr1", offsetof(struct per_proc_info *, tempr1));
259 DECLARE("tempr2", offsetof(struct per_proc_info *, tempr2));
260 DECLARE("tempr3", offsetof(struct per_proc_info *, tempr3));
261 DECLARE("tempr4", offsetof(struct per_proc_info *, tempr4));
262 DECLARE("tempr5", offsetof(struct per_proc_info *, tempr5));
263 DECLARE("tempr6", offsetof(struct per_proc_info *, tempr6));
264 DECLARE("tempr7", offsetof(struct per_proc_info *, tempr7));
265 DECLARE("tempr8", offsetof(struct per_proc_info *, tempr8));
266 DECLARE("tempr9", offsetof(struct per_proc_info *, tempr9));
267 DECLARE("tempr10", offsetof(struct per_proc_info *, tempr10));
268 DECLARE("tempr11", offsetof(struct per_proc_info *, tempr11));
269 DECLARE("tempr12", offsetof(struct per_proc_info *, tempr12));
270 DECLARE("tempr13", offsetof(struct per_proc_info *, tempr13));
271 DECLARE("tempr14", offsetof(struct per_proc_info *, tempr14));
272 DECLARE("tempr15", offsetof(struct per_proc_info *, tempr15));
273 DECLARE("tempr16", offsetof(struct per_proc_info *, tempr16));
274 DECLARE("tempr17", offsetof(struct per_proc_info *, tempr17));
275 DECLARE("tempr18", offsetof(struct per_proc_info *, tempr18));
276 DECLARE("tempr19", offsetof(struct per_proc_info *, tempr19));
277 DECLARE("tempr20", offsetof(struct per_proc_info *, tempr20));
278 DECLARE("tempr21", offsetof(struct per_proc_info *, tempr21));
279 DECLARE("tempr22", offsetof(struct per_proc_info *, tempr22));
280 DECLARE("tempr23", offsetof(struct per_proc_info *, tempr23));
281 DECLARE("tempr24", offsetof(struct per_proc_info *, tempr24));
282 DECLARE("tempr25", offsetof(struct per_proc_info *, tempr25));
283 DECLARE("tempr26", offsetof(struct per_proc_info *, tempr26));
284 DECLARE("tempr27", offsetof(struct per_proc_info *, tempr27));
285 DECLARE("tempr28", offsetof(struct per_proc_info *, tempr28));
286 DECLARE("tempr29", offsetof(struct per_proc_info *, tempr29));
287 DECLARE("tempr30", offsetof(struct per_proc_info *, tempr30));
288 DECLARE("tempr31", offsetof(struct per_proc_info *, tempr31));
289
290 DECLARE("emfp0", offsetof(struct per_proc_info *, emfp0));
291 DECLARE("emfp1", offsetof(struct per_proc_info *, emfp1));
292 DECLARE("emfp2", offsetof(struct per_proc_info *, emfp2));
293 DECLARE("emfp3", offsetof(struct per_proc_info *, emfp3));
294 DECLARE("emfp4", offsetof(struct per_proc_info *, emfp4));
295 DECLARE("emfp5", offsetof(struct per_proc_info *, emfp5));
296 DECLARE("emfp6", offsetof(struct per_proc_info *, emfp6));
297 DECLARE("emfp7", offsetof(struct per_proc_info *, emfp7));
298 DECLARE("emfp8", offsetof(struct per_proc_info *, emfp8));
299 DECLARE("emfp9", offsetof(struct per_proc_info *, emfp9));
300 DECLARE("emfp10", offsetof(struct per_proc_info *, emfp10));
301 DECLARE("emfp11", offsetof(struct per_proc_info *, emfp11));
302 DECLARE("emfp12", offsetof(struct per_proc_info *, emfp12));
303 DECLARE("emfp13", offsetof(struct per_proc_info *, emfp13));
304 DECLARE("emfp14", offsetof(struct per_proc_info *, emfp14));
305 DECLARE("emfp15", offsetof(struct per_proc_info *, emfp15));
306 DECLARE("emfp16", offsetof(struct per_proc_info *, emfp16));
307 DECLARE("emfp17", offsetof(struct per_proc_info *, emfp17));
308 DECLARE("emfp18", offsetof(struct per_proc_info *, emfp18));
309 DECLARE("emfp19", offsetof(struct per_proc_info *, emfp19));
310 DECLARE("emfp20", offsetof(struct per_proc_info *, emfp20));
311 DECLARE("emfp21", offsetof(struct per_proc_info *, emfp21));
312 DECLARE("emfp22", offsetof(struct per_proc_info *, emfp22));
313 DECLARE("emfp23", offsetof(struct per_proc_info *, emfp23));
314 DECLARE("emfp24", offsetof(struct per_proc_info *, emfp24));
315 DECLARE("emfp25", offsetof(struct per_proc_info *, emfp25));
316 DECLARE("emfp26", offsetof(struct per_proc_info *, emfp26));
317 DECLARE("emfp27", offsetof(struct per_proc_info *, emfp27));
318 DECLARE("emfp28", offsetof(struct per_proc_info *, emfp28));
319 DECLARE("emfp29", offsetof(struct per_proc_info *, emfp29));
320 DECLARE("emfp30", offsetof(struct per_proc_info *, emfp30));
321 DECLARE("emfp31", offsetof(struct per_proc_info *, emfp31));
322 DECLARE("emfpscr_pad", offsetof(struct per_proc_info *, emfpscr_pad));
323 DECLARE("emfpscr", offsetof(struct per_proc_info *, emfpscr));
324
325 DECLARE("emvr0", offsetof(struct per_proc_info *, emvr0));
326 DECLARE("emvr1", offsetof(struct per_proc_info *, emvr1));
327 DECLARE("emvr2", offsetof(struct per_proc_info *, emvr2));
328 DECLARE("emvr3", offsetof(struct per_proc_info *, emvr3));
329 DECLARE("emvr4", offsetof(struct per_proc_info *, emvr4));
330 DECLARE("emvr5", offsetof(struct per_proc_info *, emvr5));
331 DECLARE("emvr6", offsetof(struct per_proc_info *, emvr6));
332 DECLARE("emvr7", offsetof(struct per_proc_info *, emvr7));
333 DECLARE("emvr8", offsetof(struct per_proc_info *, emvr8));
334 DECLARE("emvr9", offsetof(struct per_proc_info *, emvr9));
335 DECLARE("emvr10", offsetof(struct per_proc_info *, emvr10));
336 DECLARE("emvr11", offsetof(struct per_proc_info *, emvr11));
337 DECLARE("emvr12", offsetof(struct per_proc_info *, emvr12));
338 DECLARE("emvr13", offsetof(struct per_proc_info *, emvr13));
339 DECLARE("emvr14", offsetof(struct per_proc_info *, emvr14));
340 DECLARE("emvr15", offsetof(struct per_proc_info *, emvr15));
341 DECLARE("emvr16", offsetof(struct per_proc_info *, emvr16));
342 DECLARE("emvr17", offsetof(struct per_proc_info *, emvr17));
343 DECLARE("emvr18", offsetof(struct per_proc_info *, emvr18));
344 DECLARE("emvr19", offsetof(struct per_proc_info *, emvr19));
345 DECLARE("emvr20", offsetof(struct per_proc_info *, emvr20));
346 DECLARE("emvr21", offsetof(struct per_proc_info *, emvr21));
347 DECLARE("emvr22", offsetof(struct per_proc_info *, emvr22));
348 DECLARE("emvr23", offsetof(struct per_proc_info *, emvr23));
349 DECLARE("emvr24", offsetof(struct per_proc_info *, emvr24));
350 DECLARE("emvr25", offsetof(struct per_proc_info *, emvr25));
351 DECLARE("emvr26", offsetof(struct per_proc_info *, emvr26));
352 DECLARE("emvr27", offsetof(struct per_proc_info *, emvr27));
353 DECLARE("emvr28", offsetof(struct per_proc_info *, emvr28));
354 DECLARE("emvr29", offsetof(struct per_proc_info *, emvr29));
355 DECLARE("emvr30", offsetof(struct per_proc_info *, emvr30));
356 DECLARE("emvr31", offsetof(struct per_proc_info *, emvr31));
357 DECLARE("empadvr", offsetof(struct per_proc_info *, empadvr));
358 DECLARE("skipListPrev", offsetof(struct per_proc_info *, skipListPrev));
359 DECLARE("ppSize", sizeof(struct per_proc_info));
360 DECLARE("ppe_paddr", offsetof(struct per_proc_entry *, ppe_paddr));
361 DECLARE("ppe_vaddr", offsetof(struct per_proc_entry *, ppe_vaddr));
362 DECLARE("ppeSize", sizeof(struct per_proc_entry));
363 DECLARE("MAX_CPUS", MAX_CPUS);
364 DECLARE("patcharea", offsetof(struct per_proc_info *, patcharea));
365
366 DECLARE("hwCounts", offsetof(struct per_proc_info *, hwCtr));
367 DECLARE("hwInVains", offsetof(struct per_proc_info *, hwCtr.hwInVains));
368 DECLARE("hwResets", offsetof(struct per_proc_info *, hwCtr.hwResets));
369 DECLARE("hwMachineChecks", offsetof(struct per_proc_info *, hwCtr.hwMachineChecks));
370 DECLARE("hwDSIs", offsetof(struct per_proc_info *, hwCtr.hwDSIs));
371 DECLARE("hwISIs", offsetof(struct per_proc_info *, hwCtr.hwISIs));
372 DECLARE("hwExternals", offsetof(struct per_proc_info *, hwCtr.hwExternals));
373 DECLARE("hwAlignments", offsetof(struct per_proc_info *, hwCtr.hwAlignments));
374 DECLARE("hwPrograms", offsetof(struct per_proc_info *, hwCtr.hwPrograms));
375 DECLARE("hwFloatPointUnavailable", offsetof(struct per_proc_info *, hwCtr.hwFloatPointUnavailable));
376 DECLARE("hwDecrementers", offsetof(struct per_proc_info *, hwCtr.hwDecrementers));
377 DECLARE("hwIOErrors", offsetof(struct per_proc_info *, hwCtr.hwIOErrors));
378 DECLARE("hwrsvd0", offsetof(struct per_proc_info *, hwCtr.hwrsvd0));
379 DECLARE("hwSystemCalls", offsetof(struct per_proc_info *, hwCtr.hwSystemCalls));
380 DECLARE("hwTraces", offsetof(struct per_proc_info *, hwCtr.hwTraces));
381 DECLARE("hwFloatingPointAssists", offsetof(struct per_proc_info *, hwCtr.hwFloatingPointAssists));
382 DECLARE("hwPerformanceMonitors", offsetof(struct per_proc_info *, hwCtr.hwPerformanceMonitors));
383 DECLARE("hwAltivecs", offsetof(struct per_proc_info *, hwCtr.hwAltivecs));
384 DECLARE("hwrsvd1", offsetof(struct per_proc_info *, hwCtr.hwrsvd1));
385 DECLARE("hwrsvd2", offsetof(struct per_proc_info *, hwCtr.hwrsvd2));
386 DECLARE("hwrsvd3", offsetof(struct per_proc_info *, hwCtr.hwrsvd3));
387 DECLARE("hwInstBreakpoints", offsetof(struct per_proc_info *, hwCtr.hwInstBreakpoints));
388 DECLARE("hwSystemManagements", offsetof(struct per_proc_info *, hwCtr.hwSystemManagements));
389 DECLARE("hwAltivecAssists", offsetof(struct per_proc_info *, hwCtr.hwAltivecAssists));
390 DECLARE("hwThermal", offsetof(struct per_proc_info *, hwCtr.hwThermal));
391 DECLARE("hwrsvd5", offsetof(struct per_proc_info *, hwCtr.hwrsvd5));
392 DECLARE("hwrsvd6", offsetof(struct per_proc_info *, hwCtr.hwrsvd6));
393 DECLARE("hwrsvd7", offsetof(struct per_proc_info *, hwCtr.hwrsvd7));
394 DECLARE("hwrsvd8", offsetof(struct per_proc_info *, hwCtr.hwrsvd8));
395 DECLARE("hwrsvd9", offsetof(struct per_proc_info *, hwCtr.hwrsvd9));
396 DECLARE("hwrsvd10", offsetof(struct per_proc_info *, hwCtr.hwrsvd10));
397 DECLARE("hwrsvd11", offsetof(struct per_proc_info *, hwCtr.hwrsvd11));
398 DECLARE("hwrsvd12", offsetof(struct per_proc_info *, hwCtr.hwrsvd12));
399 DECLARE("hwrsvd13", offsetof(struct per_proc_info *, hwCtr.hwrsvd13));
400 DECLARE("hwTrace601", offsetof(struct per_proc_info *, hwCtr.hwTrace601));
401 DECLARE("hwSIGPs", offsetof(struct per_proc_info *, hwCtr.hwSIGPs));
402 DECLARE("hwPreemptions", offsetof(struct per_proc_info *, hwCtr.hwPreemptions));
403 DECLARE("hwContextSwitchs", offsetof(struct per_proc_info *, hwCtr.hwContextSwitchs));
404 DECLARE("hwShutdowns", offsetof(struct per_proc_info *, hwCtr.hwShutdowns));
405 DECLARE("hwChokes", offsetof(struct per_proc_info *, hwCtr.hwChokes));
406 DECLARE("hwDataSegments", offsetof(struct per_proc_info *, hwCtr.hwDataSegments));
407 DECLARE("hwInstructionSegments", offsetof(struct per_proc_info *, hwCtr.hwInstructionSegments));
408 DECLARE("hwSoftPatches", offsetof(struct per_proc_info *, hwCtr.hwSoftPatches));
409 DECLARE("hwMaintenances", offsetof(struct per_proc_info *, hwCtr.hwMaintenances));
410 DECLARE("hwInstrumentations", offsetof(struct per_proc_info *, hwCtr.hwInstrumentations));
411 DECLARE("hwRedrives", offsetof(struct per_proc_info *, hwCtr.hwRedrives));
412 DECLARE("hwIgnored", offsetof(struct per_proc_info *, hwCtr.hwIgnored));
413 DECLARE("hwhdec", offsetof(struct per_proc_info *, hwCtr.hwhdec));
414 DECLARE("hwSteals", offsetof(struct per_proc_info *, hwCtr.hwSteals));
415
416 DECLARE("hwWalkPhys", offsetof(struct per_proc_info *, hwCtr.hwWalkPhys));
417 DECLARE("hwWalkFull", offsetof(struct per_proc_info *, hwCtr.hwWalkFull));
418 DECLARE("hwWalkMerge", offsetof(struct per_proc_info *, hwCtr.hwWalkMerge));
419 DECLARE("hwWalkQuick", offsetof(struct per_proc_info *, hwCtr.hwWalkQuick));
420
421 DECLARE("hwMckHang", offsetof(struct per_proc_info *, hwCtr.hwMckHang));
422 DECLARE("hwMckSLBPE", offsetof(struct per_proc_info *, hwCtr.hwMckSLBPE));
423 DECLARE("hwMckTLBPE", offsetof(struct per_proc_info *, hwCtr.hwMckTLBPE));
424 DECLARE("hwMckERCPE", offsetof(struct per_proc_info *, hwCtr.hwMckERCPE));
425 DECLARE("hwMckL1DPE", offsetof(struct per_proc_info *, hwCtr.hwMckL1DPE));
426 DECLARE("hwMckL1TPE", offsetof(struct per_proc_info *, hwCtr.hwMckL1TPE));
427 DECLARE("hwMckUE", offsetof(struct per_proc_info *, hwCtr.hwMckUE));
428 DECLARE("hwMckIUE", offsetof(struct per_proc_info *, hwCtr.hwMckIUE));
429 DECLARE("hwMckIUEr", offsetof(struct per_proc_info *, hwCtr.hwMckIUEr));
430 DECLARE("hwMckDUE", offsetof(struct per_proc_info *, hwCtr.hwMckDUE));
431 DECLARE("hwMckDTW", offsetof(struct per_proc_info *, hwCtr.hwMckDTW));
432 DECLARE("hwMckUnk", offsetof(struct per_proc_info *, hwCtr.hwMckUnk));
433 DECLARE("hwMckExt", offsetof(struct per_proc_info *, hwCtr.hwMckExt));
434 DECLARE("hwMckICachePE", offsetof(struct per_proc_info *, hwCtr.hwMckICachePE));
435 DECLARE("hwMckITagPE", offsetof(struct per_proc_info *, hwCtr.hwMckITagPE));
436 DECLARE("hwMckIEratPE", offsetof(struct per_proc_info *, hwCtr.hwMckIEratPE));
437 DECLARE("hwMckDEratPE", offsetof(struct per_proc_info *, hwCtr.hwMckDEratPE));
438
439 DECLARE("napStamp", offsetof(struct per_proc_info *, hwCtr.napStamp));
440 DECLARE("napTotal", offsetof(struct per_proc_info *, hwCtr.napTotal));
441 DECLARE("PP_PROCESSOR", offsetof(struct per_proc_info *, processor[0]));
442 DECLARE("PP_PROCESSOR_SIZE", sizeof(((struct per_proc_info *)0)->processor));
443 DECLARE("PROCESSOR_SIZE", sizeof (struct processor));
444
445 DECLARE("patchAddr", offsetof(struct patch_entry *, addr));
446 DECLARE("patchData", offsetof(struct patch_entry *, data));
447 DECLARE("patchType", offsetof(struct patch_entry *, type));
448 DECLARE("patchValue", offsetof(struct patch_entry *, value));
449 DECLARE("peSize", sizeof(patch_entry_t));
450 DECLARE("PATCH_PROCESSOR", PATCH_PROCESSOR);
451 DECLARE("PATCH_FEATURE", PATCH_FEATURE);
452 DECLARE("PATCH_END_OF_TABLE", PATCH_END_OF_TABLE);
453 DECLARE("PatchExt32", PatchExt32);
454 DECLARE("PatchExt32b", PatchExt32b);
455 DECLARE("PatchLwsync", PatchLwsync);
456 DECLARE("PatchLwsyncb", PatchLwsyncb);
457
458 DECLARE("RESETHANDLER_TYPE", offsetof(struct resethandler *, type));
459 DECLARE("RESETHANDLER_CALL", offsetof(struct resethandler *, call_paddr));
460 DECLARE("RESETHANDLER_ARG", offsetof(struct resethandler *, arg__paddr));
461
462 /* we want offset from
463 * bottom of kernel stack, not offset into structure
464 */
465 #define IKSBASE (u_int)STACK_IKS(0)
466
467 /* values from kern/thread.h */
468 DECLARE("THREAD_OPTIONS", offsetof(thread_t, options));
469 DECLARE("TH_OPT_DELAYIDLE", TH_OPT_DELAYIDLE);
470 DECLARE("THREAD_KERNEL_STACK", offsetof(thread_t, kernel_stack));
471 DECLARE("THREAD_RECOVER", offsetof(thread_t, recover));
472 DECLARE("THREAD_FUNNEL_LOCK",
473 offsetof(thread_t, funnel_lock));
474 DECLARE("THREAD_FUNNEL_STATE",
475 offsetof(thread_t, funnel_state));
476 DECLARE("LOCK_FNL_MUTEX",
477 offsetof(struct funnel_lock *, fnl_mutex));
478
479 DECLARE("ACT_TASK", offsetof(thread_t, task));
480 DECLARE("ACT_MACT_PCB", offsetof(thread_t, machine.pcb));
481 DECLARE("ACT_MACT_UPCB", offsetof(thread_t, machine.upcb));
482 DECLARE("ACT_AST", offsetof(thread_t, ast));
483 DECLARE("ACT_VMMAP", offsetof(thread_t, map));
484 DECLARE("vmmCEntry", offsetof(thread_t, machine.vmmCEntry));
485 DECLARE("vmmControl", offsetof(thread_t, machine.vmmControl));
486 DECLARE("curctx", offsetof(thread_t, machine.curctx));
487 DECLARE("deferctx", offsetof(thread_t, machine.deferctx));
488 DECLARE("facctx", offsetof(thread_t, machine.facctx));
489 #ifdef MACH_BSD
490 DECLARE("CTHREAD_SELF", offsetof(thread_t, machine.cthread_self));
491 #endif
492
493 DECLARE("FPUsave", offsetof(struct facility_context *,FPUsave));
494 DECLARE("FPUlevel", offsetof(struct facility_context *,FPUlevel));
495 DECLARE("FPUcpu", offsetof(struct facility_context *,FPUcpu));
496 DECLARE("FPUsync", offsetof(struct facility_context *,FPUsync));
497 DECLARE("VMXsave", offsetof(struct facility_context *,VMXsave));
498 DECLARE("VMXlevel", offsetof(struct facility_context *,VMXlevel));
499 DECLARE("VMXcpu", offsetof(struct facility_context *,VMXcpu));
500 DECLARE("VMXsync", offsetof(struct facility_context *,VMXsync));
501 DECLARE("facAct", offsetof(struct facility_context *,facAct));
502
503 /* Values from vmachmon.h */
504
505 DECLARE("kVmmGetVersion", kVmmGetVersion);
506 DECLARE("kVmmvGetFeatures", kVmmvGetFeatures);
507 DECLARE("kVmmInitContext", kVmmInitContext);
508 DECLARE("kVmmTearDownContext", kVmmTearDownContext);
509 DECLARE("kVmmTearDownAll", kVmmTearDownAll);
510 DECLARE("kVmmMapPage", kVmmMapPage);
511 DECLARE("kVmmGetPageMapping", kVmmGetPageMapping);
512 DECLARE("kVmmUnmapPage", kVmmUnmapPage);
513 DECLARE("kVmmUnmapAllPages", kVmmUnmapAllPages);
514 DECLARE("kVmmGetPageDirtyFlag", kVmmGetPageDirtyFlag);
515 DECLARE("kVmmGetFloatState", kVmmGetFloatState);
516 DECLARE("kVmmGetVectorState", kVmmGetVectorState);
517 DECLARE("kVmmSetTimer", kVmmSetTimer);
518 DECLARE("kVmmGetTimer", kVmmGetTimer);
519 DECLARE("kVmmExecuteVM", kVmmExecuteVM);
520 DECLARE("kVmmProtectPage", kVmmProtectPage);
521 DECLARE("kVmmMapList", kVmmMapList);
522 DECLARE("kVmmUnmapList", kVmmUnmapList);
523 DECLARE("kVmmActivateXA", kVmmActivateXA);
524 DECLARE("kVmmDeactivateXA", kVmmDeactivateXA);
525 DECLARE("kVmmGetXA", kVmmGetXA);
526 DECLARE("kVmmMapPage64", kVmmMapPage64);
527 DECLARE("kVmmGetPageMapping64", kVmmGetPageMapping64);
528 DECLARE("kVmmUnmapPage64", kVmmUnmapPage64);
529 DECLARE("kVmmGetPageDirtyFlag64", kVmmGetPageDirtyFlag64);
530 DECLARE("kVmmMapExecute64", kVmmMapExecute64);
531 DECLARE("kVmmProtectExecute64", kVmmProtectExecute64);
532 DECLARE("kVmmMapList64", kVmmMapList64);
533 DECLARE("kVmmUnmapList64", kVmmUnmapList64);
534 DECLARE("kvmmExitToHost", kvmmExitToHost);
535 DECLARE("kvmmResumeGuest", kvmmResumeGuest);
536 DECLARE("kvmmGetGuestRegister", kvmmGetGuestRegister);
537 DECLARE("kvmmSetGuestRegister", kvmmSetGuestRegister);
538
539 DECLARE("kVmmReturnNull", kVmmReturnNull);
540 DECLARE("kVmmStopped", kVmmStopped);
541 DECLARE("kVmmBogusContext", kVmmBogusContext);
542 DECLARE("kVmmReturnDataPageFault", kVmmReturnDataPageFault);
543 DECLARE("kVmmReturnInstrPageFault", kVmmReturnInstrPageFault);
544 DECLARE("kVmmReturnAlignmentFault", kVmmReturnAlignmentFault);
545 DECLARE("kVmmReturnProgramException", kVmmReturnProgramException);
546 DECLARE("kVmmReturnSystemCall", kVmmReturnSystemCall);
547 DECLARE("kVmmReturnTraceException", kVmmReturnTraceException);
548 DECLARE("kVmmInvalidAdSpace", kVmmInvalidAdSpace);
549
550 DECLARE("kVmmProtXtnd", kVmmProtXtnd);
551 DECLARE("kVmmProtNARW", kVmmProtNARW);
552 DECLARE("kVmmProtRORW", kVmmProtRORW);
553 DECLARE("kVmmProtRWRW", kVmmProtRWRW);
554 DECLARE("kVmmProtRORO", kVmmProtRORO);
555
556 DECLARE("vmmFlags", offsetof(struct vmmCntrlEntry *, vmmFlags));
557 DECLARE("vmmXAFlgs", offsetof(struct vmmCntrlEntry *, vmmXAFlgs));
558 DECLARE("vmmPmap", offsetof(struct vmmCntrlEntry *, vmmPmap));
559 DECLARE("vmmInUseb", vmmInUseb);
560 DECLARE("vmmInUse", vmmInUse);
561 DECLARE("vmmContextKern", offsetof(struct vmmCntrlEntry *, vmmContextKern));
562 DECLARE("vmmContextPhys", offsetof(struct vmmCntrlEntry *, vmmContextPhys));
563 DECLARE("vmmContextUser", offsetof(struct vmmCntrlEntry *, vmmContextUser));
564 DECLARE("vmmFacCtx", offsetof(struct vmmCntrlEntry *, vmmFacCtx));
565 DECLARE("vmmLastMap", offsetof(struct vmmCntrlTable *, vmmLastMap));
566 DECLARE("vmmGFlags", offsetof(struct vmmCntrlTable *, vmmGFlags));
567 DECLARE("vmmc", offsetof(struct vmmCntrlTable *, vmmc));
568 DECLARE("vmmAdsp", offsetof(struct vmmCntrlTable *, vmmAdsp));
569 DECLARE("vmmLastAdSp", vmmLastAdSp);
570 DECLARE("vmmFAMintercept", offsetof(struct vmmCntrlEntry *, vmmFAMintercept));
571 DECLARE("vmmCEntrySize", sizeof(struct vmmCntrlEntry));
572 DECLARE("kVmmMaxContexts", kVmmMaxContexts);
573
574 DECLARE("interface_version", offsetof(struct vmm_state_page_t *, interface_version));
575 DECLARE("thread_index", offsetof(struct vmm_state_page_t *, thread_index));
576 DECLARE("vmmStat", offsetof(struct vmm_state_page_t *, vmmStat));
577 DECLARE("vmmCntrl", offsetof(struct vmm_state_page_t *, vmmCntrl));
578 DECLARE("vmm_proc_state", offsetof(struct vmm_state_page_t *, vmm_proc_state));
579
580 DECLARE("return_code", offsetof(struct vmm_state_page_t *, return_code));
581
582 DECLARE("return_params", offsetof(struct vmm_state_page_t *, vmmRet.vmmrp32.return_params));
583 DECLARE("return_paramsX", offsetof(struct vmm_state_page_t *, vmmRet.vmmrp64.return_params));
584
585 #if 0
586 DECLARE("return_params", offsetof(struct vmm_state_page_t *, return_params));
587 DECLARE("vmm_proc_state", offsetof(struct vmm_state_page_t *, vmm_proc_state));
588 #endif
589 DECLARE("vmmppcVRs", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcVRs));
590 DECLARE("vmmppcVSCR", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcVSCR));
591 DECLARE("vmmppcFPRs", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPRs));
592 DECLARE("vmmppcFPSCR", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPSCR));
593
594 DECLARE("vmmppcpc", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcPC));
595 DECLARE("vmmppcmsr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcMSR));
596 DECLARE("vmmppcr0", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x00));
597 DECLARE("vmmppcr1", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x04));
598 DECLARE("vmmppcr2", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x08));
599 DECLARE("vmmppcr3", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x0C));
600 DECLARE("vmmppcr4", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x10));
601 DECLARE("vmmppcr5", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x14));
602
603 DECLARE("vmmppcr6", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x18));
604 DECLARE("vmmppcr7", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x1C));
605 DECLARE("vmmppcr8", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x20));
606 DECLARE("vmmppcr9", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x24));
607 DECLARE("vmmppcr10", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x28));
608 DECLARE("vmmppcr11", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x2C));
609 DECLARE("vmmppcr12", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x30));
610 DECLARE("vmmppcr13", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x34));
611
612 DECLARE("vmmppcr14", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x38));
613 DECLARE("vmmppcr15", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x3C));
614 DECLARE("vmmppcr16", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x40));
615 DECLARE("vmmppcr17", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x44));
616 DECLARE("vmmppcr18", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x48));
617 DECLARE("vmmppcr19", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x4C));
618 DECLARE("vmmppcr20", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x50));
619 DECLARE("vmmppcr21", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x54));
620
621 DECLARE("vmmppcr22", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x58));
622 DECLARE("vmmppcr23", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x5C));
623 DECLARE("vmmppcr24", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x60));
624 DECLARE("vmmppcr25", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x64));
625 DECLARE("vmmppcr26", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x68));
626 DECLARE("vmmppcr27", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x6C));
627 DECLARE("vmmppcr28", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x70));
628 DECLARE("vmmppcr29", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x74));
629
630 DECLARE("vmmppcr30", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x78));
631 DECLARE("vmmppcr31", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcGPRs+0x7C));
632 DECLARE("vmmppccr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcCR));
633 DECLARE("vmmppcxer", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcXER));
634 DECLARE("vmmppclr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcLR));
635 DECLARE("vmmppcctr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcCTR));
636 DECLARE("vmmppcmq", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcMQ));
637 DECLARE("vmmppcvrsave", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs32.ppcVRSave));
638
639 DECLARE("vmmppcXpc", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcPC));
640 DECLARE("vmmppcXmsr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcMSR));
641 DECLARE("vmmppcXr0", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x00));
642 DECLARE("vmmppcXr1", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x08));
643 DECLARE("vmmppcXr2", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x10));
644 DECLARE("vmmppcXr3", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x18));
645 DECLARE("vmmppcXr4", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x20));
646 DECLARE("vmmppcXr5", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x28));
647
648 DECLARE("vmmppcXr6", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x30));
649 DECLARE("vmmppcXr7", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x38));
650 DECLARE("vmmppcXr8", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x40));
651 DECLARE("vmmppcXr9", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x48));
652 DECLARE("vmmppcXr10", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x50));
653 DECLARE("vmmppcXr11", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x58));
654 DECLARE("vmmppcXr12", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x60));
655 DECLARE("vmmppcXr13", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x68));
656
657 DECLARE("vmmppcXr14", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x70));
658 DECLARE("vmmppcXr15", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x78));
659 DECLARE("vmmppcXr16", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x80));
660 DECLARE("vmmppcXr17", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x88));
661 DECLARE("vmmppcXr18", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x90));
662 DECLARE("vmmppcXr19", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0x98));
663 DECLARE("vmmppcXr20", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xA0));
664 DECLARE("vmmppcXr21", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xA8));
665
666 DECLARE("vmmppcXr22", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xB0));
667 DECLARE("vmmppcXr23", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xB8));
668 DECLARE("vmmppcXr24", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xC0));
669 DECLARE("vmmppcXr25", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xC8));
670 DECLARE("vmmppcXr26", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xD0));
671 DECLARE("vmmppcXr27", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xD8));
672 DECLARE("vmmppcXr28", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xE0));
673 DECLARE("vmmppcXr29", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xE8));
674
675 DECLARE("vmmppcXr30", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xF0));
676 DECLARE("vmmppcXr31", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcGPRs+0xF8));
677 DECLARE("vmmppcXcr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcCR));
678 DECLARE("vmmppcXxer", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcXER));
679 DECLARE("vmmppcXlr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcLR));
680 DECLARE("vmmppcXctr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcCTR));
681 DECLARE("vmmppcXvrsave", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcRegs.ppcRegs64.ppcVRSave));
682
683 DECLARE("vmmppcvscr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcVSCR+0x00));
684 DECLARE("vmmppcfpscrpad", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPSCR));
685 DECLARE("vmmppcfpscr", offsetof(struct vmm_state_page_t *, vmm_proc_state.ppcFPSCR+4));
686
687 DECLARE("famguestr0", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register));
688 DECLARE("famguestr1", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x4));
689 DECLARE("famguestr2", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x8));
690 DECLARE("famguestr3", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0xC));
691 DECLARE("famguestr4", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x10));
692 DECLARE("famguestr5", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x14));
693 DECLARE("famguestr6", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x18));
694 DECLARE("famguestr7", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_register+0x1C));
695 DECLARE("famguestpc", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_pc));
696 DECLARE("famguestmsr", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.guest_msr));
697 DECLARE("famdispcode", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_dispatch_code));
698 DECLARE("famrefcon", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_refcon));
699 DECLARE("famparam", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_parameter));
700 DECLARE("famhandler", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_dispatch));
701 DECLARE("famintercepts", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs32.fastassist_intercepts));
702
703 DECLARE("famguestXr0", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register));
704 DECLARE("famguestXr1", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x8));
705 DECLARE("famguestXr2", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x10));
706 DECLARE("famguestXr3", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x18));
707 DECLARE("famguestXr4", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x20));
708 DECLARE("famguestXr5", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x28));
709 DECLARE("famguestXr6", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x30));
710 DECLARE("famguestXr7", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_register+0x38));
711 DECLARE("famguestXpc", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_pc));
712 DECLARE("famguestXmsr", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.guest_msr));
713 DECLARE("famdispcodeX", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_dispatch_code));
714 DECLARE("famrefconX", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_refcon));
715 DECLARE("famparamX", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_parameter));
716 DECLARE("famhandlerX", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_dispatch));
717 DECLARE("faminterceptsX", offsetof(struct vmm_state_page_t *, vmm_fastassist_state.vmmfs64.fastassist_intercepts));
718
719 DECLARE("vmmFloatCngd", vmmFloatCngd);
720 DECLARE("vmmFloatCngdb", vmmFloatCngdb);
721 DECLARE("vmmVectCngd", vmmVectCngd);
722 DECLARE("vmmVectCngdb", vmmVectCngdb);
723 DECLARE("vmmTimerPop", vmmTimerPop);
724 DECLARE("vmmTimerPopb", vmmTimerPopb);
725 DECLARE("vmmFAMmode", vmmFAMmode);
726 DECLARE("vmmFAMmodeb", vmmFAMmodeb);
727 DECLARE("vmmSpfSave", vmmSpfSave);
728 DECLARE("vmmSpfSaveb", vmmSpfSaveb);
729 DECLARE("vmmFloatLoad", vmmFloatLoad);
730 DECLARE("vmmFloatLoadb", vmmFloatLoadb);
731 DECLARE("vmmVectLoad", vmmVectLoad);
732 DECLARE("vmmVectLoadb", vmmVectLoadb);
733 DECLARE("vmmVectVRall", vmmVectVRall);
734 DECLARE("vmmVectVRallb", vmmVectVRallb);
735 DECLARE("vmmVectVAss", vmmVectVAss);
736 DECLARE("vmmVectVAssb", vmmVectVAssb);
737 DECLARE("vmmXStart", vmmXStart);
738 DECLARE("vmmXStartb", vmmXStartb);
739 DECLARE("vmmXStop", vmmXStop);
740 DECLARE("vmmXStopb", vmmXStopb);
741 DECLARE("vmmKey", vmmKey);
742 DECLARE("vmmKeyb", vmmKeyb);
743 DECLARE("vmmFamSet", vmmFamSet);
744 DECLARE("vmmFamSetb", vmmFamSetb);
745 DECLARE("vmmFamEna", vmmFamEna);
746 DECLARE("vmmFamEnab", vmmFamEnab);
747 DECLARE("vmm64Bit", vmm64Bit);
748
749 /* values from kern/task.h */
750 DECLARE("TASK_SYSCALLS_MACH",
751 offsetof(struct task *, syscalls_mach));
752 DECLARE("TASK_SYSCALLS_UNIX",
753 offsetof(struct task *, syscalls_unix));
754
755 /* values from vm/vm_map.h */
756 DECLARE("VMMAP_PMAP", offsetof(struct vm_map *, pmap));
757
758 /* values from machine/pmap.h */
759 DECLARE("pmapSpace", offsetof(struct pmap *, space));
760 DECLARE("spaceNum", offsetof(struct pmap *, spaceNum));
761 DECLARE("pmapSXlk", offsetof(struct pmap *, pmapSXlk));
762 DECLARE("pmapCCtl", offsetof(struct pmap *, pmapCCtl));
763 DECLARE("pmapCCtlVal", pmapCCtlVal);
764 DECLARE("pmapCCtlLck", pmapCCtlLck);
765 DECLARE("pmapCCtlLckb", pmapCCtlLckb);
766 DECLARE("pmapCCtlGen", pmapCCtlGen);
767 DECLARE("pmapSegCacheCnt", pmapSegCacheCnt);
768 DECLARE("pmapSegCacheUse", pmapSegCacheUse);
769 DECLARE("pmapvr", offsetof(struct pmap *, pmapvr));
770 DECLARE("pmapFlags", offsetof(struct pmap *, pmapFlags));
771 DECLARE("pmapKeys", pmapKeys);
772 DECLARE("pmapKeyDef", pmapKeyDef);
773 DECLARE("pmapSCSubTag", offsetof(struct pmap *, pmapSCSubTag));
774 DECLARE("pmapVmmExt", offsetof(struct pmap *, pmapVmmExt));
775 DECLARE("pmapVmmExtPhys", offsetof(struct pmap *, pmapVmmExtPhys));
776 DECLARE("pmapVMhost", pmapVMhost);
777 DECLARE("pmapVMgsaa", pmapVMgsaa);
778 DECLARE("pmapSegCache", offsetof(struct pmap *, pmapSegCache));
779 DECLARE("pmapCurLists", offsetof(struct pmap *, pmapCurLists));
780 DECLARE("pmapRandNum", offsetof(struct pmap *, pmapRandNum));
781 DECLARE("pmapSkipLists", offsetof(struct pmap *, pmapSkipLists));
782 DECLARE("pmapSearchVisits", offsetof(struct pmap *, pmapSearchVisits));
783 DECLARE("pmapSearchCnt", offsetof(struct pmap *, pmapSearchCnt));
784 DECLARE("pmapSize", pmapSize);
785 DECLARE("kSkipListFanoutShift", kSkipListFanoutShift);
786 DECLARE("kSkipListMaxLists", kSkipListMaxLists);
787 DECLARE("invalSpace", invalSpace);
788
789 DECLARE("sgcESID", offsetof(struct sgc *, sgcESID));
790 DECLARE("sgcESmsk", sgcESmsk);
791 DECLARE("sgcVSID", offsetof(struct sgc *, sgcVSID));
792 DECLARE("sgcVSmsk", sgcVSmsk);
793 DECLARE("sgcVSKeys", sgcVSKeys);
794 DECLARE("sgcVSKeyUsr", sgcVSKeyUsr);
795 DECLARE("sgcVSNoEx", sgcVSNoEx);
796 DECLARE("pmapPAddr", offsetof(struct pmapTransTab *, pmapPAddr));
797 DECLARE("pmapVAddr", offsetof(struct pmapTransTab *, pmapVAddr));
798 DECLARE("pmapTransSize", sizeof(pmapTransTab));
799 DECLARE("pmapResidentCnt", offsetof(struct pmap *, stats.resident_count));
800
801 DECLARE("maxAdrSp", maxAdrSp);
802 DECLARE("maxAdrSpb", maxAdrSpb);
803
804 DECLARE("cppvPsnkb", cppvPsnkb);
805 DECLARE("cppvPsrcb", cppvPsrcb);
806 DECLARE("cppvFsnkb", cppvFsnkb);
807 DECLARE("cppvFsrcb", cppvFsrcb);
808 DECLARE("cppvNoModSnkb", cppvNoModSnkb);
809 DECLARE("cppvNoRefSrcb", cppvNoRefSrcb);
810 DECLARE("cppvKmapb", cppvKmapb);
811
812 DECLARE("vmxSalt", offsetof(struct pmap_vmm_ext *, vmxSalt));
813 DECLARE("vmxHostPmapPhys", offsetof(struct pmap_vmm_ext *, vmxHostPmapPhys));
814 DECLARE("vmxHostPmap", offsetof(struct pmap_vmm_ext *, vmxHostPmap));
815 DECLARE("vmxHashPgIdx", offsetof(struct pmap_vmm_ext *, vmxHashPgIdx));
816 DECLARE("vmxHashPgList", offsetof(struct pmap_vmm_ext *, vmxHashPgList));
817 DECLARE("vmxStats", offsetof(struct pmap_vmm_ext *, vmxStats));
818 DECLARE("vmxSize", sizeof(struct pmap_vmm_ext));
819 DECLARE("VMX_HPIDX_OFFSET", VMX_HPIDX_OFFSET);
820 DECLARE("VMX_HPLIST_OFFSET", VMX_HPLIST_OFFSET);
821 DECLARE("VMX_ACTMAP_OFFSET", VMX_ACTMAP_OFFSET);
822 DECLARE("vxsGpf", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGpf));
823 DECLARE("vxsGpfMiss", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGpfMiss));
824 DECLARE("vxsGrm", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrm));
825 DECLARE("vxsGrmMiss", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrmMiss));
826 DECLARE("vxsGrmActive", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrmActive));
827 DECLARE("vxsGra", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGra));
828 DECLARE("vxsGraHits", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGraHits));
829 DECLARE("vxsGraActive", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGraActive));
830 DECLARE("vxsGrl", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrl));
831 DECLARE("vxsGrlActive", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrlActive));
832 DECLARE("vxsGrs", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrs));
833 DECLARE("vxsGrsHitAct", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrsHitAct));
834 DECLARE("vxsGrsHitSusp", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrsHitSusp));
835 DECLARE("vxsGrsMissGV", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrsMissGV));
836 DECLARE("vxsGrsHitPE", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrsHitPE));
837 DECLARE("vxsGrsMissPE", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGrsMissPE));
838 DECLARE("vxsGad", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGad));
839 DECLARE("vxsGadHit", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGadHit));
840 DECLARE("vxsGadFree", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGadFree));
841 DECLARE("vxsGadDormant", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGadDormant));
842 DECLARE("vxsGadSteal", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGadSteal));
843 DECLARE("vxsGsu", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGsu));
844 DECLARE("vxsGsuHit", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGsuHit));
845 DECLARE("vxsGsuMiss", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGsuMiss));
846 DECLARE("vxsGtd", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGtd));
847 DECLARE("vxsGtdHit", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGtdHit));
848 DECLARE("vxsGtdMiss", offsetof(struct pmap_vmm_ext *, vmxStats.vxsGtdMiss));
849
850 /* values from kern/timer.h */
851 DECLARE("TIMER_LOW", offsetof(struct timer *, low_bits));
852 DECLARE("TIMER_HIGH", offsetof(struct timer *, high_bits));
853 DECLARE("TIMER_HIGHCHK", offsetof(struct timer *, high_bits_check));
854 DECLARE("TIMER_TSTAMP", offsetof(struct timer *, tstamp));
855
856 DECLARE("CURRENT_TIMER", offsetof(struct processor *, processor_data.current_timer));
857 DECLARE("SYSTEM_TIMER", offsetof(struct thread *, system_timer));
858 DECLARE("USER_TIMER", offsetof(struct thread *, user_timer));
859
860 /* Constants from pmap.h */
861 DECLARE("PPC_SID_KERNEL", PPC_SID_KERNEL);
862
863 /* values for accessing mach_trap table */
864 DECLARE("MACH_TRAP_ARG_MUNGE32",
865 offsetof(mach_trap_t *, mach_trap_arg_munge32));
866 DECLARE("MACH_TRAP_ARG_MUNGE64",
867 offsetof(mach_trap_t *, mach_trap_arg_munge64));
868 DECLARE("MACH_TRAP_ARGC",
869 offsetof(mach_trap_t *, mach_trap_arg_count));
870 DECLARE("MACH_TRAP_FUNCTION",
871 offsetof(mach_trap_t *, mach_trap_function));
872
873 DECLARE("MACH_TRAP_TABLE_COUNT", MACH_TRAP_TABLE_COUNT);
874
875 DECLARE("PPCcallmax", sizeof(PPCcalls));
876
877 /* Misc values used by assembler */
878 DECLARE("AST_ALL", AST_ALL);
879 DECLARE("AST_URGENT", AST_URGENT);
880
881 /* Spin Lock structure */
882 DECLARE("SLOCK_ILK", offsetof(lck_spin_t *, interlock));
883
884 /* Mutex structure */
885 DECLARE("MUTEX_DATA", offsetof(lck_mtx_t *, lck_mtx_data));
886 DECLARE("MUTEX_WAITERS",offsetof(lck_mtx_t *, lck_mtx_waiters));
887 DECLARE("MUTEX_PROMOTED_PRI",offsetof(lck_mtx_t *, lck_mtx_pri));
888 DECLARE("MUTEX_TYPE", offsetof(lck_mtx_ext_t *, lck_mtx_deb.type));
889 DECLARE("MUTEX_STACK", offsetof(lck_mtx_ext_t *, lck_mtx_deb.stack));
890 DECLARE("MUTEX_FRAMES", LCK_FRAMES_MAX);
891 DECLARE("MUTEX_THREAD", offsetof(lck_mtx_ext_t *, lck_mtx_deb.thread));
892 DECLARE("MUTEX_ATTR", offsetof(lck_mtx_ext_t *, lck_mtx_attr));
893 DECLARE("MUTEX_ATTR_DEBUG", LCK_MTX_ATTR_DEBUG);
894 DECLARE("MUTEX_ATTR_DEBUGb", LCK_MTX_ATTR_DEBUGb);
895 DECLARE("MUTEX_ATTR_STAT", LCK_MTX_ATTR_STAT);
896 DECLARE("MUTEX_ATTR_STATb", LCK_MTX_ATTR_STATb);
897 DECLARE("MUTEX_GRP", offsetof(lck_mtx_ext_t *, lck_mtx_grp));
898 DECLARE("MUTEX_TAG", MUTEX_TAG);
899 DECLARE("MUTEX_IND", LCK_MTX_TAG_INDIRECT);
900 DECLARE("MUTEX_ITAG",offsetof(lck_mtx_t *, lck_mtx_tag));
901 DECLARE("MUTEX_PTR",offsetof(lck_mtx_t *, lck_mtx_ptr));
902 DECLARE("MUTEX_ASSERT_OWNED", LCK_MTX_ASSERT_OWNED);
903 DECLARE("MUTEX_ASSERT_NOTOWNED",LCK_MTX_ASSERT_NOTOWNED);
904 DECLARE("GRP_MTX_STAT_UTIL", offsetof(lck_grp_t *, lck_grp_stat.lck_grp_mtx_stat.lck_grp_mtx_util_cnt));
905 DECLARE("GRP_MTX_STAT_MISS", offsetof(lck_grp_t *, lck_grp_stat.lck_grp_mtx_stat.lck_grp_mtx_miss_cnt));
906 DECLARE("GRP_MTX_STAT_WAIT", offsetof(lck_grp_t *, lck_grp_stat.lck_grp_mtx_stat.lck_grp_mtx_wait_cnt));
907
908 /* RW lock structure */
909 DECLARE("RW_IND", LCK_RW_TAG_INDIRECT);
910 DECLARE("RW_PTR", offsetof(lck_rw_t *, lck_rw_ptr));
911 DECLARE("RW_SHARED", LCK_RW_TYPE_SHARED);
912 DECLARE("RW_EXCL", LCK_RW_TYPE_EXCLUSIVE);
913 DECLARE("RW_EVENT", (((sizeof(lck_rw_t)-1))/sizeof(unsigned int))*sizeof(unsigned int));
914
915 /* values from low_trace.h */
916 DECLARE("LTR_cpu", offsetof(struct LowTraceRecord *, LTR_cpu));
917 DECLARE("LTR_excpt", offsetof(struct LowTraceRecord *, LTR_excpt));
918 DECLARE("LTR_timeHi", offsetof(struct LowTraceRecord *, LTR_timeHi));
919 DECLARE("LTR_timeLo", offsetof(struct LowTraceRecord *, LTR_timeLo));
920 DECLARE("LTR_cr", offsetof(struct LowTraceRecord *, LTR_cr));
921 DECLARE("LTR_srr0", offsetof(struct LowTraceRecord *, LTR_srr0));
922 DECLARE("LTR_srr1", offsetof(struct LowTraceRecord *, LTR_srr1));
923 DECLARE("LTR_dar", offsetof(struct LowTraceRecord *, LTR_dar));
924 DECLARE("LTR_dsisr", offsetof(struct LowTraceRecord *, LTR_dsisr));
925 DECLARE("LTR_rsvd0", offsetof(struct LowTraceRecord *, LTR_rsvd0));
926 DECLARE("LTR_save", offsetof(struct LowTraceRecord *, LTR_save));
927 DECLARE("LTR_lr", offsetof(struct LowTraceRecord *, LTR_lr));
928 DECLARE("LTR_ctr", offsetof(struct LowTraceRecord *, LTR_ctr));
929 DECLARE("LTR_r0", offsetof(struct LowTraceRecord *, LTR_r0));
930 DECLARE("LTR_r1", offsetof(struct LowTraceRecord *, LTR_r1));
931 DECLARE("LTR_r2", offsetof(struct LowTraceRecord *, LTR_r2));
932 DECLARE("LTR_r3", offsetof(struct LowTraceRecord *, LTR_r3));
933 DECLARE("LTR_r4", offsetof(struct LowTraceRecord *, LTR_r4));
934 DECLARE("LTR_r5", offsetof(struct LowTraceRecord *, LTR_r5));
935 DECLARE("LTR_r6", offsetof(struct LowTraceRecord *, LTR_r6));
936 DECLARE("LTR_size", sizeof(struct LowTraceRecord));
937
938 /* Values from pexpert.h */
939 DECLARE("PECFIcpurate", offsetof(struct clock_frequency_info_t *, cpu_clock_rate_hz));
940 DECLARE("PECFIbusrate", offsetof(struct clock_frequency_info_t *, bus_clock_rate_hz));
941
942 /* Values from pmap_internals.h and mappings.h */
943
944 DECLARE("mpFlags", offsetof(struct mapping *, mpFlags));
945 DECLARE("mpBusy", mpBusy);
946 DECLARE("mpPrevious", mpPrevious);
947 DECLARE("mpNext", mpNext);
948 DECLARE("mpPIndex", mpPIndex);
949 DECLARE("mpType", mpType);
950 DECLARE("mpNormal", mpNormal);
951 DECLARE("mpBlock", mpBlock);
952 DECLARE("mpMinSpecial", mpMinSpecial);
953 DECLARE("mpNest", mpNest);
954 DECLARE("mpLinkage", mpLinkage);
955 DECLARE("mpACID", mpACID);
956 DECLARE("mpGuest", mpGuest);
957 DECLARE("mpFIP", mpFIP);
958 DECLARE("mpFIPb", mpFIPb);
959 DECLARE("mpPcfg", mpPcfg);
960 DECLARE("mpPcfgb", mpPcfgb);
961 DECLARE("mpRIP", mpRIP);
962 DECLARE("mpRIPb", mpRIPb);
963 DECLARE("mpPerm", mpPerm);
964 DECLARE("mpPermb", mpPermb);
965 DECLARE("mpBSu", mpBSu);
966 DECLARE("mpBSub", mpBSub);
967 DECLARE("mpLists", mpLists);
968 DECLARE("mpListsb", mpListsb);
969 DECLARE("mpgFlags", mpgFlags);
970 DECLARE("mpgFree", mpgFree);
971 DECLARE("mpgGlobal", mpgGlobal);
972 DECLARE("mpgDormant", mpgDormant);
973
974 DECLARE("mpSpace", offsetof(struct mapping *, mpSpace));
975 DECLARE("mpBSize", offsetof(struct mapping *, u.mpBSize));
976 DECLARE("mpgCursor", offsetof(struct mapping *, u.mpgCursor));
977 DECLARE("mpPte", offsetof(struct mapping *, mpPte));
978 DECLARE("mpHValid", mpHValid);
979 DECLARE("mpHValidb", mpHValidb);
980
981 DECLARE("mpPAddr", offsetof(struct mapping *, mpPAddr));
982 DECLARE("mpVAddr", offsetof(struct mapping *, mpVAddr));
983 DECLARE("mpHWFlags", mpHWFlags);
984 DECLARE("mpHWFlagsb", mpHWFlagsb);
985 DECLARE("mpN", mpN);
986 DECLARE("mpNb", mpNb);
987 DECLARE("mpPP", mpPP);
988 DECLARE("mpPPb", mpPPb);
989 DECLARE("mpPPe", mpPPe);
990 DECLARE("mpKKN", mpKKN);
991 DECLARE("mpKKNb", mpKKNb);
992 DECLARE("mpWIMG", mpWIMG);
993 DECLARE("mpWIMGb", mpWIMGb);
994 DECLARE("mpW", mpW);
995 DECLARE("mpWb", mpWb);
996 DECLARE("mpI", mpI);
997 DECLARE("mpIb", mpIb);
998 DECLARE("mpM", mpM);
999 DECLARE("mpMb", mpMb);
1000 DECLARE("mpG", mpG);
1001 DECLARE("mpGb", mpGb);
1002 DECLARE("mpWIMGe", mpWIMGe);
1003 DECLARE("mpC", mpC);
1004 DECLARE("mpCb", mpCb);
1005 DECLARE("mpR", mpR);
1006 DECLARE("mpRb", mpRb);
1007 DECLARE("mpAlias", offsetof(struct mapping *, mpAlias));
1008 DECLARE("mpNestReloc", offsetof(struct mapping *, mpNestReloc));
1009 DECLARE("mpBlkRemCur", offsetof(struct mapping *, mpBlkRemCur));
1010 DECLARE("mpList0", offsetof(struct mapping *, mpList0));
1011 DECLARE("mpList ", offsetof(struct mapping *, mpList));
1012 DECLARE("mpBasicSize", mpBasicSize);
1013 DECLARE("mpBasicLists", mpBasicLists);
1014
1015 DECLARE("mbvrswap", offsetof(struct mappingblok *, mapblokvrswap));
1016 DECLARE("mbfree", offsetof(struct mappingblok *, mapblokfree));
1017 DECLARE("mapcsize", sizeof(struct mappingctl));
1018
1019 DECLARE("hwpPurgePTE", hwpPurgePTE);
1020 DECLARE("hwpMergePTE", hwpMergePTE);
1021 DECLARE("hwpNoopPTE", hwpNoopPTE);
1022
1023 // DANGER WIL ROBINSON!!! This wonderfully magical tool doesn't seem to handle 64-bit constants,
1024 // leaving us with only the cold ash of a zero. ppI, ppG, and who knows what else is affected.
1025 DECLARE("ppLink", offsetof(struct phys_entry *, ppLink));
1026 DECLARE("ppLock", ppLock);
1027 DECLARE("ppFlags", ppFlags);
1028 // DECLARE("ppI", ppI);
1029 DECLARE("ppIb", ppIb);
1030 // DECLARE("ppG", ppG);
1031 DECLARE("ppGb", ppGb);
1032 DECLARE("ppR", ppR);
1033 DECLARE("ppRb", ppRb);
1034 DECLARE("ppC", ppC);
1035 DECLARE("ppCb", ppCb);
1036 DECLARE("physEntrySize",physEntrySize);
1037 DECLARE("ppLFAmask", ppLFAmask);
1038 DECLARE("ppLFArrot", ppLFArrot);
1039
1040 DECLARE("pcfFlags", offsetof(struct pcfg *, pcfFlags));
1041 DECLARE("pcfEncode", offsetof(struct pcfg *, pcfEncode));
1042 DECLARE("pcfPSize", offsetof(struct pcfg *, pcfPSize));
1043 DECLARE("pcfShift", offsetof(struct pcfg *, pcfShift));
1044 DECLARE("pcfValid", pcfValid);
1045 DECLARE("pcfLarge", pcfLarge);
1046 DECLARE("pcfDedSeg", pcfDedSeg);
1047 DECLARE("pcfSize", sizeof(struct pcfg));
1048 DECLARE("pcfDefPcfg", pcfDefPcfg);
1049 DECLARE("pcfLargePcfg", pcfLargePcfg);
1050
1051 DECLARE("PCAallo", offsetof(struct PCA *, flgs.PCAallo));
1052 DECLARE("PCAfree", offsetof(struct PCA *, flgs.PCAalflgs.PCAfree));
1053 DECLARE("PCAauto", offsetof(struct PCA *, flgs.PCAalflgs.PCAauto));
1054 DECLARE("PCAmisc", offsetof(struct PCA *, flgs.PCAalflgs.PCAmisc));
1055 DECLARE("PCAlock", PCAlock);
1056 DECLARE("PCAlockb", PCAlockb);
1057 DECLARE("PCAsteal", offsetof(struct PCA *, flgs.PCAalflgs.PCAsteal));
1058
1059 DECLARE("mrPhysTab", offsetof(struct mem_region *, mrPhysTab));
1060 DECLARE("mrStart", offsetof(struct mem_region *, mrStart));
1061 DECLARE("mrEnd", offsetof(struct mem_region *, mrEnd));
1062 DECLARE("mrAStart", offsetof(struct mem_region *, mrAStart));
1063 DECLARE("mrAEnd", offsetof(struct mem_region *, mrAEnd));
1064 DECLARE("mrSize", sizeof(struct mem_region));
1065
1066 DECLARE("mapRemChunk", mapRemChunk);
1067
1068 DECLARE("mapRetCode", mapRetCode);
1069 DECLARE("mapRtOK", mapRtOK);
1070 DECLARE("mapRtBadLk", mapRtBadLk);
1071 DECLARE("mapRtPerm", mapRtPerm);
1072 DECLARE("mapRtNotFnd", mapRtNotFnd);
1073 DECLARE("mapRtBlock", mapRtBlock);
1074 DECLARE("mapRtNest", mapRtNest);
1075 DECLARE("mapRtRemove", mapRtRemove);
1076 DECLARE("mapRtMapDup", mapRtMapDup);
1077 DECLARE("mapRtGuest", mapRtGuest);
1078 DECLARE("mapRtEmpty", mapRtEmpty);
1079 DECLARE("mapRtSmash", mapRtSmash);
1080
1081 #if 0
1082 DECLARE("MFpcaptr", offsetof(struct mappingflush *, pcaptr));
1083 DECLARE("MFmappingcnt", offsetof(struct mappingflush *, mappingcnt));
1084 DECLARE("MFmapping", offsetof(struct mappingflush *, mapping));
1085 DECLARE("MFmappingSize", sizeof(struct mfmapping));
1086 #endif
1087
1088 DECLARE("GV_GROUPS_LG2", GV_GROUPS_LG2);
1089 DECLARE("GV_GROUPS", GV_GROUPS);
1090 DECLARE("GV_SLOT_SZ_LG2", GV_SLOT_SZ_LG2);
1091 DECLARE("GV_SLOT_SZ", GV_SLOT_SZ);
1092 DECLARE("GV_SLOTS_LG2", GV_SLOTS_LG2);
1093 DECLARE("GV_SLOTS", GV_SLOTS);
1094 DECLARE("GV_PGIDX_SZ_LG2", GV_PGIDX_SZ_LG2);
1095 DECLARE("GV_PAGE_SZ_LG2", GV_PAGE_SZ_LG2);
1096 DECLARE("GV_PAGE_SZ", GV_PAGE_SZ);
1097 DECLARE("GV_PAGE_MASK", GV_PAGE_MASK);
1098 DECLARE("GV_HPAGES", GV_HPAGES);
1099 DECLARE("GV_GRPS_PPG_LG2", GV_GRPS_PPG_LG2);
1100 DECLARE("GV_GRPS_PPG", GV_GRPS_PPG);
1101 DECLARE("GV_GRP_MASK", GV_GRP_MASK);
1102 DECLARE("GV_SLOT_MASK", GV_SLOT_MASK);
1103 DECLARE("GV_HPAGE_SHIFT", GV_HPAGE_SHIFT);
1104 DECLARE("GV_HPAGE_MASK", GV_HPAGE_MASK);
1105 DECLARE("GV_HGRP_SHIFT", GV_HGRP_SHIFT);
1106 DECLARE("GV_HGRP_MASK", GV_HGRP_MASK);
1107 DECLARE("GV_MAPWD_BITS_LG2",GV_MAPWD_BITS_LG2);
1108 DECLARE("GV_MAPWD_SZ_LG2", GV_MAPWD_SZ_LG2);
1109 DECLARE("GV_MAP_WORDS", GV_MAP_WORDS);
1110 DECLARE("GV_MAP_MASK", GV_MAP_MASK);
1111 DECLARE("GV_MAP_SHIFT", GV_MAP_SHIFT);
1112 DECLARE("GV_BAND_SHIFT", GV_BAND_SHIFT);
1113 DECLARE("GV_BAND_SZ_LG2", GV_BAND_SZ_LG2);
1114 DECLARE("GV_BAND_MASK", GV_BAND_MASK);
1115
1116 #if 1
1117 DECLARE("GDsave", offsetof(struct GDWorkArea *, GDsave));
1118 DECLARE("GDfp0", offsetof(struct GDWorkArea *, GDfp0));
1119 DECLARE("GDfp1", offsetof(struct GDWorkArea *, GDfp1));
1120 DECLARE("GDfp2", offsetof(struct GDWorkArea *, GDfp2));
1121 DECLARE("GDfp3", offsetof(struct GDWorkArea *, GDfp3));
1122 DECLARE("GDtop", offsetof(struct GDWorkArea *, GDtop));
1123 DECLARE("GDleft", offsetof(struct GDWorkArea *, GDleft));
1124 DECLARE("GDtopleft", offsetof(struct GDWorkArea *, GDtopleft));
1125 DECLARE("GDrowbytes", offsetof(struct GDWorkArea *, GDrowbytes));
1126 DECLARE("GDrowchar", offsetof(struct GDWorkArea *, GDrowchar));
1127 DECLARE("GDdepth", offsetof(struct GDWorkArea *, GDdepth));
1128 DECLARE("GDcollgn", offsetof(struct GDWorkArea *, GDcollgn));
1129 DECLARE("GDready", offsetof(struct GDWorkArea *, GDready));
1130 DECLARE("GDrowbuf1", offsetof(struct GDWorkArea *, GDrowbuf1));
1131 DECLARE("GDrowbuf2", offsetof(struct GDWorkArea *, GDrowbuf2));
1132 #endif
1133
1134 DECLARE("enaExpTrace", enaExpTrace);
1135 DECLARE("enaExpTraceb", enaExpTraceb);
1136 DECLARE("enaUsrFCall", enaUsrFCall);
1137 DECLARE("enaUsrFCallb", enaUsrFCallb);
1138 DECLARE("enaUsrPhyMp", enaUsrPhyMp);
1139 DECLARE("enaUsrPhyMpb", enaUsrPhyMpb);
1140 DECLARE("enaDiagSCs", enaDiagSCs);
1141 DECLARE("enaDiagSCsb", enaDiagSCsb);
1142 DECLARE("enaDiagEM", enaDiagEM);
1143 DECLARE("enaDiagEMb", enaDiagEMb);
1144 DECLARE("enaNotifyEM", enaNotifyEM);
1145 DECLARE("enaNotifyEMb", enaNotifyEMb);
1146 DECLARE("disLkType", disLkType);
1147 DECLARE("disLktypeb", disLktypeb);
1148 DECLARE("disLkThread", disLkThread);
1149 DECLARE("disLkThreadb", disLkThreadb);
1150 DECLARE("enaLkExtStck", enaLkExtStck);
1151 DECLARE("enaLkExtStckb",enaLkExtStckb);
1152 DECLARE("disLkMyLck", disLkMyLck);
1153 DECLARE("disLkMyLckb", disLkMyLckb);
1154 DECLARE("dgMisc1", offsetof(struct diagWork *, dgMisc1));
1155 DECLARE("dgMisc2", offsetof(struct diagWork *, dgMisc2));
1156 DECLARE("dgMisc3", offsetof(struct diagWork *, dgMisc3));
1157 DECLARE("dgMisc4", offsetof(struct diagWork *, dgMisc4));
1158 DECLARE("dgMisc5", offsetof(struct diagWork *, dgMisc5));
1159
1160 DECLARE("SACnext", offsetof(struct savearea_comm *, sac_next));
1161 DECLARE("SACprev", offsetof(struct savearea_comm *, sac_prev));
1162 DECLARE("SACvrswap", offsetof(struct savearea_comm *, sac_vrswap));
1163 DECLARE("SACalloc", offsetof(struct savearea_comm *, sac_alloc));
1164 DECLARE("SACflags", offsetof(struct savearea_comm *, sac_flags));
1165 DECLARE("sac_cnt", sac_cnt);
1166 DECLARE("sac_empty", sac_empty);
1167 DECLARE("sac_perm", sac_perm);
1168 DECLARE("sac_permb", sac_permb);
1169
1170 DECLARE("LocalSaveTarget", LocalSaveTarget);
1171 DECLARE("LocalSaveMin", LocalSaveMin);
1172 DECLARE("LocalSaveMax", LocalSaveMax);
1173 DECLARE("FreeListMin", FreeListMin);
1174 DECLARE("SaveLowHysteresis", SaveLowHysteresis);
1175 DECLARE("SaveHighHysteresis", SaveHighHysteresis);
1176 DECLARE("InitialSaveAreas", InitialSaveAreas);
1177 DECLARE("InitialSaveTarget", InitialSaveTarget);
1178 DECLARE("InitialSaveBloks", InitialSaveBloks);
1179
1180 DECLARE("SAVprev", offsetof(struct savearea_comm *, save_prev));
1181 DECLARE("SAVact", offsetof(struct savearea_comm *, save_act));
1182 DECLARE("SAVflags", offsetof(struct savearea_comm *, save_flags));
1183 DECLARE("SAVlevel", offsetof(struct savearea_comm *, save_level));
1184 DECLARE("SAVtime", offsetof(struct savearea_comm *, save_time));
1185 DECLARE("savemisc0", offsetof(struct savearea_comm *, save_misc0));
1186 DECLARE("savemisc1", offsetof(struct savearea_comm *, save_misc1));
1187 DECLARE("savemisc2", offsetof(struct savearea_comm *, save_misc2));
1188 DECLARE("savemisc3", offsetof(struct savearea_comm *, save_misc3));
1189
1190 DECLARE("SAVsize", sizeof(struct savearea));
1191 DECLARE("SAVsizefpu", sizeof(struct savearea_vec));
1192 DECLARE("SAVsizevec", sizeof(struct savearea_fpu));
1193 DECLARE("SAVcommsize", sizeof(struct savearea_comm));
1194
1195 DECLARE("savesrr0", offsetof(struct savearea *, save_srr0));
1196 DECLARE("savesrr1", offsetof(struct savearea *, save_srr1));
1197 DECLARE("savecr", offsetof(struct savearea *, save_cr));
1198 DECLARE("savexer", offsetof(struct savearea *, save_xer));
1199 DECLARE("savelr", offsetof(struct savearea *, save_lr));
1200 DECLARE("savectr", offsetof(struct savearea *, save_ctr));
1201 DECLARE("savedar", offsetof(struct savearea *, save_dar));
1202 DECLARE("savedsisr", offsetof(struct savearea *, save_dsisr));
1203 DECLARE("saveexception", offsetof(struct savearea *, save_exception));
1204 DECLARE("savefpscrpad", offsetof(struct savearea *, save_fpscrpad));
1205 DECLARE("savefpscr", offsetof(struct savearea *, save_fpscr));
1206 DECLARE("savevrsave", offsetof(struct savearea *, save_vrsave));
1207 DECLARE("savevscr", offsetof(struct savearea *, save_vscr));
1208
1209 DECLARE("savemmcr0", offsetof(struct savearea *, save_mmcr0));
1210 DECLARE("savemmcr1", offsetof(struct savearea *, save_mmcr1));
1211 DECLARE("savemmcr2", offsetof(struct savearea *, save_mmcr2));
1212 DECLARE("savepmc", offsetof(struct savearea *, save_pmc));
1213
1214 DECLARE("saveinstr", offsetof(struct savearea *, save_instr));
1215
1216 DECLARE("savexdat0", offsetof(struct savearea *, save_xdat0));
1217 DECLARE("savexdat1", offsetof(struct savearea *, save_xdat1));
1218 DECLARE("savexdat2", offsetof(struct savearea *, save_xdat2));
1219 DECLARE("savexdat3", offsetof(struct savearea *, save_xdat3));
1220
1221 DECLARE("saver0", offsetof(struct savearea *, save_r0));
1222 DECLARE("saver1", offsetof(struct savearea *, save_r1));
1223 DECLARE("saver2", offsetof(struct savearea *, save_r2));
1224 DECLARE("saver3", offsetof(struct savearea *, save_r3));
1225 DECLARE("saver4", offsetof(struct savearea *, save_r4));
1226 DECLARE("saver5", offsetof(struct savearea *, save_r5));
1227 DECLARE("saver6", offsetof(struct savearea *, save_r6));
1228 DECLARE("saver7", offsetof(struct savearea *, save_r7));
1229 DECLARE("saver8", offsetof(struct savearea *, save_r8));
1230 DECLARE("saver9", offsetof(struct savearea *, save_r9));
1231 DECLARE("saver10", offsetof(struct savearea *, save_r10));
1232 DECLARE("saver11", offsetof(struct savearea *, save_r11));
1233 DECLARE("saver12", offsetof(struct savearea *, save_r12));
1234 DECLARE("saver13", offsetof(struct savearea *, save_r13));
1235 DECLARE("saver14", offsetof(struct savearea *, save_r14));
1236 DECLARE("saver15", offsetof(struct savearea *, save_r15));
1237 DECLARE("saver16", offsetof(struct savearea *, save_r16));
1238 DECLARE("saver17", offsetof(struct savearea *, save_r17));
1239 DECLARE("saver18", offsetof(struct savearea *, save_r18));
1240 DECLARE("saver19", offsetof(struct savearea *, save_r19));
1241 DECLARE("saver20", offsetof(struct savearea *, save_r20));
1242 DECLARE("saver21", offsetof(struct savearea *, save_r21));
1243 DECLARE("saver22", offsetof(struct savearea *, save_r22));
1244 DECLARE("saver23", offsetof(struct savearea *, save_r23));
1245 DECLARE("saver24", offsetof(struct savearea *, save_r24));
1246 DECLARE("saver25", offsetof(struct savearea *, save_r25));
1247 DECLARE("saver26", offsetof(struct savearea *, save_r26));
1248 DECLARE("saver27", offsetof(struct savearea *, save_r27));
1249 DECLARE("saver28", offsetof(struct savearea *, save_r28));
1250 DECLARE("saver29", offsetof(struct savearea *, save_r29));
1251 DECLARE("saver30", offsetof(struct savearea *, save_r30));
1252 DECLARE("saver31", offsetof(struct savearea *, save_r31));
1253
1254 DECLARE("savefp0", offsetof(struct savearea_fpu *, save_fp0));
1255 DECLARE("savefp1", offsetof(struct savearea_fpu *, save_fp1));
1256 DECLARE("savefp2", offsetof(struct savearea_fpu *, save_fp2));
1257 DECLARE("savefp3", offsetof(struct savearea_fpu *, save_fp3));
1258 DECLARE("savefp4", offsetof(struct savearea_fpu *, save_fp4));
1259 DECLARE("savefp5", offsetof(struct savearea_fpu *, save_fp5));
1260 DECLARE("savefp6", offsetof(struct savearea_fpu *, save_fp6));
1261 DECLARE("savefp7", offsetof(struct savearea_fpu *, save_fp7));
1262 DECLARE("savefp8", offsetof(struct savearea_fpu *, save_fp8));
1263 DECLARE("savefp9", offsetof(struct savearea_fpu *, save_fp9));
1264 DECLARE("savefp10", offsetof(struct savearea_fpu *, save_fp10));
1265 DECLARE("savefp11", offsetof(struct savearea_fpu *, save_fp11));
1266 DECLARE("savefp12", offsetof(struct savearea_fpu *, save_fp12));
1267 DECLARE("savefp13", offsetof(struct savearea_fpu *, save_fp13));
1268 DECLARE("savefp14", offsetof(struct savearea_fpu *, save_fp14));
1269 DECLARE("savefp15", offsetof(struct savearea_fpu *, save_fp15));
1270 DECLARE("savefp16", offsetof(struct savearea_fpu *, save_fp16));
1271 DECLARE("savefp17", offsetof(struct savearea_fpu *, save_fp17));
1272 DECLARE("savefp18", offsetof(struct savearea_fpu *, save_fp18));
1273 DECLARE("savefp19", offsetof(struct savearea_fpu *, save_fp19));
1274 DECLARE("savefp20", offsetof(struct savearea_fpu *, save_fp20));
1275 DECLARE("savefp21", offsetof(struct savearea_fpu *, save_fp21));
1276 DECLARE("savefp22", offsetof(struct savearea_fpu *, save_fp22));
1277 DECLARE("savefp23", offsetof(struct savearea_fpu *, save_fp23));
1278 DECLARE("savefp24", offsetof(struct savearea_fpu *, save_fp24));
1279 DECLARE("savefp25", offsetof(struct savearea_fpu *, save_fp25));
1280 DECLARE("savefp26", offsetof(struct savearea_fpu *, save_fp26));
1281 DECLARE("savefp27", offsetof(struct savearea_fpu *, save_fp27));
1282 DECLARE("savefp28", offsetof(struct savearea_fpu *, save_fp28));
1283 DECLARE("savefp29", offsetof(struct savearea_fpu *, save_fp29));
1284 DECLARE("savefp30", offsetof(struct savearea_fpu *, save_fp30));
1285 DECLARE("savefp31", offsetof(struct savearea_fpu *, save_fp31));
1286
1287 DECLARE("savevr0", offsetof(struct savearea_vec *, save_vr0));
1288 DECLARE("savevr1", offsetof(struct savearea_vec *, save_vr1));
1289 DECLARE("savevr2", offsetof(struct savearea_vec *, save_vr2));
1290 DECLARE("savevr3", offsetof(struct savearea_vec *, save_vr3));
1291 DECLARE("savevr4", offsetof(struct savearea_vec *, save_vr4));
1292 DECLARE("savevr5", offsetof(struct savearea_vec *, save_vr5));
1293 DECLARE("savevr6", offsetof(struct savearea_vec *, save_vr6));
1294 DECLARE("savevr7", offsetof(struct savearea_vec *, save_vr7));
1295 DECLARE("savevr8", offsetof(struct savearea_vec *, save_vr8));
1296 DECLARE("savevr9", offsetof(struct savearea_vec *, save_vr9));
1297 DECLARE("savevr10", offsetof(struct savearea_vec *, save_vr10));
1298 DECLARE("savevr11", offsetof(struct savearea_vec *, save_vr11));
1299 DECLARE("savevr12", offsetof(struct savearea_vec *, save_vr12));
1300 DECLARE("savevr13", offsetof(struct savearea_vec *, save_vr13));
1301 DECLARE("savevr14", offsetof(struct savearea_vec *, save_vr14));
1302 DECLARE("savevr15", offsetof(struct savearea_vec *, save_vr15));
1303 DECLARE("savevr16", offsetof(struct savearea_vec *, save_vr16));
1304 DECLARE("savevr17", offsetof(struct savearea_vec *, save_vr17));
1305 DECLARE("savevr18", offsetof(struct savearea_vec *, save_vr18));
1306 DECLARE("savevr19", offsetof(struct savearea_vec *, save_vr19));
1307 DECLARE("savevr20", offsetof(struct savearea_vec *, save_vr20));
1308 DECLARE("savevr21", offsetof(struct savearea_vec *, save_vr21));
1309 DECLARE("savevr22", offsetof(struct savearea_vec *, save_vr22));
1310 DECLARE("savevr23", offsetof(struct savearea_vec *, save_vr23));
1311 DECLARE("savevr24", offsetof(struct savearea_vec *, save_vr24));
1312 DECLARE("savevr25", offsetof(struct savearea_vec *, save_vr25));
1313 DECLARE("savevr26", offsetof(struct savearea_vec *, save_vr26));
1314 DECLARE("savevr27", offsetof(struct savearea_vec *, save_vr27));
1315 DECLARE("savevr28", offsetof(struct savearea_vec *, save_vr28));
1316 DECLARE("savevr29", offsetof(struct savearea_vec *, save_vr29));
1317 DECLARE("savevr30", offsetof(struct savearea_vec *, save_vr30));
1318 DECLARE("savevr31", offsetof(struct savearea_vec *, save_vr31));
1319 DECLARE("savevrvalid", offsetof(struct savearea_vec *, save_vrvalid));
1320
1321 /* PseudoKernel Exception Descriptor info */
1322 DECLARE("BEDA_SRR0", offsetof(BEDA_t *, srr0));
1323 DECLARE("BEDA_SRR1", offsetof(BEDA_t *, srr1));
1324 DECLARE("BEDA_SPRG0", offsetof(BEDA_t *, sprg0));
1325 DECLARE("BEDA_SPRG1", offsetof(BEDA_t *, sprg1));
1326
1327 /* PseudoKernel Interrupt Control Word */
1328 DECLARE("BTTD_INTCONTROLWORD", offsetof(BTTD_t *, InterruptControlWord));
1329
1330 /* New state when exiting the pseudokernel */
1331 DECLARE("BTTD_NEWEXITSTATE", offsetof(BTTD_t *, NewExitState));
1332
1333 /* PseudoKernel Test/Post Interrupt */
1334 DECLARE("BTTD_TESTINTMASK", offsetof(BTTD_t *, testIntMask));
1335 DECLARE("BTTD_POSTINTMASK", offsetof(BTTD_t *, postIntMask));
1336
1337 /* PseudoKernel Vectors */
1338 DECLARE("BTTD_TRAP_VECTOR", offsetof(BTTD_t *, TrapVector));
1339 DECLARE("BTTD_SYSCALL_VECTOR", offsetof(BTTD_t *, SysCallVector));
1340 DECLARE("BTTD_INTERRUPT_VECTOR", offsetof(BTTD_t *, InterruptVector));
1341 DECLARE("BTTD_PENDINGINT_VECTOR", offsetof(BTTD_t *, PendingIntVector));
1342
1343 /* PseudoKernel Bits, Masks and misc */
1344 DECLARE("SYSCONTEXTSTATE", kInSystemContext);
1345 DECLARE("PSEUDOKERNELSTATE", kInPseudoKernel);
1346 DECLARE("INTSTATEMASK_B", 12);
1347 DECLARE("INTSTATEMASK_E", 15);
1348 DECLARE("INTCR2MASK_B", 8);
1349 DECLARE("INTCR2MASK_E", 11);
1350 DECLARE("INTBACKUPCR2MASK_B", 28);
1351 DECLARE("INTBACKUPCR2MASK_E", 31);
1352 DECLARE("INTCR2TOBACKUPSHIFT", kCR2ToBackupShift);
1353 DECLARE("BB_MAX_TRAP", bbMaxTrap);
1354 DECLARE("BB_RFI_TRAP", bbRFITrap);
1355
1356 /* Various hackery */
1357 DECLARE("procState", offsetof(struct processor *, state));
1358
1359 DECLARE("CPU_SUBTYPE_POWERPC_ALL", CPU_SUBTYPE_POWERPC_ALL);
1360 DECLARE("CPU_SUBTYPE_POWERPC_750", CPU_SUBTYPE_POWERPC_750);
1361 DECLARE("CPU_SUBTYPE_POWERPC_7400", CPU_SUBTYPE_POWERPC_7400);
1362 DECLARE("CPU_SUBTYPE_POWERPC_7450", CPU_SUBTYPE_POWERPC_7450);
1363 DECLARE("CPU_SUBTYPE_POWERPC_970", CPU_SUBTYPE_POWERPC_970);
1364
1365 DECLARE("shdIBAT", offsetof(struct shadowBAT *, IBATs));
1366 DECLARE("shdDBAT", offsetof(struct shadowBAT *, DBATs));
1367
1368 /* Low Memory Globals */
1369
1370 DECLARE("lgVerCode", offsetof(struct lowglo *, lgVerCode));
1371 DECLARE("lgPPStart", offsetof(struct lowglo *, lgPPStart));
1372 DECLARE("maxDec", offsetof(struct lowglo *, lgMaxDec));
1373 DECLARE("mckFlags", offsetof(struct lowglo *, lgMckFlags));
1374 DECLARE("lgPMWvaddr", offsetof(struct lowglo *, lgPMWvaddr));
1375 DECLARE("lgUMWvaddr", offsetof(struct lowglo *, lgUMWvaddr));
1376 DECLARE("trcWork", offsetof(struct lowglo *, lgTrcWork));
1377 DECLARE("traceMask", offsetof(struct lowglo *, lgTrcWork.traceMask));
1378 DECLARE("traceCurr", offsetof(struct lowglo *, lgTrcWork.traceCurr));
1379 DECLARE("traceStart", offsetof(struct lowglo *, lgTrcWork.traceStart));
1380 DECLARE("traceEnd", offsetof(struct lowglo *, lgTrcWork.traceEnd));
1381 DECLARE("traceMsnd", offsetof(struct lowglo *, lgTrcWork.traceMsnd));
1382
1383 DECLARE("Zero", offsetof(struct lowglo *, lgZero));
1384 DECLARE("saveanchor", offsetof(struct lowglo *, lgSaveanchor));
1385
1386 DECLARE("SVlock", offsetof(struct lowglo *, lgSaveanchor.savelock));
1387 DECLARE("SVpoolfwd", offsetof(struct lowglo *, lgSaveanchor.savepoolfwd));
1388 DECLARE("SVpoolbwd", offsetof(struct lowglo *, lgSaveanchor.savepoolbwd));
1389 DECLARE("SVfree", offsetof(struct lowglo *, lgSaveanchor.savefree));
1390 DECLARE("SVfreecnt", offsetof(struct lowglo *, lgSaveanchor.savefreecnt));
1391 DECLARE("SVadjust", offsetof(struct lowglo *, lgSaveanchor.saveadjust));
1392 DECLARE("SVinuse", offsetof(struct lowglo *, lgSaveanchor.saveinuse));
1393 DECLARE("SVtarget", offsetof(struct lowglo *, lgSaveanchor.savetarget));
1394 DECLARE("SVsaveinusesnapshot", offsetof(struct lowglo *, lgSaveanchor.saveinusesnapshot));
1395 DECLARE("SVsavefreesnapshot", offsetof(struct lowglo *, lgSaveanchor.savefreesnapshot));
1396 DECLARE("SVsize", sizeof(struct Saveanchor));
1397
1398 DECLARE("tlbieLock", offsetof(struct lowglo *, lgTlbieLck));
1399
1400 DECLARE("dgFlags", offsetof(struct lowglo *, lgdgWork.dgFlags));
1401 DECLARE("dgLock", offsetof(struct lowglo *, lgdgWork.dgLock));
1402 DECLARE("dgMisc0", offsetof(struct lowglo *, lgdgWork.dgMisc0));
1403
1404 DECLARE("lglcksWork", offsetof(struct lowglo *, lglcksWork));
1405 DECLARE("lgKillResv", offsetof(struct lowglo *, lgKillResv));
1406 DECLARE("lgpPcfg", offsetof(struct lowglo *, lgpPcfg));
1407
1408
1409 DECLARE("scomcpu", offsetof(struct scomcomm *, scomcpu));
1410 DECLARE("scomfunc", offsetof(struct scomcomm *, scomfunc));
1411 DECLARE("scomreg", offsetof(struct scomcomm *, scomreg));
1412 DECLARE("scomstat", offsetof(struct scomcomm *, scomstat));
1413 DECLARE("scomdata", offsetof(struct scomcomm *, scomdata));
1414
1415 return(0); /* For ANSI C :-) */
1416 }