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