Skip to content

Conversation

@luismarques
Copy link

From https://opentitan.org/book/hw/ip/lc_ctrl/doc/programmers_guide.html:

"Note that all life cycle state transition increments the LC_TRANSITION_CNT and moves the life cycle state into the temporary POST_TRANSITION state - even if the transition was unsuccessful"

This is checked by manufacturing tests (on the host side).

Copy link

@rivos-eblot rivos-eblot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I have not cross checked with the RTL implementation.

…a transition

From <https://opentitan.org/book/hw/ip/lc_ctrl/doc/programmers_guide.html>:

"Note that all life cycle state transition increments the LC_TRANSITION_CNT
and moves the life cycle state into the temporary POST_TRANSITION state -
even if the transition was unsuccessful"

This is checked by manufacturing tests (on the host side).

Signed-off-by: Luís Marques <luismarques@lowrisc.org>
@luismarques luismarques force-pushed the lc-ctrl-post-transition branch from 689d664 to a02abe0 Compare October 29, 2025 11:31
@luismarques luismarques marked this pull request as ready for review October 29, 2025 11:31
@rivos-eblot rivos-eblot self-requested a review October 29, 2025 13:13
Copy link

@rivos-eblot rivos-eblot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you double checked that LC_STATE_POST_TRANSITION was properly handled in all cases?
For example, LC_ENC_STATE_POST_TRANSITION is defined but not decoded from ot_lc_ctrl_convert_code_to_state(), which would trigger a g_assert() that would be invalid. I'm not sure this case may happen, but it is weird it is defined and not used.

There are other locations where I think LC_STATE_POST_TRANSITION is guarded behind ot_lc_ctrl_safe_convert_code_to_state() but I have not reviewed all the sequences.

We need to be sure that g_assert() cannot be triggered by the guest SW and that LC_STATE_POST_TRANSITION is not stored into the OTP backend.

@luismarques
Copy link
Author

Have you double checked that LC_STATE_POST_TRANSITION was properly handled in all cases?

I will further check things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants