Page MenuHomeFreeBSD

D29764.diff
No OneTemporary

D29764.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
@@ -274,6 +274,9 @@
KASSERT((csr_read(sstatus) & (SSTATUS_SPP | SSTATUS_SIE)) ==
SSTATUS_SPP, ("Came from S mode with interrupts enabled"));
+ KASSERT((csr_read(sstatus) & (SSTATUS_SUM)) == 0,
+ ("Came from S mode with SUM enabled"));
+
exception = frame->tf_scause & SCAUSE_CODE;
if ((frame->tf_scause & SCAUSE_INTR) != 0) {
/* Interrupt */
@@ -342,6 +345,9 @@
KASSERT((csr_read(sstatus) & (SSTATUS_SPP | SSTATUS_SIE)) == 0,
("Came from U mode with interrupts enabled"));
+ KASSERT((csr_read(sstatus) & (SSTATUS_SUM)) == 0,
+ ("Came from U mode with SUM enabled"));
+
exception = frame->tf_scause & SCAUSE_CODE;
if ((frame->tf_scause & SCAUSE_INTR) != 0) {
/* Interrupt */

File Metadata

Mime Type
text/plain
Expires
Thu, Feb 6, 1:46 AM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16484615
Default Alt Text
D29764.diff (836 B)

Event Timeline