xref: /illumos-gate/usr/src/uts/intel/ia32/sys/privmregs.h (revision 2d6eb4a5)
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 
27*3afb2a2aSJohn Levon #ifndef	_IA32_SYS_PRIVMREGS_H
28*3afb2a2aSJohn Levon #define	_IA32_SYS_PRIVMREGS_H
29*3afb2a2aSJohn Levon 
30*3afb2a2aSJohn Levon #ifdef __cplusplus
31*3afb2a2aSJohn Levon extern "C" {
32*3afb2a2aSJohn Levon #endif
33*3afb2a2aSJohn Levon 
34*3afb2a2aSJohn Levon #if !defined(__i386)
35*3afb2a2aSJohn Levon #error	"non-i386 code depends on i386 privileged header!"
36*3afb2a2aSJohn Levon #endif
37*3afb2a2aSJohn Levon 
38*3afb2a2aSJohn Levon #ifndef _ASM
39*3afb2a2aSJohn Levon 
40*3afb2a2aSJohn Levon #define	PM_GREGS (1 << 0)
41*3afb2a2aSJohn Levon #define	PM_CRREGS (1 << 1)
42*3afb2a2aSJohn Levon #define	PM_DRREGS (1 << 2)
43*3afb2a2aSJohn Levon 
44*3afb2a2aSJohn Levon /*
45*3afb2a2aSJohn Levon  * This structure is intended to represent a complete machine state for a CPU,
46*3afb2a2aSJohn Levon  * when that information is available.  It is only for use internally between
47*3afb2a2aSJohn Levon  * KMDB and the kernel, or within MDB.  Note that this isn't yet finished.
48*3afb2a2aSJohn Levon  */
49*3afb2a2aSJohn Levon typedef struct privmregs {
50*3afb2a2aSJohn Levon 	ulong_t pm_flags;
51*3afb2a2aSJohn Levon 	/* general registers */
52*3afb2a2aSJohn Levon 	struct regs pm_gregs;
53*3afb2a2aSJohn Levon 	/* cr0-8 */
54*3afb2a2aSJohn Levon 	ulong_t pm_cr[8];
55*3afb2a2aSJohn Levon 	/* dr0-8 */
56*3afb2a2aSJohn Levon 	ulong_t pm_dr[8];
57*3afb2a2aSJohn Levon } privmregs_t;
58*3afb2a2aSJohn Levon 
59*3afb2a2aSJohn Levon #endif /* !_ASM */
60*3afb2a2aSJohn Levon 
61*3afb2a2aSJohn Levon #ifdef __cplusplus
62*3afb2a2aSJohn Levon }
63*3afb2a2aSJohn Levon #endif
64*3afb2a2aSJohn Levon 
65*3afb2a2aSJohn Levon #endif	/* !_IA32_SYS_PRIVMREGS_H */
66