Skip to content
Commit f216c434 authored by Jimmy Zheng's avatar Jimmy Zheng Committed by Benjamin Cabé
Browse files

soc: gd32: gd32vf103: keep the mcause.interrupt by SOC-specific context



For Nuclei ECLIC, the interrupt level (mintstatus.MIL) is restored from
the previous interrupt level (mcause.MPIL) only if mcause.interrupt is set.
This behavior is not defined in the RISC-V CLIC spec.
If an ISR causes a context switch and mcause.interrupt is not set in the
next context (e.g. the next context is yielded from ecall), interrupts will
be masked after MRET because the interrupt level is not restored.

Use SOC-specific context to set mcause.interrupt to ensure the interrupt
level is restored correctly.

Signed-off-by: default avatarJimmy Zheng <jimmyzhe@andestech.com>
parent 38043873
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment