This is a toy RISC-V simulator.
- Only way to change privilege mode is through
ECALL
andMRET
/SRET
. MRET
/SRET
will change the privilege mode to the one inMSTATUS.MPP
- Traps switch machine to M-mode unless
mdeleg
is set. - "privilege mode stack"?
- https://cdn2.hubspot.net/hubfs/3020607/An%20Introduction%20to%20the%20RISC-V%20Architecture.pdf