[BUG] interrupts delegattion Not Masked in M-Mode as Expected #2693
Labels
notCV32A65X
It is not an CV32A65X issue
Type:Bug
For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Is there an existing CVA6 bug for this?
Bug Description
According to the RISC-V ISA, delegated interrupts should result in the interrupt being masked at the delegator privilege level. For example, if the Supervisor Timer Interrupt (STI) is delegated to S-mode by setting mideleg[5], STIs should not be taken when executing in M-mode. If mideleg[5] is cleared, STIs can be taken in any mode, and regardless of the current mode, control should transfer to M-mode.
However, when the STI interrupt is delegated to S-mode and the interrupt is triggered, the interrupt is not masked in M-mode as expected. It remains visible in M-mode even though it should be masked, and we can see the interrupt in the mip register.
Code for Reproducing the Bug:
Expected Behavior:
When the STI interrupt is delegated to S-mode, and the interrupt is triggered, it should be masked in M-mode and should not be visible in the mip register while executing in M-mode. The interrupt should be visible in the sip register when executing in S-mode.
Observed Behavior:
The STI interrupt is still visible in M-mode, even though it should be masked due to the delegation to S-mode. This violates the expected behavior as defined by the RISC-V ISA for delegated interrupts.
CVA6 commit: 2155d0e
Build config :
cv64a6_imafdch_sv39_wb
The text was updated successfully, but these errors were encountered: