1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

Add definitions for magic numbers used in asm.

Bloat trapframe with many extra fields so we don't need extra structures.
Use small data types where possible.
Remove second copy of TF_DONE.
Remove mmuframe.
This commit is contained in:
Jake Burkholder 2001-12-29 06:56:11 +00:00
parent 5a99bf0775
commit 8c3d8ad946
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88622

View File

@ -29,37 +29,35 @@
#ifndef _MACHINE_FRAME_H_
#define _MACHINE_FRAME_H_
#define SPOFF 2047
#define PTR_SHIFT 3
#define RW_SHIFT 7
#define SPOFF 2047
struct trapframe {
u_long tf_global[8];
u_long tf_out[8];
u_long tf_pil;
u_long tf_fsr;
u_long tf_sfar;
u_long tf_tar;
u_long tf_tnpc;
u_long tf_tpc;
u_long tf_tstate;
u_long tf_type;
u_long tf_wstate;
uintptr_t tf_arg;
u_int tf_sfsr;
u_int tf_type;
u_int tf_y;
u_char tf_fprs;
u_char tf_pil;
u_char tf_wstate;
u_char tf_pad[1];
};
#define tf_sp tf_out[6]
#define tf_level tf_sfsr
#define tf_sp tf_out[6]
#define TF_DONE(tf) do { \
tf->tf_tpc = tf->tf_tnpc; \
tf->tf_tnpc += 4; \
} while (0)
#define TF_DONE(tf) do { \
tf->tf_tpc = tf->tf_tnpc; \
tf->tf_tnpc += 4; \
} while (0)
struct mmuframe {
u_long mf_sfar;
u_long mf_sfsr;
u_long mf_tar;
};
struct clockframe {
struct trapframe cf_tf;
};