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