Page MenuHomeFreeBSD

D36876.1784797813.diff
No OneTemporary

Size
942 B
Referenced Files
None
Subscribers
None

D36876.1784797813.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
Thu, Jul 23, 9:10 AM (1 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29237469
Default Alt Text
D36876.1784797813.diff (942 B)

Event Timeline