xref: /titanic_52/usr/src/uts/sun4/ml/offsets.in (revision 0dee7919e2f2a6479d16b370af93747b9416b242)
1\ offsets.in: input file to produce assym.h using the stabs program
2\ Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
3\ Use is subject to license terms.
4\
5\ CDDL HEADER START
6\
7\ The contents of this file are subject to the terms of the
8\ Common Development and Distribution License, Version 1.0 only
9\ (the "License").  You may not use this file except in compliance
10\ with the License.
11\
12\ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13\ or http://www.opensolaris.org/os/licensing.
14\ See the License for the specific language governing permissions
15\ and limitations under the License.
16\
17\ When distributing Covered Code, include this CDDL HEADER in each
18\ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19\ If applicable, add the following below this CDDL HEADER, with the
20\ fields enclosed by brackets "[]" replaced with your own identifying
21\ information: Portions Copyright [yyyy] [name of copyright owner]
22\
23\ CDDL HEADER END
24\
25\
26\
27\ Guidelines:
28\
29\ A blank line is required between structure/union/intrinsic names.
30\
31\ The general form is:
32\
33\	name size_define [shift_define]
34\		member_name [offset_define]
35\	{blank line}
36\
37\ If offset_define is not specified then the member_name is
38\ converted to all caps and used instead.  If the size of an item is
39\ a power of two then an optional shift count may be output using
40\ shift_define as the name but only if shift_define was specified.
41\
42\ Arrays cause stabs to automatically output the per-array-item increment
43\ in addition to the base address:
44\
45\	 foo FOO_SIZE
46\		array	FOO_ARRAY
47\
48\ results in:
49\
50\	#define	FOO_ARRAY	0x0
51\	#define	FOO_ARRAY_INCR	0x4
52\
53\ which allows \#define's to be used to specify array items:
54\
55\	#define	FOO_0	(FOO_ARRAY + (0 * FOO_ARRAY_INCR))
56\	#define	FOO_1	(FOO_ARRAY + (1 * FOO_ARRAY_INCR))
57\	...
58\	#define	FOO_n	(FOO_ARRAY + (n * FOO_ARRAY_INCR))
59\
60\ There are several examples below (search for _INCR).
61\
62\ There is currently no manner in which to identify "anonymous"
63\ structures or unions so if they are to be used in assembly code
64\ they must be given names.
65\
66\ When specifying the offsets of nested structures/unions each nested
67\ structure or union must be listed separately then use the
68\ "\#define" escapes to add the offsets from the base structure/union
69\ and all of the nested structures/unions together.  See the many
70\ examples already in this file.
71
72#pragma ident	"%Z%%M%	%I%	%E% SMI"
73
74#ifndef	_GENASSYM
75#define	_GENASSYM
76#endif
77
78#define	SIZES	1
79
80#include <sys/vmmeter.h>
81#include <sys/mutex_impl.h>
82#include <sys/lockstat.h>
83#include <sys/ddi_isa.h>
84#include <sys/ivintr.h>
85#include <sys/ddi_impldefs.h>
86#include <vm/hat_sfmmu.h>
87#include <sys/avintr.h>
88#include <sys/strsubr.h>
89#include <sys/dmv.h>
90#include <sys/fpu/fpu_simulator.h>
91#include <sys/ontrap.h>
92#include <sys/lgrp.h>
93#include <sys/ddifm_impl.h>
94
95greg_t		GREGSIZE
96
97uintptr_t	LWP_ARG_SZ
98
99proc		PROCSIZE
100	p_link
101	p_next
102	p_child
103	p_sibling
104	p_sig
105	p_wcode
106	p_flag
107	p_tlist
108	p_as
109	p_lockp
110	p_pidp
111	p_fixalignment
112	p_utraps
113
114\#define	P_UTRAP4	(UT_ILLTRAP_INSTRUCTION * CPTRSIZE)
115\#define	P_UTRAP7	(UT_FP_DISABLED * CPTRSIZE)
116\#define	P_UTRAP8	(UT_FP_EXCEPTION_IEEE_754 * CPTRSIZE)
117\#define	P_UTRAP10	(UT_TAG_OVERFLOW * CPTRSIZE)
118\#define	P_UTRAP11	(UT_DIVISION_BY_ZERO * CPTRSIZE)
119\#define	P_UTRAP15	(UT_MEM_ADDRESS_NOT_ALIGNED * CPTRSIZE)
120\#define	P_UTRAP16	(UT_PRIVILEGED_ACTION * CPTRSIZE)
121
122pid	PID_SIZE
123	pid_id	PID_PIDID
124
125_label_t	LABEL_SIZE
126	val	LABEL_VAL
127
128_kthread	THREAD_SIZE
129	t_lock
130	t_lock_flush
131	t_lockp
132	t_oldspl
133	t_pri
134	t_lwp
135	t_procp
136	t_link
137	t_state
138	t_mstate
139	t_stk		T_STACK
140	t_swap
141	t_flag		T_FLAGS
142	t_ctx
143	t_pcb
144	t_lofault
145	t_onfault
146	t_ontrap
147	t_nomigrate
148	t_cpu
149	t_weakbound_cpu
150	t_lpl
151	t_bound_cpu
152	t_intr
153	t_forw
154	t_back
155	t_sig
156	t_tid
157	t_pre_sys
158	t_preempt
159	t_proc_flag
160	t_startpc
161	t_sysnum
162	_tu._t_post_sys_ast	T_POST_SYS_AST
163	_tu._ts._t_astflag	T_ASTFLAG
164	_tu._ts._t_sig_check	T_SIG_CHECK
165	_tu._ts._t_post_sys	T_POST_SYS
166	_tu._ts._t_trapret	T_TRAPRET
167	t_preempt_lk
168	t_kpri_req
169	t_lockstat
170	t_pil
171	t_intr_start
172	_tdu._tds._t_dtrace_on	T_DTRACE_ON
173	_tdu._tds._t_dtrace_step T_DTRACE_STEP
174	_tdu._tds._t_dtrace_ret	T_DTRACE_RET
175	_tdu._tds._t_dtrace_ast	T_DTRACE_AST
176	_tdu._t_dtrace_ft	T_DTRACE_FT
177	t_dtrace_npc
178	t_copyops
179
180\#define	L_PC	(0 * LABEL_VAL_INCR)
181\#define	L_SP	(1 * LABEL_VAL_INCR)
182
183\#define	T_PC	(T_PCB + L_PC)
184\#define	T_SP	(T_PCB + L_SP)
185
186sysent	SYSENT_SIZE SYSENT_SHIFT
187	sy_callc
188	sy_flags
189
190as	AS_SIZE
191	a_hat
192	a_userlimit
193
194hmehash_bucket	HMEBUCK_SIZE
195	hmeblkp	HMEBUCK_HBLK
196	hmeh_nextpa	HMEBUCK_NEXTPA
197	hmeh_listlock	HMEBUCK_LOCK
198
199tte_t	TTE_SIZE
200	ll	TTE_LL
201
202ism_blk	ISMBLK_SIZE
203	iblk_maps	IBLK_MAPS
204	iblk_next	IBLK_NEXT
205	iblk_nextpa	IBLK_NEXTPA
206
207ism_map_t	ISM_MAP_SZ
208	imap_seg	IMAP_SEG
209	imap_vb_shift	IMAP_VB_SHIFT
210	imap_hatflags	IMAP_HATFLAGS
211	imap_sz_mask	IMAP_SZ_MASK
212	imap_ismhat	IMAP_ISMHAT
213
214tsbe	TSBE_SIZE
215	tte_tag		TSBE_TAG
216	tte_data	TSBE_TTE
217
218tsb_tag	TSBTAG_SIZE
219	tagints.inthi	TSBTAG_INTHI
220	tagints.intlo	TSBTAG_INTLO
221
222hme_blk	HMEBLK_SIZE
223	hblk_next	HMEBLK_NEXT
224	hblk_tag	HMEBLK_TAG
225	hblk_misc	HMEBLK_MISC
226	hblk_hme	HMEBLK_HME1
227	hblk_nextpa	HMEBLK_NEXTPA
228
229user	USIZEBYTES
230	u_comm
231	u_signal
232
233_klwp	LWP_SIZE
234	lwp_thread
235	lwp_regs
236	lwp_fpu
237	lwp_arg
238	lwp_cursig
239	lwp_ru.sysc			LWP_RU_SYSC
240	lwp_state
241	lwp_mstate.ms_start		LWP_MS_START
242	lwp_mstate.ms_prev		LWP_MS_PREV
243	lwp_mstate.ms_state_start	LWP_STATE_START
244	lwp_mstate.ms_acct		LWP_MS_ACCT
245	lwp_pcb.pcb_flags		PCB_FLAGS
246	lwp_pcb.pcb_trap0addr		PCB_TRAP0
247	lwp_pcb.pcb_step		PCB_STEP
248	lwp_pcb.pcb_tracepc		PCB_TRACEPC
249
250mstate	MSTATE_SIZE
251	ms_start
252	ms_prev
253	ms_term
254	ms_state_start
255	ms_acct
256
257\#define	LWP_ACCT_USER	(LWP_MS_ACCT + (LMS_USER * LWP_MS_ACCT_INCR))
258\#define	LWP_ACCT_SYSTEM (LWP_MS_ACCT + (LMS_SYSTEM * LWP_MS_ACCT_INCR))
259
260rwindow32	RWIN32SIZE	RWIN32SHIFT
261	rw_local	RW32_LOCAL
262	rw_in		RW32_IN
263
264rwindow64	RWIN64SIZE	RWIN64SHIFT
265	rw_local	RW64_LOCAL
266	rw_in		RW64_IN
267
268machpcb	MPCBSIZE
269	mpcb_regs
270	mpcb_wbuf
271	mpcb_spbuf
272	mpcb_wbcnt
273	mpcb_rwin
274	mpcb_rsp
275	mpcb_flags
276	mpcb_thread
277	mpcb_wstate
278	mpcb_pa		MPCB_PA
279	mpcb_wbuf_pa
280
281\#define	MPCB_RWIN0	(MPCB_RWIN + (0 * MPCB_RWIN_INCR))
282\#define	MPCB_RWIN1	(MPCB_RWIN + (1 * MPCB_RWIN_INCR))
283\#define	MPCB_RSP0	(MPCB_RSP + (0 * MPCB_RSP_INCR))
284\#define	MPCB_RSP1	(MPCB_RSP + (1 * MPCB_RSP_INCR))
285
286kfpu_t	KFPUSIZE
287	fpu_fr.fpu_regs		FPU_REGS
288	fpu_fsr
289	fpu_fprs
290	fpu_q
291	fpu_qcnt
292	fpu_en
293
294\#define	FPU_GSR		KFPUSIZE
295
296regs	REGSIZE
297	r_tstate	TSTATE_OFF
298	r_g1		G1_OFF
299	r_g2		G2_OFF
300	r_g3		G3_OFF
301	r_g4		G4_OFF
302	r_g5		G5_OFF
303	r_g6		G6_OFF
304	r_g7		G7_OFF
305	r_o0		O0_OFF
306	r_o1		O1_OFF
307	r_o2		O2_OFF
308	r_o3		O3_OFF
309	r_o4		O4_OFF
310	r_o5		O5_OFF
311	r_o6		O6_OFF
312	r_o7		O7_OFF
313	r_pc		PC_OFF
314	r_npc		NPC_OFF
315	r_y		Y_OFF
316
317\ XXX - doesn't preserve case up above
318\#define	nPC_OFF		NPC_OFF
319
320flushmeter	FM_SIZE
321	f_ctx		FM_CTX
322	f_usr		FM_USR
323	f_region	FM_REGION
324	f_segment	FM_SEGMENT
325	f_page		FM_PAGE
326	f_partial	FM_PARTIAL
327
328autovec		AUTOVECSIZE
329	av_vector
330	av_intarg
331
332cpu	CPUSIZE
333	cpu_id
334	cpu_flags
335	cpu_thread
336	cpu_thread_lock
337	cpu_kprunrun
338	cpu_lwp
339	cpu_fpowner
340	cpu_idle_thread
341	cpu_intr_thread
342	cpu_intr_actv
343	cpu_base_spl
344	cpu_intr_stack
345	cpu_stats.sys.cpumigrate	CPU_STATS_SYS_CPUMIGRATE
346	cpu_stats.sys.intr		CPU_STATS_SYS_INTR
347	cpu_stats.sys.intrunpin		CPU_STATS_SYS_INTRUNPIN
348	cpu_stats.sys.intrblk		CPU_STATS_SYS_INTRBLK
349	cpu_stats.sys.syscall		CPU_STATS_SYS_SYSCALL
350	cpu_profile_pc
351	cpu_profile_upc
352	cpu_profile_pil
353	cpu_ftrace.ftd_state		CPU_FTRACE_STATE
354	cpu_m				CPU_MCPU
355	cpu_m.divisor			CPU_DIVISOR
356	cpu_m.intrstat			CPU_INTRSTAT
357	cpu_m.pil_high_start		CPU_PIL_HIGH_START
358	cpu_m.intr_tail			INTR_TAIL
359	cpu_m.intr_head			INTR_HEAD
360	cpu_m.intr_pool			INTR_POOL
361	cpu_m.tl1_hdlr			CPU_TL1_HDLR
362	cpu_m.intrcnt			CPU_INTRCNT
363	cpu_m.tmp1			CPU_TMP1
364	cpu_m.tmp2			CPU_TMP2
365	cpu_m.mpcb			CPU_MPCB
366	cpu_m.cpu_private		CPU_PRIVATE
367	cpu_m.ptl1_state		CPU_PTL1
368
369cpu_core_t	CPU_CORE_SIZE	CPU_CORE_SHIFT
370	cpuc_dtrace_flags
371	cpuc_dtrace_illval
372
373cpuset_t	CPUSET_SIZE
374
375ptl1_state	PTL1_STATE_SIZE
376	ptl1_regs
377	ptl1_entry_count
378	ptl1_stktop
379
380ptl1_trapregs
381	ptl1_tl
382	ptl1_tt
383	ptl1_tstate
384	ptl1_tpc
385	ptl1_tnpc
386
387lgrp_ld		LGRP_LD_SIZE
388	lpl_loadavg
389	lpl_ncpu
390	lpl_lgrpid
391
392intr_vector INTR_VECTOR_SIZE INTR_VECTOR_SHIFT
393	iv_handler
394	iv_arg
395	iv_pil
396	iv_pending
397	iv_payload_buf
398	iv_softint_arg2
399
400dmv_disp DMV_DISP_SIZE DMV_DISP_SHIFT
401	dmv_func
402	dmv_arg
403
404intr_req	INTR_SIZE
405	intr_number
406	intr_next
407
408spin_mutex SM_SIZE
409	m_spinlock
410
411i_ndi_err	NDI_ERR_SIZE
412	err_ena
413	err_status
414	err_ontrap
415
416ddi_acc_impl	DDI_ACC_IMPL_SIZE
417	ahi_common
418	ahi_get8
419	ahi_get16
420	ahi_get32
421	ahi_get64
422	ahi_put8
423	ahi_put16
424	ahi_put32
425	ahi_put64
426	ahi_rep_get8
427	ahi_rep_get16
428	ahi_rep_get32
429	ahi_rep_get64
430	ahi_rep_put8
431	ahi_rep_put16
432	ahi_rep_put32
433	ahi_rep_put64
434	ahi_fault_check
435	ahi_fault
436	ahi_err
437
438stdata	STDATA_SIZE
439	sd_lock
440
441queue	 Q_SIZE
442	q_flag
443	q_next
444	q_stream
445	q_syncq
446	q_qinfo
447
448qinit	QI_SIZE
449	qi_putp
450
451syncq	SQ_SIZE
452	sq_flags
453	sq_count
454	sq_lock
455	sq_wait
456	sq_exitwait
457
458bus_ops		BUS_OPS_SIZE
459	bus_dma_map		OPS_MAP
460	bus_dma_allochdl	OPS_ALLOCHDL
461	bus_dma_freehdl		OPS_FREEHDL
462	bus_dma_bindhdl		OPS_BINDHDL
463	bus_dma_unbindhdl	OPS_UNBINDHDL
464	bus_dma_flush		OPS_FLUSH
465	bus_dma_win		OPS_WIN
466	bus_dma_ctl		OPS_MCTL
467	bus_ctl			OPS_CTL
468
469dev_ops		DEV_OPS_SIZE
470	devo_bus_ops	DEVI_BUS_OPS
471
472dev_info	DEVI_SIZE
473	devi_ops	DEVI_DEV_OPS
474	devi_bus_dma_win
475	devi_bus_dma_allochdl
476	devi_bus_dma_freehdl
477	devi_bus_dma_bindhdl
478	devi_bus_dma_unbindhdl
479	devi_bus_dma_flush
480	devi_bus_dma_unbindfunc
481	devi_bus_ctl
482	devi_bus_dma_map
483	devi_bus_dma_ctl
484
485kstat_io
486	wtime		KSTAT_IO_WTIME
487	wlentime	KSTAT_IO_WLENTIME
488	wlastupdate	KSTAT_IO_WLASTUPDATE
489	rtime		KSTAT_IO_RTIME
490	rlentime	KSTAT_IO_RLENTIME
491	rlastupdate	KSTAT_IO_RLASTUPDATE
492	wcnt		KSTAT_IO_WCNT
493	rcnt		KSTAT_IO_RCNT
494
495ddi_dma_impl
496	dmai_rflags	DMA_HANDLE_RFLAGS
497	dmai_rdip	DMA_HANDLE_RDIP
498
499on_trap_data
500	ot_prot
501	ot_trap
502	ot_trampoline
503	ot_jmpbuf
504	ot_prev
505	ot_handle
506	ot_pad1
507
508fpustat_kstat	FPUSTAT_KSTAT_SIZE
509	fpu_unfinished_traps.value	FPUSTAT_UNFIN_KSTAT
510
511fpuinfo_kstat	FPUINFO_KSTAT_SIZE
512	fpu_sim_fitos.value		FPUINFO_FITOS_KSTAT
513
514mod_stub_info	MODS_SIZE
515	mods_func_adr	MODS_INSTFCN
516	mods_errfcn	MODS_RETFCN
517	mods_flag	MODS_FLAG
518
519copyops
520	cp_copyin
521	cp_xcopyin
522	cp_copyout
523	cp_xcopyout
524	cp_copyinstr
525	cp_copyoutstr
526	cp_fuword8
527	cp_fuword16
528	cp_fuword32
529	cp_fuword64
530	cp_suword8
531	cp_suword16
532	cp_suword32
533	cp_suword64
534	cp_physio
535
536