xref: /titanic_51/usr/src/uts/sun4/ml/offsets.in (revision f045d8d6fec1759551cc2bce1d26628931f14fce)
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/vmmeter.h>
77#include <sys/mutex_impl.h>
78#include <sys/lockstat.h>
79#include <sys/ddi_isa.h>
80#include <sys/ivintr.h>
81#include <sys/ddi_impldefs.h>
82#include <vm/hat_sfmmu.h>
83#include <sys/avintr.h>
84#include <sys/strsubr.h>
85#include <sys/dmv.h>
86#include <sys/fpu/fpu_simulator.h>
87#include <sys/ontrap.h>
88#include <sys/lgrp.h>
89#include <sys/ddifm_impl.h>
90#include <sys/brand.h>
91
92greg_t		GREGSIZE
93
94uintptr_t	LWP_ARG_SZ
95
96proc		PROCSIZE
97	p_link
98	p_next
99	p_child
100	p_sibling
101	p_sig
102	p_wcode
103	p_flag
104	p_tlist
105	p_as
106	p_lockp
107	p_pidp
108	p_fixalignment
109	p_utraps
110	p_agenttp
111	p_brand
112	p_brand_data
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_rid	IMAP_RID
211	imap_hatflags	IMAP_HATFLAGS
212	imap_sz_mask	IMAP_SZ_MASK
213	imap_ismhat	IMAP_ISMHAT
214
215tsbe	TSBE_SIZE
216	tte_tag		TSBE_TAG
217	tte_data	TSBE_TTE
218
219tsb_tag	TSBTAG_SIZE
220	tagints.inthi	TSBTAG_INTHI
221	tagints.intlo	TSBTAG_INTLO
222
223hme_blk	HMEBLK_SIZE
224	hblk_next	HMEBLK_NEXT
225	hblk_tag	HMEBLK_TAG
226	hblk_misc	HMEBLK_MISC
227	hblk_hme	HMEBLK_HME1
228	hblk_nextpa	HMEBLK_NEXTPA
229
230mmu_ctx MMU_CTX_SIZE
231	mmu_gnum	MMU_CTX_GNUM
232	mmu_cnum	MMU_CTX_CNUM
233	mmu_nctxs	MMU_CTX_NCTXS
234
235sfmmu_ctx	SFMMU_MMU_CTX_SIZE SFMMU_MMU_CTX_SHIFT
236	gnum		SFMMU_MMU_GC_NUM
237
238user	USIZEBYTES
239	u_comm
240	u_signal
241
242_klwp	LWP_SIZE
243	lwp_thread
244	lwp_regs
245	lwp_fpu
246	lwp_arg
247	lwp_cursig
248	lwp_ru.sysc			LWP_RU_SYSC
249	lwp_state
250	lwp_mstate.ms_start		LWP_MS_START
251	lwp_mstate.ms_prev		LWP_MS_PREV
252	lwp_mstate.ms_state_start	LWP_STATE_START
253	lwp_mstate.ms_acct		LWP_MS_ACCT
254	lwp_pcb.pcb_flags		PCB_FLAGS
255	lwp_pcb.pcb_trap0addr		PCB_TRAP0
256	lwp_pcb.pcb_step		PCB_STEP
257	lwp_pcb.pcb_tracepc		PCB_TRACEPC
258
259mstate	MSTATE_SIZE
260	ms_start
261	ms_prev
262	ms_term
263	ms_state_start
264	ms_acct
265
266\#define	LWP_ACCT_USER	(LWP_MS_ACCT + (LMS_USER * LWP_MS_ACCT_INCR))
267\#define	LWP_ACCT_SYSTEM (LWP_MS_ACCT + (LMS_SYSTEM * LWP_MS_ACCT_INCR))
268
269rwindow32	RWIN32SIZE	RWIN32SHIFT
270	rw_local	RW32_LOCAL
271	rw_in		RW32_IN
272
273rwindow64	RWIN64SIZE	RWIN64SHIFT
274	rw_local	RW64_LOCAL
275	rw_in		RW64_IN
276
277machpcb	MPCBSIZE
278	mpcb_regs
279	mpcb_wbuf
280	mpcb_spbuf
281	mpcb_wbcnt
282	mpcb_rwin
283	mpcb_rsp
284	mpcb_flags
285	mpcb_thread
286	mpcb_wstate
287	mpcb_pa		MPCB_PA
288	mpcb_wbuf_pa
289
290\#define	MPCB_RWIN0	(MPCB_RWIN + (0 * MPCB_RWIN_INCR))
291\#define	MPCB_RWIN1	(MPCB_RWIN + (1 * MPCB_RWIN_INCR))
292\#define	MPCB_RSP0	(MPCB_RSP + (0 * MPCB_RSP_INCR))
293\#define	MPCB_RSP1	(MPCB_RSP + (1 * MPCB_RSP_INCR))
294
295kfpu_t	KFPUSIZE
296	fpu_fr.fpu_regs		FPU_REGS
297	fpu_fsr
298	fpu_fprs
299	fpu_q
300	fpu_qcnt
301	fpu_en
302
303\#define	FPU_GSR		KFPUSIZE
304
305regs	REGSIZE
306	r_tstate	TSTATE_OFF
307	r_g1		G1_OFF
308	r_g2		G2_OFF
309	r_g3		G3_OFF
310	r_g4		G4_OFF
311	r_g5		G5_OFF
312	r_g6		G6_OFF
313	r_g7		G7_OFF
314	r_o0		O0_OFF
315	r_o1		O1_OFF
316	r_o2		O2_OFF
317	r_o3		O3_OFF
318	r_o4		O4_OFF
319	r_o5		O5_OFF
320	r_o6		O6_OFF
321	r_o7		O7_OFF
322	r_pc		PC_OFF
323	r_npc		NPC_OFF
324	r_y		Y_OFF
325
326\ XXX - doesn't preserve case up above
327\#define	nPC_OFF		NPC_OFF
328
329flushmeter	FM_SIZE
330	f_ctx		FM_CTX
331	f_usr		FM_USR
332	f_region	FM_REGION
333	f_segment	FM_SEGMENT
334	f_page		FM_PAGE
335	f_partial	FM_PARTIAL
336
337autovec		AUTOVECSIZE
338	av_vector
339	av_intarg
340
341cpu	CPUSIZE
342	cpu_id
343	cpu_flags
344	cpu_thread
345	cpu_thread_lock
346	cpu_kprunrun
347	cpu_lwp
348	cpu_fpowner
349	cpu_idle_thread
350	cpu_intr_thread
351	cpu_intr_actv
352	cpu_base_spl
353	cpu_intr_stack
354	cpu_stats.sys.cpumigrate	CPU_STATS_SYS_CPUMIGRATE
355	cpu_stats.sys.intr		CPU_STATS_SYS_INTR
356	cpu_stats.sys.intrunpin		CPU_STATS_SYS_INTRUNPIN
357	cpu_stats.sys.intrblk		CPU_STATS_SYS_INTRBLK
358	cpu_stats.sys.syscall		CPU_STATS_SYS_SYSCALL
359	cpu_profile_pc
360	cpu_profile_upc
361	cpu_profile_pil
362	cpu_ftrace.ftd_state		CPU_FTRACE_STATE
363	cpu_mstate
364	cpu_intracct
365	cpu_cpcprofile_pc
366	cpu_cpcprofile_upc
367	cpu_m				CPU_MCPU
368	cpu_m.divisor			CPU_DIVISOR
369	cpu_m.intrstat			CPU_INTRSTAT
370	cpu_m.pil_high_start		CPU_PIL_HIGH_START
371	cpu_m.intr_tail			INTR_TAIL
372	cpu_m.intr_head			INTR_HEAD
373	cpu_m.tl1_hdlr			CPU_TL1_HDLR
374	cpu_m.intrcnt			CPU_INTRCNT
375	cpu_m.tmp1			CPU_TMP1
376	cpu_m.tmp2			CPU_TMP2
377	cpu_m.tmp3			CPU_TMP3
378	cpu_m.tmp4			CPU_TMP4
379	cpu_m.ofd			CPU_OFD
380	cpu_m.lfd			CPU_LFD
381	cpu_m.otd			CPU_OTD
382	cpu_m.mpcb			CPU_MPCB
383	cpu_m.cpu_private		CPU_PRIVATE
384	cpu_m.cpu_mmu_idx		CPU_MMU_IDX
385	cpu_m.cpu_mmu_ctxp            	CPU_MMU_CTXP
386	cpu_m.ptl1_state		CPU_PTL1
387
388cpu_core_t	CPU_CORE_SIZE	CPU_CORE_SHIFT
389	cpuc_dtrace_flags
390	cpuc_dtrace_illval
391
392cpuset_t	CPUSET_SIZE
393
394ptl1_state	PTL1_STATE_SIZE
395	ptl1_regs
396	ptl1_entry_count
397	ptl1_stktop
398
399ptl1_trapregs
400	ptl1_tl
401	ptl1_tt
402	ptl1_tstate
403	ptl1_tpc
404	ptl1_tnpc
405
406lgrp_ld		LGRP_LD_SIZE
407	lpl_loadavg
408	lpl_ncpu
409	lpl_lgrpid
410
411intr_vec IV_SIZE
412	iv_inum
413	iv_pil
414	iv_flags
415	iv_pad
416	iv_handler
417	iv_arg1
418	iv_arg2
419	iv_payload_buf
420	iv_vec_next
421	iv_pil_next
422
423dmv_disp DMV_DISP_SIZE DMV_DISP_SHIFT
424	dmv_func
425	dmv_arg
426
427spin_mutex SM_SIZE
428	m_spinlock
429
430i_ndi_err	NDI_ERR_SIZE
431	err_ena
432	err_status
433	err_ontrap
434
435ddi_acc_impl	DDI_ACC_IMPL_SIZE
436	ahi_common
437	ahi_get8
438	ahi_get16
439	ahi_get32
440	ahi_get64
441	ahi_put8
442	ahi_put16
443	ahi_put32
444	ahi_put64
445	ahi_rep_get8
446	ahi_rep_get16
447	ahi_rep_get32
448	ahi_rep_get64
449	ahi_rep_put8
450	ahi_rep_put16
451	ahi_rep_put32
452	ahi_rep_put64
453	ahi_fault_check
454	ahi_fault
455	ahi_err
456
457stdata	STDATA_SIZE
458	sd_lock
459
460queue	 Q_SIZE
461	q_flag
462	q_next
463	q_stream
464	q_syncq
465	q_qinfo
466
467qinit	QI_SIZE
468	qi_putp
469
470syncq	SQ_SIZE
471	sq_flags
472	sq_count
473	sq_lock
474	sq_wait
475	sq_exitwait
476
477bus_ops		BUS_OPS_SIZE
478	bus_dma_map		OPS_MAP
479	bus_dma_allochdl	OPS_ALLOCHDL
480	bus_dma_freehdl		OPS_FREEHDL
481	bus_dma_bindhdl		OPS_BINDHDL
482	bus_dma_unbindhdl	OPS_UNBINDHDL
483	bus_dma_flush		OPS_FLUSH
484	bus_dma_win		OPS_WIN
485	bus_dma_ctl		OPS_MCTL
486	bus_ctl			OPS_CTL
487
488dev_ops		DEV_OPS_SIZE
489	devo_bus_ops	DEVI_BUS_OPS
490
491dev_info	DEVI_SIZE
492	devi_ops	DEVI_DEV_OPS
493	devi_bus_dma_win
494	devi_bus_dma_allochdl
495	devi_bus_dma_freehdl
496	devi_bus_dma_bindhdl
497	devi_bus_dma_unbindhdl
498	devi_bus_dma_flush
499	devi_bus_dma_unbindfunc
500	devi_bus_ctl
501	devi_bus_dma_map
502	devi_bus_dma_ctl
503
504kstat_io
505	wtime		KSTAT_IO_WTIME
506	wlentime	KSTAT_IO_WLENTIME
507	wlastupdate	KSTAT_IO_WLASTUPDATE
508	rtime		KSTAT_IO_RTIME
509	rlentime	KSTAT_IO_RLENTIME
510	rlastupdate	KSTAT_IO_RLASTUPDATE
511	wcnt		KSTAT_IO_WCNT
512	rcnt		KSTAT_IO_RCNT
513
514ddi_dma_impl
515	dmai_rflags	DMA_HANDLE_RFLAGS
516	dmai_rdip	DMA_HANDLE_RDIP
517
518on_trap_data
519	ot_prot
520	ot_trap
521	ot_trampoline
522	ot_jmpbuf
523	ot_prev
524	ot_handle
525	ot_pad1
526
527fpustat_kstat	FPUSTAT_KSTAT_SIZE
528	fpu_unfinished_traps.value	FPUSTAT_UNFIN_KSTAT
529
530fpuinfo_kstat	FPUINFO_KSTAT_SIZE
531	fpu_sim_fitos.value		FPUINFO_FITOS_KSTAT
532
533mod_stub_info	MODS_SIZE
534	mods_func_adr	MODS_INSTFCN
535	mods_errfcn	MODS_RETFCN
536	mods_flag	MODS_FLAG
537
538copyops
539	cp_copyin
540	cp_xcopyin
541	cp_copyout
542	cp_xcopyout
543	cp_copyinstr
544	cp_copyoutstr
545	cp_fuword8
546	cp_fuword16
547	cp_fuword32
548	cp_fuword64
549	cp_suword8
550	cp_suword16
551	cp_suword32
552	cp_suword64
553	cp_physio
554
555brand	BRAND_SIZE
556	b_machops
557
558brand_proc_data_t
559	spd_handler
560