[keymgr_dpe, rtl] Introduce registers to read slot metadata - #31228
Conversation
62be8c4 to
598802a
Compare
598802a to
96d7f51
Compare
96d7f51 to
5b6756f
Compare
9905de1 to
508ccd4
Compare
|
Note: I will need the function |
gautschimi
left a comment
There was a problem hiding this comment.
Thanks for this PR. It is mostly good. Just a few comments:
-
Instead of METADATA_LOW/HIGH we could call the registers SLOT_KEY_VERSION, SLOT_METADATA. But no strong opinion about it. What do you think?
-
are there any security concerns of exposing this information? If yes, do we need an option to disable this output? E.g. a regwen that just ties the info to 0.
-
I think at the moment we add around 300 registers for this block. half of them might get optimized away because they are constant 0. But I believe we can get rid of all of them by defining the registers to be external (in the slot). Would be worth to synthesize this.
-
Can we create a sw-issue to update the dif with this new functionality? (Maybe it already exists. in that case just link it)
|
Thanks @gautschimi for your review, I will take a look.
|
The register names (1) are ok, let's leave them as they are. |
andreaskurth
left a comment
There was a problem hiding this comment.
Thanks @rroth-lowrisc for this PR! Exposing the slot metadata lets SW see each slot's boot stage again, and the change is small and in line with the RFC. Beyond the points @gautschimi already raised, I only have minor comments.
Am I right that nothing verifies the new registers yet? No sequence reads METADATA_*, the scoreboard handles them in its default branch ("isn't handled", no read check), and the testplan has no entry for them. The CSR tests pass locally, but they only cover reset values and RO behaviour. Could you open an issue to track this (e.g., linked to #30753)?
These registers enable the metadata for each DPE context stored inside the HW slot to be read. For any uninstantiated hw slot the register will return `0` for all entries. Signed-off-by: Raphael Roth <rroth@lowrisc.org>
Signed-off-by: Raphael Roth <rroth@lowrisc.org>
Signed-off-by: Raphael Roth <rroth@lowrisc.org>
508ccd4 to
7b8893b
Compare
Thanks for the review @andreaskurth - I implemented your suggestions and squashed the SQUASH_ME commits. |
andreaskurth
left a comment
There was a problem hiding this comment.
LGTM, thanks @rroth-lowrisc!
|
CHANGE AUTHORIZED: hw/top_earlgrey/ip/xbar_main/rtl/autogen/tl_main_pkg.sv The new |
|
CHANGE AUTHORIZED: hw/top_earlgrey/ip/xbar_main/rtl/autogen/tl_main_pkg.sv The new METADATA_LOW/METADATA_HIGH registers double the keymgr_dpe register space from 0x100 to 0x200, so topgen regenerated the crossbar address mask and the peripheral size. The base address is unchanged and the new range fits the existing 64 KiB peripheral slot. |
This PR introduces HW register which allows
swto read the metadata for each hw slot. It was aggreed in this RFC. The sw side will be implemented in a follow up PR.This PR depends on:
Only the last
53 commits are relevant for this PR.edit: prior to merge the commit marked [SQUASH_ME] must be squashed for a clean history.