xref: /illumos-gate/usr/src/uts/intel/ia32/sys/kdi_regs.h (revision 3afb2a2a)
1*3afb2a2aSJohn Levon /*
2*3afb2a2aSJohn Levon  * CDDL HEADER START
3*3afb2a2aSJohn Levon  *
4*3afb2a2aSJohn Levon  * The contents of this file are subject to the terms of the
5*3afb2a2aSJohn Levon  * Common Development and Distribution License (the "License").
6*3afb2a2aSJohn Levon  * You may not use this file except in compliance with the License.
7*3afb2a2aSJohn Levon  *
8*3afb2a2aSJohn Levon  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*3afb2a2aSJohn Levon  * or http://www.opensolaris.org/os/licensing.
10*3afb2a2aSJohn Levon  * See the License for the specific language governing permissions
11*3afb2a2aSJohn Levon  * and limitations under the License.
12*3afb2a2aSJohn Levon  *
13*3afb2a2aSJohn Levon  * When distributing Covered Code, include this CDDL HEADER in each
14*3afb2a2aSJohn Levon  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*3afb2a2aSJohn Levon  * If applicable, add the following below this CDDL HEADER, with the
16*3afb2a2aSJohn Levon  * fields enclosed by brackets "[]" replaced with your own identifying
17*3afb2a2aSJohn Levon  * information: Portions Copyright [yyyy] [name of copyright owner]
18*3afb2a2aSJohn Levon  *
19*3afb2a2aSJohn Levon  * CDDL HEADER END
20*3afb2a2aSJohn Levon  */
21*3afb2a2aSJohn Levon 
22*3afb2a2aSJohn Levon /*
23*3afb2a2aSJohn Levon  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
24*3afb2a2aSJohn Levon  * Use is subject to license terms.
25*3afb2a2aSJohn Levon  *
26*3afb2a2aSJohn Levon  * Copyright 2018 Joyent, Inc.
27*3afb2a2aSJohn Levon  */
28*3afb2a2aSJohn Levon 
29*3afb2a2aSJohn Levon #ifndef _IA32_SYS_KDI_REGS_H
30*3afb2a2aSJohn Levon #define	_IA32_SYS_KDI_REGS_H
31*3afb2a2aSJohn Levon 
32*3afb2a2aSJohn Levon #ifdef __cplusplus
33*3afb2a2aSJohn Levon extern "C" {
34*3afb2a2aSJohn Levon #endif
35*3afb2a2aSJohn Levon 
36*3afb2a2aSJohn Levon #define	KDIREG_NGREG	21
37*3afb2a2aSJohn Levon 
38*3afb2a2aSJohn Levon /*
39*3afb2a2aSJohn Levon  * %ss appears in a different place than a typical struct regs, since the
40*3afb2a2aSJohn Levon  * machine won't save %ss on a trap entry from the same privilege level.
41*3afb2a2aSJohn Levon  */
42*3afb2a2aSJohn Levon 
43*3afb2a2aSJohn Levon #define	KDIREG_SAVFP	0
44*3afb2a2aSJohn Levon #define	KDIREG_SAVPC	1
45*3afb2a2aSJohn Levon #define	KDIREG_SS	2
46*3afb2a2aSJohn Levon #define	KDIREG_GS	3
47*3afb2a2aSJohn Levon #define	KDIREG_FS	4
48*3afb2a2aSJohn Levon #define	KDIREG_ES	5
49*3afb2a2aSJohn Levon #define	KDIREG_DS	6
50*3afb2a2aSJohn Levon #define	KDIREG_EDI	7
51*3afb2a2aSJohn Levon #define	KDIREG_ESI	8
52*3afb2a2aSJohn Levon #define	KDIREG_EBP	9
53*3afb2a2aSJohn Levon #define	KDIREG_ESP	10
54*3afb2a2aSJohn Levon #define	KDIREG_EBX	11
55*3afb2a2aSJohn Levon #define	KDIREG_EDX	12
56*3afb2a2aSJohn Levon #define	KDIREG_ECX	13
57*3afb2a2aSJohn Levon #define	KDIREG_EAX	14
58*3afb2a2aSJohn Levon #define	KDIREG_TRAPNO	15
59*3afb2a2aSJohn Levon #define	KDIREG_ERR	16
60*3afb2a2aSJohn Levon #define	KDIREG_EIP	17
61*3afb2a2aSJohn Levon #define	KDIREG_CS	18
62*3afb2a2aSJohn Levon #define	KDIREG_EFLAGS	19
63*3afb2a2aSJohn Levon #define	KDIREG_UESP	20
64*3afb2a2aSJohn Levon 
65*3afb2a2aSJohn Levon #define	KDIREG_PC	KDIREG_EIP
66*3afb2a2aSJohn Levon #define	KDIREG_SP	KDIREG_ESP
67*3afb2a2aSJohn Levon #define	KDIREG_FP	KDIREG_EBP
68*3afb2a2aSJohn Levon 
69*3afb2a2aSJohn Levon #ifdef __cplusplus
70*3afb2a2aSJohn Levon }
71*3afb2a2aSJohn Levon #endif
72*3afb2a2aSJohn Levon 
73*3afb2a2aSJohn Levon #endif /* _IA32_SYS_KDI_REGS_H */