Page MenuHomeFreeBSD

D36876.id111433.diff
No OneTemporary

D36876.id111433.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
@@ -309,6 +309,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:
@@ -377,6 +384,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
Sat, Jun 13, 1:58 AM (10 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33918640
Default Alt Text
D36876.id111433.diff (942 B)

Event Timeline