From c59721c350a2992b11b7bb50bbb00ee81bfc5c80 Mon Sep 17 00:00:00 2001 From: Alex Jones Date: Wed, 1 Oct 2025 01:27:30 +0100 Subject: [PATCH] [ot] hw/opentitan: ot_keymgr: Only go idle on reset & op_status write The keymgr should only change its `OP_STATUS` to idle upon reset, or if it is explicitly cleared by SW. The `DONE_ERROR` and `DONE_SUCCESS` operation status values need to be latched to be queried by software, but subsequent FSM ticks (e.g. scheduled by the BH) 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. Signed-off-by: Alex Jones --- hw/opentitan/ot_keymgr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/opentitan/ot_keymgr.c b/hw/opentitan/ot_keymgr.c index c7afa38b1354b..0af3863681827 100644 --- a/hw/opentitan/ot_keymgr.c +++ b/hw/opentitan/ot_keymgr.c @@ -1836,8 +1836,6 @@ static bool ot_keymgr_main_fsm_tick(OtKeyMgrState *s) ot_keymgr_update_irq(s); } else if (op_start) { ot_keymgr_change_op_status(s, KEYMGR_OP_STATUS_WIP); - } else { - ot_keymgr_change_op_status(s, KEYMGR_OP_STATUS_IDLE); } /* lock CFG_REGWEN when an operation is ongoing */