ChibiOS-Contrib/os/common
Stefan Kerkmann 9a64f5c17c Force machine mode on interrupt exit for context switches
The first attempt to solve illegal instruction expections was made in commit
b875108cd0
 It seemed as this "fixed" the issue, but merely added delays in the code
 which prevented the error to appear in lucky circumstances. Interesting that this code worked in the first place.

Root cause for the expections where write attempts to mstatus in
user privilege mode which raised the illegal instruction exception which
is in spec with the risc-v privileged isa and documented in the
bumbleebee core architecture manual by nucleisys. The solution is
to never enter user mode by forceing mcause.mpp to 0x3
before calling mret when exiting the interrupt handler
for context switching.
2021-04-17 19:36:44 +02:00
..
ext Add Nucleisys NMSIS sources 2021-04-06 13:38:21 +02:00
ports Force machine mode on interrupt exit for context switches 2021-04-17 19:36:44 +02:00
startup Add myself to copyright notes :-) 2021-04-06 13:38:23 +02:00