xref: /illumos-gate/usr/src/uts/sparc/v7/sys/privregs.h (revision 8c69cc8fbe729fa7b091e901c4b50508ccc6bb33)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1986-1999,2002-2003 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_PRIVREGS_H
28 #define	_SYS_PRIVREGS_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * This file is kernel isa dependent.
36  */
37 
38 /*
39  * This file describes the cpu's privileged register set, and
40  * how the machine state is saved on the stack when a trap occurs.
41  */
42 
43 #include <v7/sys/psr.h>
44 #include <sys/fsr.h>
45 
46 #ifndef	_ASM
47 
48 /*
49  * This structure is only here for compatibility.  It is not used by the kernel
50  * and may be removed in a future release.  A better way to access this data
51  * is to use gregset_t; see proc(4) and ucontext(3HEAD).
52  */
53 struct regs {
54 	long	r_psr;		/* processor status register */
55 	long	r_pc;		/* program counter */
56 	long	r_npc;		/* next program counter */
57 	long	r_y;		/* the y register */
58 	long	r_g1;		/* user global regs */
59 	long	r_g2;
60 	long	r_g3;
61 	long	r_g4;
62 	long	r_g5;
63 	long	r_g6;
64 	long	r_g7;
65 	long	r_o0;
66 	long	r_o1;
67 	long	r_o2;
68 	long	r_o3;
69 	long	r_o4;
70 	long	r_o5;
71 	long	r_o6;
72 	long	r_o7;
73 };
74 
75 #define	r_ps	r_psr		/* for portablility */
76 #define	r_r0	r_o0
77 #define	r_sp	r_o6
78 
79 #endif	/* _ASM */
80 
81 #ifdef	__cplusplus
82 }
83 #endif
84 
85 #endif	/* _SYS_PRIVREGS_H */
86