fix(panic): fixed cache error being reported as illegal instruction

On riscv chips accessing cache mapped memory regions over the ibus would
result in an illegal instructions exception triggering faster than the cache
error interrupt/exception.

Added a cache error check in the panic handler, if any cache errors are active
the panic handler will now report a cache error, even if the trigger exception
was a illegal instructions.
This commit is contained in:
Marius Vikhammer
2023-11-28 09:57:44 +08:00
parent 30eb2918c6
commit 9a6de4cb3e
14 changed files with 349 additions and 122 deletions
@@ -18,3 +18,5 @@
#endif
#define PANIC_RSN_CACHEERR 3
#define MCAUSE_ILLEGAL_INSTRUCTION 2