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