Deleted Added
full compact
frame.h (83366) frame.h (86146)
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2001 Jake Burkholder.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/sparc64/include/frame.h 83366 2001-09-12 08:38:13Z julian $
26 * $FreeBSD: head/sys/sparc64/include/frame.h 86146 2001-11-06 20:13:44Z tmm $
27 */
28
29#ifndef _MACHINE_FRAME_H_
30#define _MACHINE_FRAME_H_
31
32#define SPOFF 2047
33
34struct trapframe {
35 u_long tf_global[8];
36 u_long tf_out[8];
37 u_long tf_pil;
38 u_long tf_tnpc;
39 u_long tf_tpc;
40 u_long tf_tstate;
41 u_long tf_type;
42 u_long tf_wstate;
43 uintptr_t tf_arg;
44};
45#define tf_sp tf_out[6]
27 */
28
29#ifndef _MACHINE_FRAME_H_
30#define _MACHINE_FRAME_H_
31
32#define SPOFF 2047
33
34struct trapframe {
35 u_long tf_global[8];
36 u_long tf_out[8];
37 u_long tf_pil;
38 u_long tf_tnpc;
39 u_long tf_tpc;
40 u_long tf_tstate;
41 u_long tf_type;
42 u_long tf_wstate;
43 uintptr_t tf_arg;
44};
45#define tf_sp tf_out[6]
46
47#define TF_DONE(tf) do { \
48 tf->tf_tpc = tf->tf_tnpc; \
49 tf->tf_tnpc += 4; \
50} while (0)
46
47struct mmuframe {
48 u_long mf_sfar;
49 u_long mf_sfsr;
50 u_long mf_tar;
51};
52
53struct kdbframe {
54 u_long kf_fp;
55 u_long kf_cfp;
56 u_long kf_canrestore;
57 u_long kf_cansave;
58 u_long kf_cleanwin;
59 u_long kf_cwp;
60 u_long kf_otherwin;
61};
62
63struct clockframe {
64 struct trapframe cf_tf;
65};
66
67struct frame {
68 u_long f_local[8];
69 u_long f_in[8];
70 u_long f_pad[8];
71};
72#define f_fp f_in[6]
73#define f_pc f_in[7]
74
75/*
76 * Frame used for pcb_wscratch.
77 */
78struct rwindow {
79 u_long rw_local[8];
80 u_long rw_in[8];
81};
82
83struct thread;
84
85int rwindow_save(struct thread *td);
86int rwindow_load(struct thread *td, struct trapframe *tf, int n);
87
88int kdb_trap(struct trapframe *tf);
89
90#endif /* !_MACHINE_FRAME_H_ */
51
52struct mmuframe {
53 u_long mf_sfar;
54 u_long mf_sfsr;
55 u_long mf_tar;
56};
57
58struct kdbframe {
59 u_long kf_fp;
60 u_long kf_cfp;
61 u_long kf_canrestore;
62 u_long kf_cansave;
63 u_long kf_cleanwin;
64 u_long kf_cwp;
65 u_long kf_otherwin;
66};
67
68struct clockframe {
69 struct trapframe cf_tf;
70};
71
72struct frame {
73 u_long f_local[8];
74 u_long f_in[8];
75 u_long f_pad[8];
76};
77#define f_fp f_in[6]
78#define f_pc f_in[7]
79
80/*
81 * Frame used for pcb_wscratch.
82 */
83struct rwindow {
84 u_long rw_local[8];
85 u_long rw_in[8];
86};
87
88struct thread;
89
90int rwindow_save(struct thread *td);
91int rwindow_load(struct thread *td, struct trapframe *tf, int n);
92
93int kdb_trap(struct trapframe *tf);
94
95#endif /* !_MACHINE_FRAME_H_ */