-
Notifications
You must be signed in to change notification settings - Fork 12
ot_keymgr
: Add main FSM with keymgr initialization
#184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AlexJones0
merged 6 commits into
lowRISC:ot-earlgrey-9.2.0
from
AlexJones0:eg-keymgr-initialisation
Sep 17, 2025
Merged
ot_keymgr
: Add main FSM with keymgr initialization
#184
AlexJones0
merged 6 commits into
lowRISC:ot-earlgrey-9.2.0
from
AlexJones0:eg-keymgr-initialisation
Sep 17, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3f9630a
to
aecde3f
Compare
Progresses lowRISC/opentitan#27894 |
bcde680
to
45f864d
Compare
loiclefort
reviewed
Sep 16, 2025
45f864d
to
58707a6
Compare
Introduce the initial logic comprising the keymgr FSM, stubbing out all internal FSM states apart from the `RESET` state, which is implemented. Note however that this will not currently function, because keymgr enablement via lc_ctrl has not yet been added. Adds logic for scheduling the FSM using a short timer (200 ns) instead of a BottomHalf because of potential reliability issues. Using a BH / Timer allows deferring execution to the end of I/O calls. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
When the keymgr is disabled by the lc_ctrl, this also temporarily locks the CFG_REGWEN. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Add a device link to endpoint 0 of EDN0 through which the Keymgr can request entropy for refreshing its seed. Implements the `ENTROPY_RESEED` and `RANDOM` states for the Keymgr FSM which use this connection. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Adds a connection between the keymgr and the otp_ctrl, using the implemented `otp_ctrl` methods to retrieve the creator root key from OTP. Also change the behaviour of the `ROOT_KEY` FSM state so that an invalid root key (or disablement) will cause a transition to the `WIPE` state. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
58707a6
to
bf10efb
Compare
loiclefort
approved these changes
Sep 17, 2025
jwnrt
reviewed
Sep 17, 2025
bf10efb
to
aea5683
Compare
This commit focuses on creating a (mostly complete) implementation of the `INIT` keymgr FSM state, which performs some checks before starting an advance or disable operation. These are both stubbed out for now. Logic (which is the same as the keymgr_dpe logic) is added for updating the `OP_STATUS`, so that it latches and reflects the last requested operation. Also, functionality is added to lock `CFG_REGWEN` during an operation. Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
aea5683
to
c4401a3
Compare
jwnrt
approved these changes
Sep 17, 2025
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 PR is the second of a series of 4 PRs to implement OpenTitan's
keymgr
IP, as used in Earlgrey, split to ease review. You can see all the relevantkeymgr
commits in #188.This PR implements the initialization logic and FSM states for the keymgr, allowing the keymgr to begin operation upon writing a
START
command to the keymgr. This includes lifecycle controller enablement, entropy reseeding from the EDN, Creator root key loading from the OTP, and implementation of operation status updates. Future PRs will continue to implement the main FSM andkeymgr
operations.See the commit messages for more details about each change.