The Kestrel is a family of home-made computers, built as much as possible on open-source technology, and supporting as much as possible the open-source philosophy.
e used to calculate the interrupt handler's address from the current privilege level (bits 2, 1 of mstatus), which was always machine-mode. It should take bits 5, 4 of mstatus instead (the privilege level of the interrupted control flow).
Alternatively, continue to use bits 2, 1, but withhold changing mstatus until after handler address calculation completes.
e used to calculate the interrupt handler's address from the current privilege level (bits 2, 1 of
mstatus
), which was always machine-mode. It should take bits 5, 4 ofmstatus
instead (the privilege level of the interrupted control flow).Alternatively, continue to use bits 2, 1, but withhold changing
mstatus
until after handler address calculation completes.