-
Notifications
You must be signed in to change notification settings - Fork 665
Description
I recently discovered Ibex enabled/disabled interrupts in U mode based on the mstatus.mie bit which is a violation of the spec (mie applies only to M-mode in U mode it is ignored, only the per interrupt MIE CSR bits should be considered. This is fixed in #1824
I found this when adding interrupts to the debug single step test, which does execute code in U mode with mstatus.mie set to 0, but clearly other testing (in particular the interrupt tests) don't do this otherwise we would have found this bug earlier.
This indicates a gap in our testing. We should add some coverage over different mstatus states that checks we see various states across U-mode/M-mode and with interrupts/debugs/exceptions occurring.
Coverpoints:
- cross - priv_modes, interrupts, mstatus.MIE (excluding mstatus.MIE == 1 && priv_mode == MACHINE as interrupt will not be taken in that case)
- cross - priv_modes, exceptions
Existing tests will require expanding to meet the new coverage
estimate 4