ot_keymgr
: Only go idle on reset and op_status write
#204
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should fix failures in Earlgrey ROM_EXT regressions after lowRISC/opentitan@abac206 was (correctly) merged in upstream
earlgrey_1.0.0
. Also see discussion on the relevant RTL and SW drivers in lowRISC/opentitan#27683. This is a case of the SW being made more stringent and catching an issue in the QEMU implementation.The keymgr should only change its
OP_STATUS
to idle upon reset, or if it is explicitly cleared by SW. TheDONE_ERROR
andDONE_SUCCESS
operation status values need to be latched to be queried by software, but subsequent FSM ticks (e.g. scheduled with a timer) can then change the operation status back to idle.In HW, this value is latched and only updated when
op_start
, i.e. when the operation is ongoing. When the operation is not ongoing, the value is thus not reset back to idle outside of SW writes/resets. See the relevant RTL.This wasn't being caught before because SW was either reading fast enough / only in cases before any subsequent FSM ticks, and/or was just discarding the incorrect
IDLE
state.