mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
kernel: riscv: allow exceptions with NULL pc
When the program counter is NULL, we can still get exceptions. This happens when we jump to an invalid address, for example. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
08b787a03e
commit
19f68edbb4
1 changed files with 1 additions and 1 deletions
|
|
@ -177,7 +177,7 @@ impl RiscvException {
|
|||
pub fn from_regs(cause: usize, epc: usize, tval: usize) -> RiscvException {
|
||||
use RiscvException::*;
|
||||
|
||||
if epc == 0 && tval == 0 {
|
||||
if epc == 0 && tval == 0 && cause == 0 {
|
||||
return NoException;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue