frame.h revision 1.10 1 1.10 thorpej /* $NetBSD: frame.h,v 1.10 2003/01/18 06:33:42 thorpej Exp $ */
2 1.1 itojun
3 1.1 itojun /*-
4 1.4 uch * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
5 1.1 itojun * Copyright (c) 1995 Charles M. Hannum. All rights reserved.
6 1.1 itojun * Copyright (c) 1990 The Regents of the University of California.
7 1.1 itojun * All rights reserved.
8 1.1 itojun *
9 1.1 itojun * This code is derived from software contributed to Berkeley by
10 1.1 itojun * William Jolitz.
11 1.1 itojun *
12 1.1 itojun * Redistribution and use in source and binary forms, with or without
13 1.1 itojun * modification, are permitted provided that the following conditions
14 1.1 itojun * are met:
15 1.1 itojun * 1. Redistributions of source code must retain the above copyright
16 1.1 itojun * notice, this list of conditions and the following disclaimer.
17 1.1 itojun * 2. Redistributions in binary form must reproduce the above copyright
18 1.1 itojun * notice, this list of conditions and the following disclaimer in the
19 1.1 itojun * documentation and/or other materials provided with the distribution.
20 1.1 itojun * 3. All advertising materials mentioning features or use of this software
21 1.1 itojun * must display the following acknowledgement:
22 1.1 itojun * This product includes software developed by the University of
23 1.1 itojun * California, Berkeley and its contributors.
24 1.1 itojun * 4. Neither the name of the University nor the names of its contributors
25 1.1 itojun * may be used to endorse or promote products derived from this software
26 1.1 itojun * without specific prior written permission.
27 1.1 itojun *
28 1.1 itojun * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
29 1.1 itojun * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 1.1 itojun * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
31 1.1 itojun * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
32 1.1 itojun * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 1.1 itojun * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 1.1 itojun * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 1.1 itojun * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 1.1 itojun * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
37 1.1 itojun * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
38 1.1 itojun * SUCH DAMAGE.
39 1.1 itojun *
40 1.1 itojun * @(#)frame.h 5.2 (Berkeley) 1/18/91
41 1.1 itojun */
42 1.1 itojun
43 1.1 itojun #ifndef _SH3_FRAME_H_
44 1.7 uch #define _SH3_FRAME_H_
45 1.1 itojun
46 1.1 itojun #include <sys/signal.h>
47 1.10 thorpej #include <sys/sa.h>
48 1.1 itojun
49 1.1 itojun /*
50 1.5 uch * Exception Stack Frame
51 1.1 itojun */
52 1.1 itojun struct trapframe {
53 1.3 uch /* software member */
54 1.8 uch int tf_expevt;
55 1.2 tsubai int tf_ubc;
56 1.3 uch /* hardware registers */
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_r13;
63 1.1 itojun int tf_r12;
64 1.1 itojun int tf_r11;
65 1.1 itojun int tf_r10;
66 1.1 itojun int tf_r9;
67 1.1 itojun int tf_r8;
68 1.1 itojun int tf_r7;
69 1.1 itojun int tf_r6;
70 1.1 itojun int tf_r5;
71 1.1 itojun int tf_r4;
72 1.1 itojun int tf_r3;
73 1.1 itojun int tf_r2;
74 1.1 itojun int tf_r1;
75 1.1 itojun int tf_r0;
76 1.1 itojun int tf_r15;
77 1.4 uch int tf_r14;
78 1.1 itojun };
79 1.1 itojun
80 1.1 itojun /*
81 1.1 itojun * Stack frame inside cpu_switch()
82 1.1 itojun */
83 1.1 itojun struct switchframe {
84 1.4 uch int sf_r15;
85 1.1 itojun int sf_r14;
86 1.1 itojun int sf_r13;
87 1.1 itojun int sf_r12;
88 1.1 itojun int sf_r11;
89 1.1 itojun int sf_r10;
90 1.1 itojun int sf_r9;
91 1.1 itojun int sf_r8;
92 1.1 itojun int sf_pr;
93 1.4 uch int sf_r6_bank;
94 1.6 uch int sf_sr;
95 1.8 uch int sf_r7_bank;
96 1.1 itojun };
97 1.1 itojun
98 1.1 itojun /*
99 1.1 itojun * Signal frame
100 1.1 itojun */
101 1.1 itojun struct sigframe {
102 1.1 itojun struct sigcontext sf_sc;
103 1.10 thorpej };
104 1.10 thorpej
105 1.10 thorpej /*
106 1.10 thorpej * Scheduler activations upcall frame
107 1.10 thorpej */
108 1.10 thorpej struct saframe {
109 1.10 thorpej #if 0 /* in registers on entry to upcallcode */
110 1.10 thorpej int sa_type; /* r4 */
111 1.10 thorpej struct sa_t ** sa_sas; /* r5 */
112 1.10 thorpej int sa_events; /* r6 */
113 1.10 thorpej int sa_interrupted; /* r7 */
114 1.10 thorpej #endif
115 1.10 thorpej void * sa_arg;
116 1.1 itojun };
117 1.1 itojun
118 1.1 itojun #endif /* !_SH3_FRAME_H_ */
119