frame.h revision 1.2 1 1.2 tsubai /* $NetBSD: frame.h,v 1.2 2000/09/08 10:15:23 tsubai Exp $ */
2 1.1 itojun
3 1.1 itojun /*-
4 1.1 itojun * Copyright (c) 1995 Charles M. Hannum. All rights reserved.
5 1.1 itojun * Copyright (c) 1990 The Regents of the University of California.
6 1.1 itojun * All rights reserved.
7 1.1 itojun *
8 1.1 itojun * This code is derived from software contributed to Berkeley by
9 1.1 itojun * William Jolitz.
10 1.1 itojun *
11 1.1 itojun * Redistribution and use in source and binary forms, with or without
12 1.1 itojun * modification, are permitted provided that the following conditions
13 1.1 itojun * are met:
14 1.1 itojun * 1. Redistributions of source code must retain the above copyright
15 1.1 itojun * notice, this list of conditions and the following disclaimer.
16 1.1 itojun * 2. Redistributions in binary form must reproduce the above copyright
17 1.1 itojun * notice, this list of conditions and the following disclaimer in the
18 1.1 itojun * documentation and/or other materials provided with the distribution.
19 1.1 itojun * 3. All advertising materials mentioning features or use of this software
20 1.1 itojun * must display the following acknowledgement:
21 1.1 itojun * This product includes software developed by the University of
22 1.1 itojun * California, Berkeley and its contributors.
23 1.1 itojun * 4. Neither the name of the University nor the names of its contributors
24 1.1 itojun * may be used to endorse or promote products derived from this software
25 1.1 itojun * without specific prior written permission.
26 1.1 itojun *
27 1.1 itojun * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28 1.1 itojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 1.1 itojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 1.1 itojun * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31 1.1 itojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 1.1 itojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 1.1 itojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 1.1 itojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 1.1 itojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 1.1 itojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 1.1 itojun * SUCH DAMAGE.
38 1.1 itojun *
39 1.1 itojun * @(#)frame.h 5.2 (Berkeley) 1/18/91
40 1.1 itojun */
41 1.1 itojun
42 1.1 itojun #ifndef _SH3_FRAME_H_
43 1.1 itojun #define _SH3_FRAME_H_
44 1.1 itojun
45 1.1 itojun #include <sys/signal.h>
46 1.1 itojun
47 1.1 itojun /*
48 1.1 itojun * System stack frames.
49 1.1 itojun */
50 1.1 itojun
51 1.1 itojun /*
52 1.1 itojun * Exception/Trap Stack Frame
53 1.1 itojun */
54 1.1 itojun struct trapframe {
55 1.1 itojun int tf_trapno;
56 1.2 tsubai int tf_ubc;
57 1.1 itojun int tf_spc;
58 1.1 itojun int tf_ssr;
59 1.1 itojun int tf_macl;
60 1.1 itojun int tf_mach;
61 1.1 itojun int tf_pr;
62 1.1 itojun int tf_r14;
63 1.1 itojun int tf_r13;
64 1.1 itojun int tf_r12;
65 1.1 itojun int tf_r11;
66 1.1 itojun int tf_r10;
67 1.1 itojun int tf_r9;
68 1.1 itojun int tf_r8;
69 1.1 itojun int tf_r7;
70 1.1 itojun int tf_r6;
71 1.1 itojun int tf_r5;
72 1.1 itojun int tf_r4;
73 1.1 itojun int tf_r3;
74 1.1 itojun int tf_r2;
75 1.1 itojun int tf_r1;
76 1.1 itojun int tf_r0;
77 1.1 itojun int tf_r15;
78 1.1 itojun };
79 1.1 itojun
80 1.1 itojun /*
81 1.1 itojun * Interrupt stack frame
82 1.1 itojun */
83 1.1 itojun struct intrframe {
84 1.1 itojun int if_trapno;
85 1.1 itojun int dummy;
86 1.1 itojun int if_spc;
87 1.1 itojun int if_ssr;
88 1.1 itojun int if_macl;
89 1.1 itojun int if_mach;
90 1.1 itojun int if_pr;
91 1.1 itojun int if_r14;
92 1.1 itojun int if_r13;
93 1.1 itojun int if_r12;
94 1.1 itojun int if_r11;
95 1.1 itojun int if_r10;
96 1.1 itojun int if_r9;
97 1.1 itojun int if_r8;
98 1.1 itojun int if_r7;
99 1.1 itojun int if_r6;
100 1.1 itojun int if_r5;
101 1.1 itojun int if_r4;
102 1.1 itojun int if_r3;
103 1.1 itojun int if_r2;
104 1.1 itojun int if_r1;
105 1.1 itojun int if_r0;
106 1.1 itojun int if_r15;
107 1.1 itojun int if_pri;
108 1.1 itojun };
109 1.1 itojun
110 1.1 itojun /*
111 1.1 itojun * Stack frame inside cpu_switch()
112 1.1 itojun */
113 1.1 itojun struct switchframe {
114 1.1 itojun int sf_ppl;
115 1.1 itojun int sf_r14;
116 1.1 itojun int sf_r13;
117 1.1 itojun int sf_r12;
118 1.1 itojun int sf_r11;
119 1.1 itojun int sf_r10;
120 1.1 itojun int sf_r9;
121 1.1 itojun int sf_r8;
122 1.1 itojun int sf_pr;
123 1.1 itojun };
124 1.1 itojun
125 1.1 itojun /*
126 1.1 itojun * Signal frame
127 1.1 itojun */
128 1.1 itojun struct sigframe {
129 1.1 itojun int sf_signum;
130 1.1 itojun int sf_code;
131 1.1 itojun struct sigcontext *sf_scp;
132 1.1 itojun sig_t sf_handler;
133 1.1 itojun struct sigcontext sf_sc;
134 1.1 itojun };
135 1.1 itojun
136 1.1 itojun #endif /* !_SH3_FRAME_H_ */
137