openhwgroup / cv32e40s

4 stage, in-order, secure RISC-V core based on the CV32E40P
https://docs.openhwgroup.org/projects/cv32e40s-user-manual/en/latest/
Other
126 stars 21 forks source link

Fix for issue where rvfi_intr could have the wrong value after dummy instructions. #468

Closed silabs-oysteink closed 1 year ago

silabs-oysteink commented 1 year ago

Resetting 'dummy_suppressed_intr' if a new interrupt, nmi or exception is taken.

This fixes an issue in the following scenario:

1: Interrupt is taken, RVFI starts tracking in_trap (A) 2: The first interrupt handler is replaced by a dummy instruction, trap info (A) is stored in dummy_suppressed_intr 3: An NMI is taken before the original interrupt handler instruction retires. This 4: The first NMI handler instruction retires. This requires rvfi_trap to show the NMI, but dummy_suppressed_intr is used and trap info (A) is shown instead.