summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/sparc64/include/trap.h19
-rw-r--r--sys/sparc64/sparc64/db_interface.c2
-rw-r--r--sys/sparc64/sparc64/db_trace.c12
3 files changed, 10 insertions, 23 deletions
diff --git a/sys/sparc64/include/trap.h b/sys/sparc64/include/trap.h
index 92f6385..8cd7094 100644
--- a/sys/sparc64/include/trap.h
+++ b/sys/sparc64/include/trap.h
@@ -57,26 +57,15 @@
#define T_IMMU_MISS 0x19
#define T_DMMU_MISS 0x1a
#define T_DMMU_PROT 0x1b
-#define T_CLOCK 0x1c
-#define T_SPILL 0x1d
-#define T_FILL 0x1e
+#define T_SPILL 0x1c
+#define T_FILL 0x1d
+#define T_FILL_RET 0x1e
#define T_BREAKPOINT 0x1f
#define T_SYSCALL 0x20
#define T_RESTOREWP 0x21
+#define T_SOFT 0x22
#define T_KERNEL 0x40
-#define T_TYPE_SHIFT 0
-#define T_TYPE_SIZE 7
-#define T_TYPE_MASK (((1 << T_TYPE_SIZE) - 1) << T_TYPE_SHIFT)
-#define T_TYPE(type) \
- (((type) & T_TYPE_MASK) >> T_TYPE_SHIFT)
-
-#define T_LEVEL_SHIFT T_TYPE_SIZE
-#define T_LEVEL_SIZE 4
-#define T_LEVEL_MASK (((1 << T_LEVEL_SIZE) - 1) << T_LEVEL_SHIFT)
-#define T_LEVEL(type) \
- (((type) & T_LEVEL_MASK) >> T_LEVEL_SHIFT)
-
#ifndef LOCORE
extern const char *trap_msg[];
#endif
diff --git a/sys/sparc64/sparc64/db_interface.c b/sys/sparc64/sparc64/db_interface.c
index 94d4aab..499c04d 100644
--- a/sys/sparc64/sparc64/db_interface.c
+++ b/sys/sparc64/sparc64/db_interface.c
@@ -67,7 +67,7 @@ kdb_trap(struct trapframe *tf)
if (db_global_jmpbuf_valid)
longjmp(db_global_jmpbuf, 1);
ddb_regs = *tf;
- kf = ddb_regs.tf_arg;
+ kf = (struct kdbframe *)ddb_regs.tf_arg;
kf->kf_cfp = kf->kf_fp;
setjmp(db_global_jmpbuf);
db_global_jmpbuf_valid = TRUE;
diff --git a/sys/sparc64/sparc64/db_trace.c b/sys/sparc64/sparc64/db_trace.c
index 38a1e64..230ddda 100644
--- a/sys/sparc64/sparc64/db_trace.c
+++ b/sys/sparc64/sparc64/db_trace.c
@@ -67,7 +67,6 @@ static int db_print_trap(struct trapframe *);
extern char tl1_trap[];
extern char tl0_trap[];
-extern char tl0_trap_withstack[];
extern char _start[];
extern char _end[];
@@ -128,7 +127,7 @@ db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
if (count == -1)
count = 1024;
if (!have_addr) {
- kfp = DDB_REGS->tf_arg;
+ kfp = (struct kdbframe *)DDB_REGS->tf_arg;
fp = (struct frame *)(kfp->kf_cfp + SPOFF);
} else
fp = (struct frame *)(addr + SPOFF);
@@ -150,8 +149,7 @@ db_stack_trace_cmd(db_expr_t addr, boolean_t have_addr, db_expr_t count,
if (name == NULL)
name = "(null)";
if (value == (u_long)tl1_trap ||
- value == (u_long)tl0_trap ||
- value == (u_long)tl0_trap_withstack) {
+ value == (u_long)tl0_trap) {
nfp = db_get_value((db_addr_t)&fp->f_fp,
sizeof(u_long), FALSE) + SPOFF;
tf = (struct trapframe *)(nfp + sizeof(*fp));
@@ -203,7 +201,7 @@ DB_COMMAND(down, db_frame_down)
u_long cfp;
u_long ofp;
- kfp = DDB_REGS->tf_arg;
+ kfp = (struct kdbframe *)DDB_REGS->tf_arg;
fp = (struct frame *)(kfp->kf_fp + SPOFF);
cfp = kfp->kf_cfp;
for (;;) {
@@ -226,7 +224,7 @@ DB_COMMAND(up, db_frame_up)
struct kdbframe *kfp;
struct frame *cfp;
- kfp = DDB_REGS->tf_arg;
+ kfp = (struct kdbframe *)DDB_REGS->tf_arg;
cfp = (struct frame *)(kfp->kf_cfp + SPOFF);
if (!INKERNEL((u_long)cfp)) {
db_printf("already at top\n");
@@ -243,7 +241,7 @@ db_show_ ## name ## num(struct db_variable *dp, db_expr_t *vp, int op) \
struct kdbframe *kfp; \
struct frame *fp; \
\
- kfp = DDB_REGS->tf_arg; \
+ kfp = (struct kdbframe *)DDB_REGS->tf_arg; \
fp = (struct frame *)(kfp->kf_cfp + SPOFF); \
if (op == DB_VAR_GET) \
*vp = db_get_value((db_addr_t)&fp->f_ ## name ## [num], \
OpenPOWER on IntegriCloud