1 /* $OpenBSD: frame.h,v 1.3 1998/09/15 10:50:12 pefo Exp $ */
2
3 /*-
4 * Copyright (c) 1998 Per Fogelstrom, Opsycon AB
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software
15 * must display the following acknowledgement:
16 * This product includes software developed under OpenBSD by
17 * Per Fogelstrom, Opsycon AB, Sweden.
18 * 4. The name of the author may not be used to endorse or promote products
19 * derived from this software without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
22 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
25 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * JNPR: frame.h,v 1.6.2.1 2007/09/10 08:14:57 girish
34 * $FreeBSD: releng/8.0/sys/mips/include/frame.h 188627 2009-02-15 01:12:16Z imp $
35 *
36 */
37 #ifndef _MACHINE_FRAME_H_
38 #define _MACHINE_FRAME_H_
39
40 struct trapframe {
41 register_t zero;
42 register_t ast;
43 register_t v0;
44 register_t v1;
45 register_t a0;
46 register_t a1;
47 register_t a2;
48 register_t a3;
49 register_t t0;
50 register_t t1;
51 register_t t2;
52 register_t t3;
53 register_t t4;
54 register_t t5;
55 register_t t6;
56 register_t t7;
57 register_t s0;
58 register_t s1;
59 register_t s2;
60 register_t s3;
61 register_t s4;
62 register_t s5;
63 register_t s6;
64 register_t s7;
65 register_t t8;
66 register_t t9;
67 register_t k0;
68 register_t k1;
69 register_t gp;
70 register_t sp;
71 register_t s8;
72 register_t ra;
73 register_t sr;
74 register_t mullo;
75 register_t mulhi;
76 register_t badvaddr;
77 register_t cause;
78 register_t pc;
79 /*
80 * FREEBSD_DEVELOPERS_FIXME:
81 * Include any other registers which are CPU-Specific and
82 * need to be part of the frame here.
83 *
84 * Also, be sure this matches what is defined in regnum.h
85 */
86 register_t ic; /* RM7k and RM9k specific */
87 register_t dummy; /* Alignment for 32-bit case */
88
89 /* From here and on, only saved user processes. */
90
91 f_register_t f0;
92 f_register_t f1;
93 f_register_t f2;
94 f_register_t f3;
95 f_register_t f4;
96 f_register_t f5;
97 f_register_t f6;
98 f_register_t f7;
99 f_register_t f8;
100 f_register_t f9;
101 f_register_t f10;
102 f_register_t f11;
103 f_register_t f12;
104 f_register_t f13;
105 f_register_t f14;
106 f_register_t f15;
107 f_register_t f16;
108 f_register_t f17;
109 f_register_t f18;
110 f_register_t f19;
111 f_register_t f20;
112 f_register_t f21;
113 f_register_t f22;
114 f_register_t f23;
115 f_register_t f24;
116 f_register_t f25;
117 f_register_t f26;
118 f_register_t f27;
119 f_register_t f28;
120 f_register_t f29;
121 f_register_t f30;
122 f_register_t f31;
123 register_t fsr;
124 register_t fdummy;
125 /*
126 * COP2 registers may need to be saved here based on the CPU, and those
127 * might need to be per process, or even for the kernel, so we need
128 * some thought here.
129 */
130 };
131
132 /* REVISIT */
133 struct frame *get_current_fp(void);
134 #define get_next_fp(fp) (0)
135 #define get_return_ptr(fp) (0)
136 void get_stack_trace(u_int32_t depth, u_int32_t *trace);
137
138 #endif /* !_MACHINE_FRAME_H_ */
Cache object: 7a9ea9434e28bb3689a27b66764d1f80
|