xref: /illumos-gate/usr/src/uts/i86pc/ml/offsets.in (revision c3937c08b16d32677a7dc955a81325f2e7a61b5d)
1\
2\ Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
3\ Copyright 2012 Garrett D'Amore <garrett@damore.org>.  All rights reserved.
4\ Copyright 2019 Joyent, Inc.
5\
6\ CDDL HEADER START
7\
8\ The contents of this file are subject to the terms of the
9\ Common Development and Distribution License (the "License").
10\ You may not use this file except in compliance 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\
28\ offsets.in: input file to produce assym.h using the ctfstabs program
29\
30
31#ifndef	_GENASSYM
32#define	_GENASSYM
33#endif
34
35#define	SIZES	1
36
37#include <sys/types.h>
38#include <sys/bootsvcs.h>
39#include <sys/systm.h>
40#include <sys/sysinfo.h>
41#include <sys/user.h>
42#include <sys/thread.h>
43#include <sys/proc.h>
44#include <sys/cpuvar.h>
45#include <sys/tss.h>
46#include <sys/privregs.h>
47#include <sys/segments.h>
48#include <sys/devops.h>
49#include <sys/ddi_impldefs.h>
50#include <vm/as.h>
51#include <sys/avintr.h>
52#include <sys/pic.h>
53#include <sys/rm_platter.h>
54#include <sys/stream.h>
55#include <sys/strsubr.h>
56#include <sys/sunddi.h>
57#include <sys/modctl.h>
58#include <sys/traptrace.h>
59#include <sys/ontrap.h>
60#include <sys/lgrp.h>
61#include <sys/dtrace.h>
62#include <sys/brand.h>
63#include <sys/fastboot.h>
64#include <sys/cpr_wakecode.h>
65#include <sys/comm_page.h>
66
67proc		PROCSIZE
68	p_link
69	p_next
70	p_child
71	p_sibling
72	p_sig
73	p_flag
74	p_tlist
75	p_as
76	p_lockp
77	p_user
78	p_model
79	p_pctx
80	p_agenttp
81	p_zone
82	p_brand
83	p_brand_data
84
85_kthread	THREAD_SIZE
86	t_pcb			T_LABEL
87	t_lock
88	t_lockstat
89	t_lockp
90	t_lock_flush
91	t_oldspl
92	t_pri
93	t_pil
94	t_lwp
95	t_procp
96	t_link
97	t_state
98	t_mstate
99	t_preempt_lk
100	t_stk			T_STACK
101	t_swap
102	t_lwpchan.lc_wchan	T_WCHAN
103	t_flag			T_FLAGS
104	t_ctx
105	t_lofault
106	t_onfault
107	t_ontrap
108	t_cpu
109	t_lpl
110	t_bound_cpu
111	t_intr
112	t_forw
113	t_back
114	t_sig
115	t_tid
116	t_pre_sys
117	t_preempt
118	t_proc_flag
119	t_startpc
120	t_sysnum
121	t_intr_start
122	_tu._ts._t_astflag	T_ASTFLAG
123	_tu._ts._t_post_sys	T_POST_SYS
124	_tu._t_post_sys_ast	T_POST_SYS_AST
125	t_copyops
126	t_useracc
127
128as
129	a_hat
130
131user	USIZEBYTES
132	u_comm
133	u_signal
134
135_label_t
136	val	LABEL_VAL
137
138\#define	LABEL_PC	LABEL_VAL
139\#define	LABEL_SP	_CONST(LABEL_VAL + LABEL_VAL_INCR)
140\#define	T_PC		_CONST(T_LABEL + LABEL_PC)
141\#define	T_SP		_CONST(T_LABEL + LABEL_SP)
142
143_klwp
144	lwp_thread
145	lwp_procp
146	lwp_brand
147	lwp_eosys
148	lwp_regs
149	lwp_arg
150	lwp_ap
151	lwp_cursig
152	lwp_state
153	lwp_mstate.ms_acct	LWP_MS_ACCT
154	lwp_mstate.ms_prev	LWP_MS_PREV
155	lwp_mstate.ms_start	LWP_MS_START
156	lwp_mstate.ms_state_start LWP_MS_STATE_START
157	lwp_pcb
158	lwp_ru.sysc		LWP_RU_SYSC
159
160\#define	LWP_ACCT_USER	_CONST(LWP_MS_ACCT + _MUL(LMS_USER, LWP_MS_ACCT_INCR))
161\#define	LWP_ACCT_SYSTEM	_CONST(LWP_MS_ACCT + _MUL(LMS_SYSTEM, LWP_MS_ACCT_INCR))
162
163fpu_ctx
164	fpu_regs		FPU_CTX_FPU_REGS
165	fpu_flags		FPU_CTX_FPU_FLAGS
166	fpu_xsave_mask		FPU_CTX_FPU_XSAVE_MASK
167
168fxsave_state	FXSAVE_STATE_SIZE
169	fx_fsw			FXSAVE_STATE_FSW
170	fx_mxcsr_mask		FXSAVE_STATE_MXCSR_MASK
171
172
173autovec		AUTOVECSIZE
174	av_vector
175	av_intarg1
176	av_intarg2
177	av_ticksp
178	av_link
179	av_prilevel
180	av_dip
181
182av_head
183	avh_link
184	avh_hi_pri
185	avh_lo_pri
186
187cpu
188	cpu_id
189	cpu_flags
190	cpu_self
191	cpu_thread
192	cpu_thread_lock
193	cpu_kprunrun
194	cpu_lwp
195	cpu_fpowner
196	cpu_idle_thread
197	cpu_intr_thread
198	cpu_intr_actv
199	cpu_base_spl
200	cpu_intr_stack
201	cpu_stats.sys.cpumigrate	CPU_STATS_SYS_CPUMIGRATE
202	cpu_stats.sys.intr		CPU_STATS_SYS_INTR
203	cpu_stats.sys.intrblk		CPU_STATS_SYS_INTRBLK
204	cpu_stats.sys.syscall		CPU_STATS_SYS_SYSCALL
205	cpu_profile_pc
206	cpu_profile_upc
207	cpu_profile_pil
208	cpu_ftrace.ftd_state		CPU_FTRACE_STATE
209	cpu_mstate
210	cpu_intracct
211
212\#define	CPU_INTR_ACTV_REF	_CONST(CPU_INTR_ACTV + 2)
213
214cpu
215	cpu_m.pil_high_start	CPU_PIL_HIGH_START
216	cpu_m.intrstat		CPU_INTRSTAT
217	cpu_m.mcpu_current_hat	CPU_CURRENT_HAT
218	cpu_m.mcpu_gdt		CPU_GDT
219	cpu_m.mcpu_idt		CPU_IDT
220	cpu_m.mcpu_tss		CPU_TSS
221	cpu_m.mcpu_softinfo	CPU_SOFTINFO
222	cpu_m.mcpu_pri		CPU_PRI
223#if defined(__xpv)
224	cpu_m.mcpu_vcpu_info	CPU_VCPU_INFO
225#endif
226
227cpu
228	cpu_m.mcpu_kpti.kf_kernel_cr3	CPU_KPTI_KCR3
229	cpu_m.mcpu_kpti.kf_user_cr3	CPU_KPTI_UCR3
230	cpu_m.mcpu_kpti.kf_tr_rsp	CPU_KPTI_TR_RSP
231	cpu_m.mcpu_kpti.kf_tr_cr3	CPU_KPTI_TR_CR3
232	cpu_m.mcpu_kpti.kf_r13		CPU_KPTI_R13
233	cpu_m.mcpu_kpti.kf_r14		CPU_KPTI_R14
234	cpu_m.mcpu_kpti.kf_tr_ret_rsp	CPU_KPTI_RET_RSP
235
236	cpu_m.mcpu_kpti.kf_ss		CPU_KPTI_SS
237	cpu_m.mcpu_kpti.kf_rsp		CPU_KPTI_RSP
238	cpu_m.mcpu_kpti.kf_rflags	CPU_KPTI_RFLAGS
239	cpu_m.mcpu_kpti.kf_cs		CPU_KPTI_CS
240	cpu_m.mcpu_kpti.kf_rip		CPU_KPTI_RIP
241	cpu_m.mcpu_kpti.kf_err		CPU_KPTI_ERR
242
243	cpu_m.mcpu_pad2			CPU_KPTI_START
244	cpu_m.mcpu_pad3			CPU_KPTI_END
245
246	cpu_m.mcpu_kpti_dbg		CPU_KPTI_DBG
247
248kpti_frame
249	kf_r14		KPTI_R14
250	kf_r13		KPTI_R13
251	kf_err		KPTI_ERR
252	kf_rip		KPTI_RIP
253	kf_cs		KPTI_CS
254	kf_rflags	KPTI_RFLAGS
255	kf_rsp		KPTI_RSP
256	kf_ss		KPTI_SS
257
258	kf_tr_rsp	KPTI_TOP
259
260	kf_kernel_cr3	KPTI_KCR3
261	kf_user_cr3	KPTI_UCR3
262	kf_tr_ret_rsp	KPTI_RET_RSP
263	kf_tr_cr3	KPTI_TR_CR3
264
265	kf_tr_flag	KPTI_FLAG
266
267standard_pic
268	c_curmask
269	c_iplmask
270
271ddi_dma_impl
272	dmai_rflags
273	dmai_rdip
274
275dev_info
276	devi_ops		DEVI_DEV_OPS
277	devi_bus_ctl
278	devi_bus_dma_ctl
279	devi_bus_dma_allochdl
280	devi_bus_dma_freehdl
281	devi_bus_dma_bindhdl
282	devi_bus_dma_unbindhdl
283	devi_bus_dma_flush
284	devi_bus_dma_win
285
286dev_ops
287	devo_bus_ops		DEVI_BUS_OPS
288
289bus_ops
290	bus_ctl			OPS_CTL
291	bus_dma_map		OPS_MAP
292	bus_dma_ctl		OPS_MCTL
293	bus_dma_allochdl	OPS_ALLOCHDL
294	bus_dma_freehdl		OPS_FREEHDL
295	bus_dma_bindhdl		OPS_BINDHDL
296	bus_dma_unbindhdl	OPS_UNBINDHDL
297	bus_dma_flush		OPS_FLUSH
298	bus_dma_win		OPS_WIN
299
300sysent	SYSENT_SIZE	SYSENT_SIZE_SHIFT
301	sy_callc
302	sy_flags
303	sy_narg
304
305stdata
306	sd_lock
307
308queue
309	q_flag
310	q_next
311	q_stream
312	q_syncq
313	q_qinfo
314
315qinit
316	qi_putp
317
318syncq
319	sq_flags
320	sq_count
321	sq_lock
322	sq_wait
323
324rm_platter
325	rm_idt_lim		IDTROFF
326	rm_gdt_lim		GDTROFF
327	rm_pdbr			CR3OFF
328	rm_cpu			CPUNOFF
329	rm_cr4			CR4OFF
330	rm_cpu_halt_code	CPUHALTCODEOFF
331	rm_cpu_halted		CPUHALTEDOFF
332
333ddi_acc_impl
334	ahi_acc_attr	ACC_ATTR
335	ahi_get8	ACC_GETB
336	ahi_get16	ACC_GETW
337	ahi_get32	ACC_GETL
338	ahi_get64	ACC_GETLL
339	ahi_put8	ACC_PUTB
340	ahi_put16	ACC_PUTW
341	ahi_put32	ACC_PUTL
342	ahi_put64	ACC_PUTLL
343	ahi_rep_get8	ACC_REP_GETB
344	ahi_rep_get16	ACC_REP_GETW
345	ahi_rep_get32	ACC_REP_GETL
346	ahi_rep_get64	ACC_REP_GETLL
347	ahi_rep_put8	ACC_REP_PUTB
348	ahi_rep_put16	ACC_REP_PUTW
349	ahi_rep_put32	ACC_REP_PUTL
350	ahi_rep_put64	ACC_REP_PUTLL
351
352on_trap_data
353	ot_prot
354	ot_trap
355	ot_trampoline
356	ot_jmpbuf
357	ot_prev
358	ot_handle
359	ot_pad1
360
361trap_trace_ctl_t	__TRAPTR_SIZE TRAPTR_SIZE_SHIFT
362	ttc_next	TRAPTR_NEXT
363	ttc_first	TRAPTR_FIRST
364	ttc_limit	TRAPTR_LIMIT
365
366trap_trace_rec_t	TRAP_ENT_SIZE
367	ttr_cr2
368	ttr_info.idt_entry.vector	TTR_VECTOR
369	ttr_info.idt_entry.ipl		TTR_IPL
370	ttr_info.idt_entry.spl		TTR_SPL
371	ttr_info.idt_entry.pri		TTR_PRI
372	ttr_info.gate_entry.sysnum	TTR_SYSNUM
373	ttr_marker
374	ttr_stamp
375	ttr_curthread
376	ttr_sdepth
377	ttr_stack
378
379lgrp_ld
380	lpl_lgrpid
381
382dtrace_id_t	DTRACE_IDSIZE
383
384cpu_core	CPU_CORE_SIZE	CPU_CORE_SHIFT
385	cpuc_dtrace_flags
386	cpuc_dtrace_illval
387
388timespec	TIMESPEC_SIZE
389
390gate_desc	GATE_DESC_SIZE
391
392desctbr_t	DESCTBR_SIZE
393	dtr_limit
394	dtr_base
395
396mod_stub_info	MODS_SIZE
397	mods_func_adr	MODS_INSTFCN
398	mods_errfcn	MODS_RETFCN
399	mods_flag
400
401\#define	TRAP_TSIZE		_MUL(TRAP_ENT_SIZE, TRAPTR_NENT)
402
403copyops
404	cp_copyin
405	cp_xcopyin
406	cp_copyout
407	cp_xcopyout
408	cp_copyinstr
409	cp_copyoutstr
410	cp_fuword8
411	cp_fuword16
412	cp_fuword32
413	cp_fuword64
414	cp_suword8
415	cp_suword16
416	cp_suword32
417	cp_suword64
418	cp_physio
419
420brand
421	b_machops
422
423brand_proc_data_t
424	spd_handler
425
426fastboot_file_t
427	fb_va
428	fb_pte_list_va
429	fb_pte_list_pa
430	fb_dest_pa
431	fb_size
432	fb_next_pa
433	fb_sections
434	fb_sectcnt
435
436fastboot_section_t
437	fb_sec_offset
438	fb_sec_paddr
439	fb_sec_size
440	fb_sec_bss_size
441
442fastboot_info_t
443	fi_files
444	fi_has_pae
445	fi_pagetable_va
446	fi_pagetable_pa
447	fi_last_table_pa
448	fi_new_mbi_pa
449	fi_valid
450
451zone
452	zone_brand_data
453
454wc_cpu	WC_CPU_SIZE
455	wc_retaddr
456	wc_virtaddr
457	wc_cr0
458	wc_cr3
459	wc_cr4
460	wc_cr8
461	wc_fs
462	wc_fsbase
463	wc_gs
464	wc_gsbase
465	wc_kgsbase
466	wc_r8
467	wc_r9
468	wc_r10
469	wc_r11
470	wc_r12
471	wc_r13
472	wc_r14
473	wc_r15
474	wc_rax
475	wc_rbp
476	wc_rbx
477	wc_rcx
478	wc_rdi
479	wc_rdx
480	wc_rsi
481	wc_rsp
482	wc_gdt_limit	WC_GDT
483	wc_gdt_base
484	wc_idt_limit	WC_IDT
485	wc_idt_base
486	wc_tr
487	wc_ldt
488	wc_eflags
489	wc_ebx
490	wc_edi
491	wc_esi
492	wc_ebp
493	wc_esp
494	wc_esp
495	wc_ss
496	wc_cs
497	wc_ds
498	wc_es
499	wc_cpu_id
500	wc_saved_stack
501
502wc_wakecode
503	wc_cpu
504
505comm_page_s	COMM_PAGE_S_SIZE
506