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