Debug-mode privilege level
Hi all,
I'm executing some tests after booting Ibex into User-Mode, and asserting debug stimulus, and I see the following:
In this test, our debug ROM is located at 0x80004f88.
We can see that the core's privilege level stays at PRIV_LVL_U even after the core has jumped to the debug ROM and debug_req has dropped, while the Debug-Mode Spec says that all operation in debug mode should be taken at machine mode. As a result of the current Ibex behavior, illegal instruction exceptions are thrown when we access D-mode CSRs inside of the debug ROM.
However, dcsr.prv is being updated properly, and stores the value of PRIV_LVL_M after trapping to debug mode, it is just the current privilege mode that is being calculated incorrectly.
Best,
Udi