xref: /titanic_41/usr/src/uts/i86pc/ml/mach_offsets.in (revision d29b2c4438482eb00488be49a1f5d6835f455546)
1\
2\ Copyright 2005 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#if defined(__xpv)
38\
39\ XXPV	This seems to need to be first to avoid a namespace collision
40\	with another header file in the list below.
41\
42#include <sys/hypervisor.h>
43#endif
44
45#include <sys/types.h>
46#include <sys/bootsvcs.h>
47#include <sys/systm.h>
48#include <sys/sysinfo.h>
49#include <sys/user.h>
50#include <sys/thread.h>
51#include <sys/proc.h>
52#include <sys/cpuvar.h>
53#include <sys/tss.h>
54#include <sys/privregs.h>
55#include <sys/segments.h>
56#include <sys/devops.h>
57#include <sys/ddi_impldefs.h>
58#include <vm/as.h>
59#include <sys/avintr.h>
60#include <sys/pic.h>
61#include <sys/rm_platter.h>
62#include <sys/stream.h>
63#include <sys/strsubr.h>
64#include <sys/sunddi.h>
65#include <sys/traptrace.h>
66#include <sys/ontrap.h>
67#include <sys/lgrp.h>
68#include <sys/dtrace.h>
69
70regs	REGSIZE
71	r_savfp	REGOFF_SAVFP
72	r_savpc	REGOFF_SAVPC
73	r_gs	REGOFF_GS
74	r_fs	REGOFF_FS
75	r_es	REGOFF_ES
76	r_ds	REGOFF_DS
77	r_edi	REGOFF_EDI
78	r_esi	REGOFF_ESI
79	r_ebp	REGOFF_EBP
80	r_esp	REGOFF_ESP
81	r_ebx	REGOFF_EBX
82	r_edx	REGOFF_EDX
83	r_ecx	REGOFF_ECX
84	r_eax	REGOFF_EAX
85	r_trapno	REGOFF_TRAPNO
86	r_err	REGOFF_ERR
87	r_eip	REGOFF_EIP
88	r_cs	REGOFF_CS
89	r_efl	REGOFF_EFL
90	r_uesp	REGOFF_UESP
91	r_ss	REGOFF_SS
92
93\#define	REGOFF_PC	REGOFF_EIP
94
95tss
96	tss_esp0		TSS_ESP0
97	tss_ss0		TSS_SS0
98	tss_ldt		TSS_LDT
99	tss_cr3		TSS_CR3
100	tss_cs		TSS_CS
101	tss_ss		TSS_SS
102	tss_ds		TSS_DS
103	tss_es		TSS_ES
104	tss_fs		TSS_FS
105	tss_gs		TSS_GS
106	tss_ebp		TSS_EBP
107	tss_eip		TSS_EIP
108	tss_eflags	TSS_EFL
109	tss_esp		TSS_ESP
110	tss_eax		TSS_EAX
111	tss_ebx		TSS_EBX
112	tss_ecx		TSS_ECX
113	tss_edx		TSS_EDX
114	tss_esi		TSS_ESI
115	tss_edi		TSS_EDI
116
117\#define	LABEL_EBP	_CONST(_MUL(2, LABEL_VAL_INCR) + LABEL_VAL)
118\#define	LABEL_EBX	_CONST(_MUL(3, LABEL_VAL_INCR) + LABEL_VAL)
119\#define	LABEL_ESI	_CONST(_MUL(4, LABEL_VAL_INCR) + LABEL_VAL)
120\#define	LABEL_EDI	_CONST(_MUL(5, LABEL_VAL_INCR) + LABEL_VAL)
121\#define	T_EBP		_CONST(T_LABEL + LABEL_EBP)
122\#define	T_EBX		_CONST(T_LABEL + LABEL_EBX)
123\#define	T_ESI		_CONST(T_LABEL + LABEL_ESI)
124\#define	T_EDI		_CONST(T_LABEL + LABEL_EDI)
125
126_klwp
127	lwp_pcb.pcb_fsdesc			LWP_PCB_FSDESC
128	lwp_pcb.pcb_gsdesc			LWP_PCB_GSDESC
129	lwp_pcb.pcb_drstat			LWP_PCB_DRSTAT
130	lwp_pcb.pcb_flags			PCB_FLAGS
131	lwp_pcb.pcb_fpu				LWP_PCB_FPU
132	lwp_pcb.pcb_fpu.fpu_regs		LWP_FPU_REGS
133	lwp_pcb.pcb_fpu.fpu_flags		LWP_FPU_FLAGS
134	lwp_pcb.pcb_fpu.fpu_regs.kfpu_u.kfpu_fx	LWP_FPU_CHIP_STATE
135
136pcb	PCBSIZE
137	pcb_drstat
138	pcb_fsdesc
139	pcb_gsdesc
140	pcb_fpu.fpu_regs	PCB_FPU_REGS
141	pcb_fpu.fpu_flags	PCB_FPU_FLAGS
142
143#if defined(__xpv)
144
145vcpu_info
146	evtchn_upcall_pending	VCPU_INFO_EVTCHN_UPCALL_PENDING
147	evtchn_upcall_mask	VCPU_INFO_EVTCHN_UPCALL_MASK
148	arch.cr2		VCPU_INFO_ARCH_CR2
149
150#endif	/* __xpv */
151