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