union sigval sv;
struct proc *p;
struct pcb *pcb;
- uint64_t stval;
p = curcpu()->ci_curproc;
p->p_addr->u_pcb.pcb_tf = frame;
}
}
printf("ILL at %lx scause %lx stval %lx\n", frame->tf_sepc, frame->tf_scause, frame->tf_stval);
- sv.sival_int = stval;
+ sv.sival_ptr = (void *)frame->tf_stval;
KERNEL_LOCK();
trapsignal(p, SIGILL, 0, ILL_ILLTRP, sv);
KERNEL_UNLOCK();
break;
case EXCP_BREAKPOINT:
printf("BREAKPOINT\n");
- sv.sival_int = stval;
+ sv.sival_ptr = (void *)frame->tf_stval;
KERNEL_LOCK();
trapsignal(p, SIGTRAP, 0, TRAP_BRKPT, sv);
KERNEL_UNLOCK();
sig = SIGSEGV;
code = SEGV_MAPERR;
}
- sv.sival_int = stval;
+ sv.sival_ptr = (void *)stval;
KERNEL_LOCK();
//printf("signalling %d at pc 0%lx ra 0x%lx %llx\n", code, frame->tf_sepc, frame->tf_ra, stval);
trapsignal(p, sig, 0, code, sv);
fatal:
dump_regs(frame);
- panic("Fatal page fault at %#lx: %#08x", frame->tf_sepc, sv.sival_int);
+ panic("Fatal page fault at %#lx: %#08lx", frame->tf_sepc,
+ (vaddr_t)sv.sival_ptr);
}