Page MenuHomeFreeBSD

D40584.diff
No OneTemporary

D40584.diff

diff --git a/sys/riscv/riscv/intr_machdep.c b/sys/riscv/riscv/intr_machdep.c
--- a/sys/riscv/riscv/intr_machdep.c
+++ b/sys/riscv/riscv/intr_machdep.c
@@ -163,6 +163,9 @@
active_irq = frame->tf_scause & SCAUSE_CODE;
+ CTR3(KTR_TRAP, "%s: irq=%d, umode=%d", __func__, active_irq,
+ TRAPF_USERMODE(frame));
+
switch (active_irq) {
case IRQ_SOFTWARE_USER:
case IRQ_SOFTWARE_SUPERVISOR:
diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c
--- a/sys/riscv/riscv/trap.c
+++ b/sys/riscv/riscv/trap.c
@@ -291,8 +291,8 @@
return;
#endif
- CTR3(KTR_TRAP, "do_trap_supervisor: curthread: %p, sepc: %lx, frame: %p",
- curthread, frame->tf_sepc, frame);
+ CTR4(KTR_TRAP, "%s: exception=%lu, sepc=%lx, stval=%lx", __func__,
+ exception, frame->tf_sepc, frame->tf_stval);
switch (exception) {
case SCAUSE_LOAD_ACCESS_FAULT:
@@ -365,8 +365,8 @@
}
intr_enable();
- CTR3(KTR_TRAP, "do_trap_user: curthread: %p, sepc: %lx, frame: %p",
- curthread, frame->tf_sepc, frame);
+ CTR4(KTR_TRAP, "%s: exception=%lu, sepc=%lx, stval=%lx", __func__,
+ exception, frame->tf_sepc, frame->tf_stval);
switch (exception) {
case SCAUSE_LOAD_ACCESS_FAULT:

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 1:01 PM (21 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14659049
Default Alt Text
D40584.diff (1 KB)

Event Timeline