summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/amd64/ml/mach_offsets.in
blob: 24a85a587160e7894bb65d7a21afbcf9644d637b (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
\
\ Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
\ Use is subject to license terms.
\
\ 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
\
\ Copyright 2011 Joyent, Inc. All rights reserved.
\

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

#ifndef	_GENASSYM
#define	_GENASSYM
#endif

#define	SIZES	1


\
\ XXPV	This seems to be needed to avoid a namespace collisions with
\	some other header file in the list below.
\

#if defined(__xpv)
#include <sys/hypervisor.h>
#endif

#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/traptrace.h>
#include <sys/ontrap.h>
#include <sys/lgrp.h>
#include <sys/dtrace.h>

regs	REGSIZE
	r_savfp	REGOFF_SAVFP
	r_savpc	REGOFF_SAVPC
	r_rdi	REGOFF_RDI
	r_rsi	REGOFF_RSI
	r_rdx	REGOFF_RDX
	r_rcx	REGOFF_RCX
	r_r8	REGOFF_R8
	r_r9	REGOFF_R9
	r_rax	REGOFF_RAX
	r_rbx	REGOFF_RBX
	r_rbp	REGOFF_RBP
	r_r10	REGOFF_R10
	r_r11	REGOFF_R11
	r_r12	REGOFF_R12
	r_r13	REGOFF_R13
	r_r14	REGOFF_R14
	r_r15	REGOFF_R15
\#if DEBUG
	__r_fsbase	REGOFF_FSBASE
	__r_gsbase	REGOFF_GSBASE
\#endif
	r_ds	REGOFF_DS
	r_es	REGOFF_ES
	r_fs	REGOFF_FS
	r_gs	REGOFF_GS
	r_trapno	REGOFF_TRAPNO
	r_err	REGOFF_ERR
	r_rip	REGOFF_RIP
	r_cs	REGOFF_CS
	r_rfl	REGOFF_RFL
	r_rsp	REGOFF_RSP
	r_ss	REGOFF_SS

\#define	REGOFF_PC	REGOFF_RIP

boot_syscalls
	bsvc_putchar	BOOTSVCS_PUTCHAR

tss_t
	tss_rsp0
	tss_rsp1
	tss_rsp2
	tss_ist1
	tss_ist2
	tss_ist3
	tss_ist4
	tss_ist5
	tss_ist6
	tss_ist7

\#define	LABEL_RBP	_CONST(_MUL(2, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_RBX	_CONST(_MUL(3, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_R12	_CONST(_MUL(4, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_R13	_CONST(_MUL(5, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_R14	_CONST(_MUL(6, LABEL_VAL_INCR) + LABEL_VAL)
\#define	LABEL_R15	_CONST(_MUL(7, LABEL_VAL_INCR) + LABEL_VAL)
\#define	T_RBP		_CONST(T_LABEL + LABEL_RBP)
\#define	T_RBX		_CONST(T_LABEL + LABEL_RBX)
\#define	T_R12		_CONST(T_LABEL + LABEL_R12)
\#define	T_R13		_CONST(T_LABEL + LABEL_R13)
\#define	T_R14		_CONST(T_LABEL + LABEL_R14)
\#define	T_R15		_CONST(T_LABEL + LABEL_R15)

_klwp
	lwp_pcb.pcb_fpu		LWP_PCB_FPU
	lwp_pcb.pcb_fsbase	LWP_PCB_FSBASE
	lwp_pcb.pcb_gsbase	LWP_PCB_GSBASE
	lwp_pcb.pcb_ds		LWP_PCB_DS
	lwp_pcb.pcb_es		LWP_PCB_ES
	lwp_pcb.pcb_fs		LWP_PCB_FS
	lwp_pcb.pcb_gs		LWP_PCB_GS
	lwp_pcb.pcb_drstat	LWP_PCB_DRSTAT
	lwp_pcb.pcb_flags	PCB_FLAGS
	lwp_pcb.pcb_fpu.fpu_regs LWP_FPU_REGS
	lwp_pcb.pcb_fpu.fpu_flags LWP_FPU_FLAGS
	lwp_pcb.pcb_rupdate	PCB_RUPDATE

pcb	PCBSIZE
	pcb_drstat
	pcb_fsbase
	pcb_gsbase
	pcb_ds
	pcb_es
	pcb_fs
	pcb_gs
	pcb_fpu.fpu_regs	PCB_FPU_REGS
	pcb_fpu.fpu_flags	PCB_FPU_FLAGS

cpu
	cpu_m.mcpu_rtmp_rsp	CPU_RTMP_RSP
	cpu_m.mcpu_rtmp_r15	CPU_RTMP_R15

rm_platter
	rm_temp_gdt_lim		TEMPGDTOFF
	rm_temp_idt_lim		TEMPIDTOFF
	rm_longmode64_addr	LM64OFF

#if defined(__xpv)

vcpu_info
	evtchn_upcall_pending	VCPU_INFO_EVTCHN_UPCALL_PENDING
	evtchn_upcall_mask	VCPU_INFO_EVTCHN_UPCALL_MASK
	arch.cr2		VCPU_INFO_ARCH_CR2

#endif	/* __xpv */