xref: /illumos-gate/usr/src/uts/sparc/v7/sys/privregs.h (revision 40cb5e5daa7b80bb70fcf8dadfb20f9281566331)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI" /* from SunOS psl.h 1.2 */
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * This file is kernel isa dependent.
38  */
39 
40 /*
41  * This file describes the cpu's privileged register set, and
42  * how the machine state is saved on the stack when a trap occurs.
43  */
44 
45 #include <v7/sys/psr.h>
46 #include <sys/fsr.h>
47 
48 #ifndef	_ASM
49 
50 /*
51  * This structure is only here for compatibility.  It is not used by the kernel
52  * and may be removed in a future release.  A better way to access this data
53  * is to use gregset_t; see proc(4) and ucontext(3HEAD).
54  */
55 struct regs {
56 	long	r_psr;		/* processor status register */
57 	long	r_pc;		/* program counter */
58 	long	r_npc;		/* next program counter */
59 	long	r_y;		/* the y register */
60 	long	r_g1;		/* user global regs */
61 	long	r_g2;
62 	long	r_g3;
63 	long	r_g4;
64 	long	r_g5;
65 	long	r_g6;
66 	long	r_g7;
67 	long	r_o0;
68 	long	r_o1;
69 	long	r_o2;
70 	long	r_o3;
71 	long	r_o4;
72 	long	r_o5;
73 	long	r_o6;
74 	long	r_o7;
75 };
76 
77 #define	r_ps	r_psr		/* for portablility */
78 #define	r_r0	r_o0
79 #define	r_sp	r_o6
80 
81 #endif	/* _ASM */
82 
83 #ifdef	__cplusplus
84 }
85 #endif
86 
87 #endif	/* _SYS_PRIVREGS_H */
88