summaryrefslogtreecommitdiff
path: root/usr/src/uts/i86pc/ml/offsets.in
blob: 8390ba0fc9c991ca9375e02c0be94cd31f9298c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
\
\ Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
\ Copyright 2012 Garrett D'Amore <garrett@damore.org>.  All rights reserved.
\ Copyright 2018 Joyent, Inc.
\
\ CDDL HEADER START
\
\ The contents of this file are subject to the terms of the
\ Common Development and Distribution License (the "License").
\ You may not use this file except in compliance with the License.
\
\ You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
\ or http://www.opensolaris.org/os/licensing.
\ See the License for the specific language governing permissions
\ and limitations under the License.
\
\ When distributing Covered Code, include this CDDL HEADER in each
\ file and include the License file at usr/src/OPENSOLARIS.LICENSE.
\ If applicable, add the following below this CDDL HEADER, with the
\ fields enclosed by brackets "[]" replaced with your own identifying
\ information: Portions Copyright [yyyy] [name of copyright owner]
\
\ CDDL HEADER END
\


\
\ offsets.in: input file to produce assym.h using the ctfstabs program
\

#ifndef	_GENASSYM
#define	_GENASSYM
#endif

#define	SIZES	1

#include <sys/types.h>
#include <sys/bootsvcs.h>
#include <sys/systm.h>
#include <sys/sysinfo.h>
#include <sys/user.h>
#include <sys/thread.h>
#include <sys/proc.h>
#include <sys/cpuvar.h>
#include <sys/tss.h>
#include <sys/privregs.h>
#include <sys/segments.h>
#include <sys/devops.h>
#include <sys/ddi_impldefs.h>
#include <vm/as.h>
#include <sys/avintr.h>
#include <sys/pic.h>
#include <sys/rm_platter.h>
#include <sys/stream.h>
#include <sys/strsubr.h>
#include <sys/sunddi.h>
#include <sys/modctl.h>
#include <sys/traptrace.h>
#include <sys/ontrap.h>
#include <sys/lgrp.h>
#include <sys/dtrace.h>
#include <sys/brand.h>
#include <sys/fastboot.h>
#include <sys/cpr_wakecode.h>
#include <sys/comm_page.h>

proc		PROCSIZE
	p_link
	p_next
	p_child
	p_sibling
	p_sig
	p_flag
	p_tlist
	p_as
	p_lockp
	p_user
	p_model
	p_pctx
	p_agenttp
	p_zone
	p_brand
	p_brand_data

_kthread	THREAD_SIZE
	t_pcb			T_LABEL
	t_lock
	t_lockstat
	t_lockp
	t_lock_flush
	t_kpri_req
	t_oldspl
	t_pri
	t_pil
	t_lwp
	t_procp
	t_link
	t_state
	t_mstate
	t_preempt_lk
	t_stk			T_STACK
	t_swap
	t_lwpchan.lc_wchan	T_WCHAN
	t_flag			T_FLAGS
	t_ctx
	t_lofault
	t_onfault
	t_ontrap
	t_cpu
	t_lpl
	t_bound_cpu
	t_intr
	t_forw
	t_back
	t_sig
	t_tid
	t_pre_sys
	t_preempt
	t_proc_flag
	t_startpc
	t_sysnum
	t_intr_start
	_tu._ts._t_astflag	T_ASTFLAG
	_tu._ts._t_post_sys	T_POST_SYS
	_tu._t_post_sys_ast	T_POST_SYS_AST
	t_copyops
#ifdef	__amd64
	t_useracc
#endif

ctxop
	save_op			CTXOP_SAVE

as
	a_hat

user	USIZEBYTES
	u_comm
	u_signal

_label_t
	val	LABEL_VAL

\#define	LABEL_PC	LABEL_VAL
\#define	LABEL_SP	_CONST(LABEL_VAL + LABEL_VAL_INCR)
\#define	T_PC		_CONST(T_LABEL + LABEL_PC)
\#define	T_SP		_CONST(T_LABEL + LABEL_SP)

_klwp
	lwp_thread
	lwp_procp
	lwp_brand
	lwp_brand_syscall
	lwp_eosys
	lwp_regs
	lwp_arg
	lwp_ap
	lwp_cursig
	lwp_state
	lwp_mstate.ms_acct	LWP_MS_ACCT
	lwp_mstate.ms_prev	LWP_MS_PREV
	lwp_mstate.ms_start	LWP_MS_START
	lwp_mstate.ms_state_start LWP_MS_STATE_START
	lwp_pcb
	lwp_ru.sysc		LWP_RU_SYSC

\#define	LWP_ACCT_USER	_CONST(LWP_MS_ACCT + _MUL(LMS_USER, LWP_MS_ACCT_INCR))
\#define	LWP_ACCT_SYSTEM	_CONST(LWP_MS_ACCT + _MUL(LMS_SYSTEM, LWP_MS_ACCT_INCR))

fpu_ctx
	fpu_regs		FPU_CTX_FPU_REGS
	fpu_flags		FPU_CTX_FPU_FLAGS
	fpu_xsave_mask		FPU_CTX_FPU_XSAVE_MASK

fxsave_state	FXSAVE_STATE_SIZE
	fx_fsw			FXSAVE_STATE_FSW
	fx_mxcsr_mask		FXSAVE_STATE_MXCSR_MASK


autovec		AUTOVECSIZE
	av_vector
	av_intarg1
	av_intarg2
	av_ticksp
	av_link
	av_prilevel
	av_dip

av_head
	avh_link
	avh_hi_pri
	avh_lo_pri

cpu
	cpu_id
	cpu_flags
	cpu_self
	cpu_thread
	cpu_thread_lock
	cpu_kprunrun
	cpu_lwp
	cpu_fpowner
	cpu_idle_thread
	cpu_intr_thread
	cpu_intr_actv
	cpu_base_spl
	cpu_intr_stack
	cpu_stats.sys.cpumigrate	CPU_STATS_SYS_CPUMIGRATE
	cpu_stats.sys.intr		CPU_STATS_SYS_INTR
	cpu_stats.sys.intrblk		CPU_STATS_SYS_INTRBLK
	cpu_stats.sys.syscall		CPU_STATS_SYS_SYSCALL
	cpu_profile_pc
	cpu_profile_upc
	cpu_profile_pil
	cpu_ftrace.ftd_state		CPU_FTRACE_STATE
	cpu_mstate
	cpu_intracct

\#define	CPU_INTR_ACTV_REF	_CONST(CPU_INTR_ACTV + 2)

cpu
	cpu_m.pil_high_start	CPU_PIL_HIGH_START
	cpu_m.intrstat		CPU_INTRSTAT
	cpu_m.mcpu_current_hat	CPU_CURRENT_HAT
	cpu_m.mcpu_gdt		CPU_GDT
	cpu_m.mcpu_idt		CPU_IDT
	cpu_m.mcpu_tss		CPU_TSS
	cpu_m.mcpu_softinfo	CPU_SOFTINFO
	cpu_m.mcpu_pri		CPU_PRI
#if defined(__xpv)
	cpu_m.mcpu_vcpu_info	CPU_VCPU_INFO
#endif

cpu
	cpu_m.mcpu_kpti.kf_kernel_cr3	CPU_KPTI_KCR3
	cpu_m.mcpu_kpti.kf_user_cr3	CPU_KPTI_UCR3
	cpu_m.mcpu_kpti.kf_tr_rsp	CPU_KPTI_TR_RSP
	cpu_m.mcpu_kpti.kf_tr_cr3	CPU_KPTI_TR_CR3
	cpu_m.mcpu_kpti.kf_r13		CPU_KPTI_R13
	cpu_m.mcpu_kpti.kf_r14		CPU_KPTI_R14
	cpu_m.mcpu_kpti.kf_tr_ret_rsp	CPU_KPTI_RET_RSP

	cpu_m.mcpu_kpti.kf_ss		CPU_KPTI_SS
	cpu_m.mcpu_kpti.kf_rsp		CPU_KPTI_RSP
	cpu_m.mcpu_kpti.kf_rflags	CPU_KPTI_RFLAGS
	cpu_m.mcpu_kpti.kf_cs		CPU_KPTI_CS
	cpu_m.mcpu_kpti.kf_rip		CPU_KPTI_RIP
	cpu_m.mcpu_kpti.kf_err		CPU_KPTI_ERR

	cpu_m.mcpu_pad2			CPU_KPTI_START
	cpu_m.mcpu_pad3			CPU_KPTI_END

	cpu_m.mcpu_kpti_dbg		CPU_KPTI_DBG

kpti_frame
	kf_r14		KPTI_R14
	kf_r13		KPTI_R13
	kf_err		KPTI_ERR
	kf_rip		KPTI_RIP
	kf_cs		KPTI_CS
	kf_rflags	KPTI_RFLAGS
	kf_rsp		KPTI_RSP
	kf_ss		KPTI_SS

	kf_tr_rsp	KPTI_TOP

	kf_kernel_cr3	KPTI_KCR3
	kf_user_cr3	KPTI_UCR3
	kf_tr_ret_rsp	KPTI_RET_RSP
	kf_tr_cr3	KPTI_TR_CR3

	kf_tr_flag	KPTI_FLAG

standard_pic
	c_curmask
	c_iplmask

ddi_dma_impl
	dmai_rflags
	dmai_rdip

dev_info
	devi_ops		DEVI_DEV_OPS
	devi_bus_ctl
	devi_bus_dma_ctl
	devi_bus_dma_allochdl
	devi_bus_dma_freehdl
	devi_bus_dma_bindhdl
	devi_bus_dma_unbindhdl
	devi_bus_dma_flush
	devi_bus_dma_win

dev_ops
	devo_bus_ops		DEVI_BUS_OPS

bus_ops
	bus_ctl			OPS_CTL
	bus_dma_map		OPS_MAP
	bus_dma_ctl		OPS_MCTL
	bus_dma_allochdl	OPS_ALLOCHDL
	bus_dma_freehdl		OPS_FREEHDL
	bus_dma_bindhdl		OPS_BINDHDL
	bus_dma_unbindhdl	OPS_UNBINDHDL
	bus_dma_flush		OPS_FLUSH
	bus_dma_win		OPS_WIN

sysent	SYSENT_SIZE	SYSENT_SIZE_SHIFT
	sy_callc
	sy_flags
	sy_narg

stdata
	sd_lock

queue
	q_flag
	q_next
	q_stream
	q_syncq
	q_qinfo

qinit
	qi_putp

syncq
	sq_flags
	sq_count
	sq_lock
	sq_wait

rm_platter
	rm_idt_lim		IDTROFF
	rm_gdt_lim		GDTROFF
	rm_pdbr			CR3OFF
	rm_cpu			CPUNOFF
	rm_cr4			CR4OFF
	rm_cpu_halt_code	CPUHALTCODEOFF
	rm_cpu_halted		CPUHALTEDOFF

ddi_acc_impl
	ahi_acc_attr	ACC_ATTR
	ahi_get8	ACC_GETB
	ahi_get16	ACC_GETW
	ahi_get32	ACC_GETL
	ahi_get64	ACC_GETLL
	ahi_put8	ACC_PUTB
	ahi_put16	ACC_PUTW
	ahi_put32	ACC_PUTL
	ahi_put64	ACC_PUTLL
	ahi_rep_get8	ACC_REP_GETB
	ahi_rep_get16	ACC_REP_GETW
	ahi_rep_get32	ACC_REP_GETL
	ahi_rep_get64	ACC_REP_GETLL
	ahi_rep_put8	ACC_REP_PUTB
	ahi_rep_put16	ACC_REP_PUTW
	ahi_rep_put32	ACC_REP_PUTL
	ahi_rep_put64	ACC_REP_PUTLL

on_trap_data
	ot_prot
	ot_trap
	ot_trampoline
	ot_jmpbuf
	ot_prev
	ot_handle
	ot_pad1

trap_trace_ctl_t	__TRAPTR_SIZE TRAPTR_SIZE_SHIFT
	ttc_next	TRAPTR_NEXT
	ttc_first	TRAPTR_FIRST
	ttc_limit	TRAPTR_LIMIT

trap_trace_rec_t	TRAP_ENT_SIZE
	ttr_cr2
	ttr_info.idt_entry.vector	TTR_VECTOR
	ttr_info.idt_entry.ipl		TTR_IPL
	ttr_info.idt_entry.spl		TTR_SPL
	ttr_info.idt_entry.pri		TTR_PRI
	ttr_info.gate_entry.sysnum	TTR_SYSNUM
	ttr_marker
	ttr_stamp
	ttr_curthread
	ttr_sdepth
	ttr_stack

lgrp_ld
	lpl_lgrpid

dtrace_id_t	DTRACE_IDSIZE

cpu_core	CPU_CORE_SIZE	CPU_CORE_SHIFT
	cpuc_dtrace_flags
	cpuc_dtrace_illval

timespec	TIMESPEC_SIZE

gate_desc	GATE_DESC_SIZE

desctbr_t	DESCTBR_SIZE
	dtr_limit
	dtr_base

mod_stub_info	MODS_SIZE
	mods_func_adr	MODS_INSTFCN
	mods_errfcn	MODS_RETFCN
	mods_flag

\#define	TRAP_TSIZE		_MUL(TRAP_ENT_SIZE, TRAPTR_NENT)

copyops
	cp_copyin
	cp_xcopyin
	cp_copyout
	cp_xcopyout
	cp_copyinstr
	cp_copyoutstr
	cp_fuword8
	cp_fuword16
	cp_fuword32
	cp_fuword64
	cp_suword8
	cp_suword16
	cp_suword32
	cp_suword64
	cp_physio

brand
	b_machops

brand_proc_data_t
	spd_handler

fastboot_file_t
	fb_va
	fb_pte_list_va
	fb_pte_list_pa
	fb_dest_pa
	fb_size
	fb_next_pa
	fb_sections
	fb_sectcnt

fastboot_section_t
	fb_sec_offset
	fb_sec_paddr
	fb_sec_size
	fb_sec_bss_size

fastboot_info_t
	fi_files
	fi_has_pae
	fi_pagetable_va
	fi_pagetable_pa
	fi_last_table_pa
	fi_new_mbi_pa
	fi_valid

zone
	zone_brand_data

wc_cpu	WC_CPU_SIZE
	wc_retaddr
	wc_virtaddr
	wc_cr0
	wc_cr3
	wc_cr4
	wc_cr8
	wc_fs
	wc_fsbase
	wc_gs
	wc_gsbase
	wc_kgsbase
	wc_r8
	wc_r9
	wc_r10
	wc_r11
	wc_r12
	wc_r13
	wc_r14
	wc_r15
	wc_rax
	wc_rbp
	wc_rbx
	wc_rcx
	wc_rdi
	wc_rdx
	wc_rsi
	wc_rsp
	wc_gdt_limit	WC_GDT
	wc_gdt_base
	wc_idt_limit	WC_IDT
	wc_idt_base
	wc_tr
	wc_ldt
	wc_eflags
	wc_ebx
	wc_edi
	wc_esi
	wc_ebp
	wc_esp
	wc_esp
	wc_ss
	wc_cs
	wc_ds
	wc_es
	wc_cpu_id
	wc_saved_stack

wc_wakecode
	wc_cpu

comm_page_s	COMM_PAGE_S_SIZE