Page MenuHomeFreeBSD

D36876.id111638.diff
No OneTemporary

D36876.id111638.diff

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
@@ -303,6 +303,13 @@
dump_regs(frame);
panic("Memory access exception at 0x%016lx\n", frame->tf_sepc);
break;
+ case SCAUSE_LOAD_MISALIGNED:
+ case SCAUSE_STORE_MISALIGNED:
+ case SCAUSE_INST_MISALIGNED:
+ dump_regs(frame);
+ panic("Misaligned address exception at %#016lx: %#016lx\n",
+ frame->tf_sepc, frame->tf_stval);
+ break;
case SCAUSE_STORE_PAGE_FAULT:
case SCAUSE_LOAD_PAGE_FAULT:
case SCAUSE_INST_PAGE_FAULT:
@@ -371,6 +378,13 @@
exception);
userret(td, frame);
break;
+ case SCAUSE_LOAD_MISALIGNED:
+ case SCAUSE_STORE_MISALIGNED:
+ case SCAUSE_INST_MISALIGNED:
+ call_trapsignal(td, SIGBUS, BUS_ADRALN, (void *)frame->tf_sepc,
+ exception);
+ userret(td, frame);
+ break;
case SCAUSE_STORE_PAGE_FAULT:
case SCAUSE_LOAD_PAGE_FAULT:
case SCAUSE_INST_PAGE_FAULT:

File Metadata

Mime Type
text/plain
Expires
Sun, Mar 29, 11:29 PM (5 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30553937
Default Alt Text
D36876.id111638.diff (942 B)

Event Timeline