Open a-will opened 1 year ago
Without this fix, software will likely need to ensure the interrupts are not enabled while modifying mtimecmp
(to avoid spurious interrupts while performing the multiple writes to update the value).
CC @GregAC @rswarbrick
We may want to align this with the spec for PROD.
Assigning @GregAC to please take a look and propose a resolution -- feel free to delegate the implementation ofc
Moving to Backlog.
Description
The interrupt currently is cleared for any write to
mtimecmp
, but this was a misinterpretation of the spec. Ensure the interrupt is asserted as long asmtime
is greater than or equal tomtimecmp
, with no glitching.While implementing this change, take advantage of the expanded interrupt capabilities, and convert the rv_timer interrupt to the Status type to avoid awkward latching behavior.
From https://github.com/lowRISC/opentitan/issues/18400#issuecomment-1590249373