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