xref: /illumos-gate/usr/src/uts/intel/amd64/sys/privmregs.h (revision 843e19887f64dde75055cf8842fc4db2171eff45)
170025d76Sjohnny /*
270025d76Sjohnny  * CDDL HEADER START
370025d76Sjohnny  *
470025d76Sjohnny  * The contents of this file are subject to the terms of the
5337fc9e2Sanish  * Common Development and Distribution License (the "License").
6337fc9e2Sanish  * You may not use this file except in compliance with the License.
770025d76Sjohnny  *
870025d76Sjohnny  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
970025d76Sjohnny  * or http://www.opensolaris.org/os/licensing.
1070025d76Sjohnny  * See the License for the specific language governing permissions
1170025d76Sjohnny  * and limitations under the License.
1270025d76Sjohnny  *
1370025d76Sjohnny  * When distributing Covered Code, include this CDDL HEADER in each
1470025d76Sjohnny  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1570025d76Sjohnny  * If applicable, add the following below this CDDL HEADER, with the
1670025d76Sjohnny  * fields enclosed by brackets "[]" replaced with your own identifying
1770025d76Sjohnny  * information: Portions Copyright [yyyy] [name of copyright owner]
1870025d76Sjohnny  *
1970025d76Sjohnny  * CDDL HEADER END
2070025d76Sjohnny  */
21*843e1988Sjohnlev 
2270025d76Sjohnny /*
23ae115bc7Smrj  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2470025d76Sjohnny  * Use is subject to license terms.
2570025d76Sjohnny  */
2670025d76Sjohnny 
27*843e1988Sjohnlev #ifndef	_AMD64_SYS_PRIVMREGS_H
28*843e1988Sjohnlev #define	_AMD64_SYS_PRIVMREGS_H
2970025d76Sjohnny 
3070025d76Sjohnny #pragma ident	"%Z%%M%	%I%	%E% SMI"
3170025d76Sjohnny 
32ae115bc7Smrj #ifdef __cplusplus
33ae115bc7Smrj extern "C" {
34ae115bc7Smrj #endif
3570025d76Sjohnny 
36*843e1988Sjohnlev #if !defined(__amd64)
37*843e1988Sjohnlev #error	"non-amd64 code depends on amd64 privileged header!"
38*843e1988Sjohnlev #endif
39*843e1988Sjohnlev 
40*843e1988Sjohnlev #ifndef _ASM
41*843e1988Sjohnlev 
42*843e1988Sjohnlev #define	PM_GREGS (1 << 0)
43*843e1988Sjohnlev #define	PM_CRREGS (1 << 1)
44*843e1988Sjohnlev #define	PM_DRREGS (1 << 2)
45*843e1988Sjohnlev 
46*843e1988Sjohnlev /*
47*843e1988Sjohnlev  * This structure is intended to represent a complete machine state for a CPU,
48*843e1988Sjohnlev  * when that information is available.  It is only for use internally between
49*843e1988Sjohnlev  * KMDB and the kernel, or within MDB.  Note that this isn't yet finished.
50*843e1988Sjohnlev  */
51*843e1988Sjohnlev typedef struct privmregs {
52*843e1988Sjohnlev 	ulong_t pm_flags;
53*843e1988Sjohnlev 	/* general registers */
54*843e1988Sjohnlev 	struct regs pm_gregs;
55*843e1988Sjohnlev 	/* cr0-8 */
56*843e1988Sjohnlev 	ulong_t pm_cr[8];
57*843e1988Sjohnlev 	/* dr0-8 */
58*843e1988Sjohnlev 	ulong_t pm_dr[8];
59*843e1988Sjohnlev } privmregs_t;
60*843e1988Sjohnlev 
61*843e1988Sjohnlev #endif /* !_ASM */
6270025d76Sjohnny 
63ae115bc7Smrj #ifdef __cplusplus
6470025d76Sjohnny }
6570025d76Sjohnny #endif
6670025d76Sjohnny 
67*843e1988Sjohnlev #endif	/* !_AMD64_SYS_PRIVMREGS_H */
68