170025d7johnny/*
270025d7johnny * CDDL HEADER START
370025d7johnny *
470025d7johnny * The contents of this file are subject to the terms of the
5337fc9eanish * Common Development and Distribution License (the "License").
6337fc9eanish * You may not use this file except in compliance with the License.
770025d7johnny *
870025d7johnny * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
970025d7johnny * or http://www.opensolaris.org/os/licensing.
1070025d7johnny * See the License for the specific language governing permissions
1170025d7johnny * and limitations under the License.
1270025d7johnny *
1370025d7johnny * When distributing Covered Code, include this CDDL HEADER in each
1470025d7johnny * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1570025d7johnny * If applicable, add the following below this CDDL HEADER, with the
1670025d7johnny * fields enclosed by brackets "[]" replaced with your own identifying
1770025d7johnny * information: Portions Copyright [yyyy] [name of copyright owner]
1870025d7johnny *
1970025d7johnny * CDDL HEADER END
2070025d7johnny */
21843e198johnlev
2270025d7johnny/*
23ae115bcmrj * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2470025d7johnny * Use is subject to license terms.
2570025d7johnny */
2670025d7johnny
27843e198johnlev#ifndef	_AMD64_SYS_PRIVMREGS_H
28843e198johnlev#define	_AMD64_SYS_PRIVMREGS_H
2970025d7johnny
3070025d7johnny#pragma ident	"%Z%%M%	%I%	%E% SMI"
3170025d7johnny
32ae115bcmrj#ifdef __cplusplus
33ae115bcmrjextern "C" {
34ae115bcmrj#endif
3570025d7johnny
36843e198johnlev#if !defined(__amd64)
37843e198johnlev#error	"non-amd64 code depends on amd64 privileged header!"
38843e198johnlev#endif
39843e198johnlev
40843e198johnlev#ifndef _ASM
41843e198johnlev
42843e198johnlev#define	PM_GREGS (1 << 0)
43843e198johnlev#define	PM_CRREGS (1 << 1)
44843e198johnlev#define	PM_DRREGS (1 << 2)
45843e198johnlev
46843e198johnlev/*
47843e198johnlev * This structure is intended to represent a complete machine state for a CPU,
48843e198johnlev * when that information is available.  It is only for use internally between
49843e198johnlev * KMDB and the kernel, or within MDB.  Note that this isn't yet finished.
50843e198johnlev */
51843e198johnlevtypedef struct privmregs {
52843e198johnlev	ulong_t pm_flags;
53843e198johnlev	/* general registers */
54843e198johnlev	struct regs pm_gregs;
55843e198johnlev	/* cr0-8 */
56843e198johnlev	ulong_t pm_cr[8];
57843e198johnlev	/* dr0-8 */
58843e198johnlev	ulong_t pm_dr[8];
59843e198johnlev} privmregs_t;
60843e198johnlev
61843e198johnlev#endif /* !_ASM */
6270025d7johnny
63ae115bcmrj#ifdef __cplusplus
6470025d7johnny}
6570025d7johnny#endif
6670025d7johnny
67843e198johnlev#endif	/* !_AMD64_SYS_PRIVMREGS_H */
68