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