Synchronous debug reasons handled before taking interrupt enabled via instruction #665
Labels
Component:RTL
For issues in the RTL (e.g. for files in the rtl directory)
Type:Bug
For bugs in any content (RTL, Documentation, etc.)
When an mret instruction or CSR write globally (re-)enables a locally enabled and pending interrupt, a following ebreak instruction can cause debug mode entry although it should have been cancelled by the interrupt. This is basically the same issue as #325, but that issue had only been fixed for load/store instructions following re-enabling of interrupts.
We should reconsider the implementation of all synchronous debug entry reasons (not only ebreak). We currently have all debug entry reasons prioritized above all (non-NMI) interrupt entry reasons. We need to double check if that was an arbitrary choice or whether that is implied by some RISC-V spec.
Possible fixes include:
The text was updated successfully, but these errors were encountered: