xref: /netbsd/external/cddl/osnet/sys/sys/cpuvar_defs.h (revision 6550d01e)
1 /*	$NetBSD: cpuvar_defs.h,v 1.2 2010/02/21 01:46:35 darran Exp $	*/
2 
3 /*
4  * CDDL HEADER START
5  *
6  * The contents of this file are subject to the terms of the
7  * Common Development and Distribution License (the "License").
8  * You may not use this file except in compliance with the License.
9  *
10  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11  * or http://www.opensolaris.org/os/licensing.
12  * See the License for the specific language governing permissions
13  * and limitations under the License.
14  *
15  * When distributing Covered Code, include this CDDL HEADER in each
16  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17  * If applicable, add the following below this CDDL HEADER, with the
18  * fields enclosed by brackets "[]" replaced with your own identifying
19  * information: Portions Copyright [yyyy] [name of copyright owner]
20  *
21  * CDDL HEADER END
22  */
23 
24 /*
25  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
26  * Use is subject to license terms.
27  */
28 
29 #ifndef _COMPAT_OPENSOLARIS_SYS_CPUVAR_DEFS_H
30 #define	_COMPAT_OPENSOLARIS_SYS_CPUVAR_DEFS_H
31 
32 /*
33  * DTrace flags.
34  */
35 #define	CPU_DTRACE_NOFAULT	0x0001	/* Don't fault */
36 #define	CPU_DTRACE_DROP		0x0002	/* Drop this ECB */
37 #define	CPU_DTRACE_BADADDR	0x0004	/* DTrace fault: bad address */
38 #define	CPU_DTRACE_BADALIGN	0x0008	/* DTrace fault: bad alignment */
39 #define	CPU_DTRACE_DIVZERO	0x0010	/* DTrace fault: divide by zero */
40 #define	CPU_DTRACE_ILLOP	0x0020	/* DTrace fault: illegal operation */
41 #define	CPU_DTRACE_NOSCRATCH	0x0040	/* DTrace fault: out of scratch */
42 #define	CPU_DTRACE_KPRIV	0x0080	/* DTrace fault: bad kernel access */
43 #define	CPU_DTRACE_UPRIV	0x0100	/* DTrace fault: bad user access */
44 #define	CPU_DTRACE_TUPOFLOW	0x0200	/* DTrace fault: tuple stack overflow */
45 #if defined(__sparc)
46 #define	CPU_DTRACE_FAKERESTORE	0x0400	/* pid provider hint to getreg */
47 #endif
48 #define	CPU_DTRACE_ENTRY	0x0800	/* pid provider hint to ustack() */
49 #define	CPU_DTRACE_BADSTACK	0x1000	/* DTrace fault: bad stack */
50 
51 #define	CPU_DTRACE_FAULT	(CPU_DTRACE_BADADDR | CPU_DTRACE_BADALIGN | \
52 				CPU_DTRACE_DIVZERO | CPU_DTRACE_ILLOP | \
53 				CPU_DTRACE_NOSCRATCH | CPU_DTRACE_KPRIV | \
54 				CPU_DTRACE_UPRIV | CPU_DTRACE_TUPOFLOW | \
55 				CPU_DTRACE_BADSTACK)
56 #define	CPU_DTRACE_ERROR	(CPU_DTRACE_FAULT | CPU_DTRACE_DROP)
57 
58 #define PANICSTKSIZE    8192
59 #define REGSIZE		256
60 
61 #endif /* _COMPAT_OPENSOLARIS_SYS_CPUVAR_DEFS_H */
62