xref: /titanic_50/usr/src/uts/intel/amd64/ml/mach_offsets.in (revision e07d9cb85217949d497b02d7211de8a197d2f2eb)
1\
2\ Copyright 2007 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#pragma ident	"%Z%%M%	%I%	%E% SMI"
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/traptrace.h>
58#include <sys/ontrap.h>
59#include <sys/lgrp.h>
60#include <sys/dtrace.h>
61
62regs	REGSIZE
63	r_savfp	REGOFF_SAVFP
64	r_savpc	REGOFF_SAVPC
65	r_rdi	REGOFF_RDI
66	r_rsi	REGOFF_RSI
67	r_rdx	REGOFF_RDX
68	r_rcx	REGOFF_RCX
69	r_r8	REGOFF_R8
70	r_r9	REGOFF_R9
71	r_rax	REGOFF_RAX
72	r_rbx	REGOFF_RBX
73	r_rbp	REGOFF_RBP
74	r_r10	REGOFF_R10
75	r_r11	REGOFF_R11
76	r_r12	REGOFF_R12
77	r_r13	REGOFF_R13
78	r_r14	REGOFF_R14
79	r_r15	REGOFF_R15
80\#if DEBUG
81	__r_fsbase	REGOFF_FSBASE
82	__r_gsbase	REGOFF_GSBASE
83\#endif
84	r_ds	REGOFF_DS
85	r_es	REGOFF_ES
86	r_fs	REGOFF_FS
87	r_gs	REGOFF_GS
88	r_trapno	REGOFF_TRAPNO
89	r_err	REGOFF_ERR
90	r_rip	REGOFF_RIP
91	r_cs	REGOFF_CS
92	r_rfl	REGOFF_RFL
93	r_rsp	REGOFF_RSP
94	r_ss	REGOFF_SS
95
96\#define	REGOFF_PC	REGOFF_RIP
97
98boot_syscalls
99	bsvc_putchar	BOOTSVCS_PUTCHAR
100
101tss
102	tss_rsp0
103	tss_rsp1
104	tss_rsp2
105	tss_ist1
106	tss_ist2
107	tss_ist3
108	tss_ist4
109	tss_ist5
110	tss_ist6
111	tss_ist7
112
113\#define	LABEL_RBP	_CONST(_MUL(2, LABEL_VAL_INCR) + LABEL_VAL)
114\#define	LABEL_RBX	_CONST(_MUL(3, LABEL_VAL_INCR) + LABEL_VAL)
115\#define	LABEL_R12	_CONST(_MUL(4, LABEL_VAL_INCR) + LABEL_VAL)
116\#define	LABEL_R13	_CONST(_MUL(5, LABEL_VAL_INCR) + LABEL_VAL)
117\#define	LABEL_R14	_CONST(_MUL(6, LABEL_VAL_INCR) + LABEL_VAL)
118\#define	LABEL_R15	_CONST(_MUL(7, LABEL_VAL_INCR) + LABEL_VAL)
119\#define	T_RBP		_CONST(T_LABEL + LABEL_RBP)
120\#define	T_RBX		_CONST(T_LABEL + LABEL_RBX)
121\#define	T_R12		_CONST(T_LABEL + LABEL_R12)
122\#define	T_R13		_CONST(T_LABEL + LABEL_R13)
123\#define	T_R14		_CONST(T_LABEL + LABEL_R14)
124\#define	T_R15		_CONST(T_LABEL + LABEL_R15)
125
126_klwp
127	lwp_pcb.pcb_fpu		LWP_PCB_FPU
128	lwp_pcb.pcb_fsbase	LWP_PCB_FSBASE
129	lwp_pcb.pcb_gsbase	LWP_PCB_GSBASE
130	lwp_pcb.pcb_ds		LWP_PCB_DS
131	lwp_pcb.pcb_es		LWP_PCB_ES
132	lwp_pcb.pcb_fs		LWP_PCB_FS
133	lwp_pcb.pcb_gs		LWP_PCB_GS
134	lwp_pcb.pcb_drstat	LWP_PCB_DRSTAT
135	lwp_pcb.pcb_flags	PCB_FLAGS
136	lwp_pcb.pcb_fpu.fpu_regs LWP_FPU_REGS
137	lwp_pcb.pcb_fpu.fpu_flags LWP_FPU_FLAGS
138	lwp_pcb.pcb_rupdate	PCB_RUPDATE
139
140pcb	PCBSIZE
141	pcb_drstat
142	pcb_fsbase
143	pcb_gsbase
144	pcb_ds
145	pcb_es
146	pcb_fs
147	pcb_gs
148	pcb_fpu.fpu_regs	PCB_FPU_REGS
149	pcb_fpu.fpu_flags	PCB_FPU_FLAGS
150
151cpu
152	cpu_m.mcpu_rtmp_rsp	CPU_RTMP_RSP
153	cpu_m.mcpu_rtmp_r15	CPU_RTMP_R15
154
155rm_platter
156	rm_temp_gdt_lim		TEMPGDTOFF
157	rm_temp_idt_lim		TEMPIDTOFF
158	rm_longmode64_addr	LM64OFF
159