[fuse_ctrl,dv] Improvements to wait_dai_op_idle#751
Merged
Conversation
This avoids fuse_ctrl_mmap.h defining something that actually gets instantiated (and defines a symbol). Without fixing that, if more than one compilation unit includes the header then link will fail because more than one object file defines "partitions" and various fuse index arrays.
No functional change (but hopefully it makes things a bit clearer: I found these ranges a bit hard to reason about).
The value in caliptra_ss_fuse_ctrl_manuf_prod_prov hadn't yet been updated for the change in 275521b. This change should make it so that test and also caliptra_ss_fuse_ctrl_init_fail get a magic number from a single (documented) place. Apply the same change to caliptra_ss_fuse_ctrl_test_unlocked0_prov.
This is a bit fiddly to do properly, because you end up needing to map from a partition with a read lock to that partition's read lock address (which depends on soc_mmap.h). My solution is to have a template generate that map (which will contain actual addresses that get pulled from soc_mmap.h at compile time).
89adb72 to
8bdde5e
Compare
Carefully work through the logic in wait_dai_op_idle and document exactly what it is doing. This changes behaviour slightly if status_mask is nonzero. To look at all sites where this might have an effect, I grepped for the following regex: "wait_dai_op_idle([^0)]" This commit tidies up the obvious matches. There are a couple of places where this function is copy-pasted: - `cptra_uds_prog.c` - `cptra_zeroization` Tidying these up to use the (now correct!) version of this function should be a separate change.
This test injects an error and then reads the status register to check it shows a bus integrity error. The preceding dai_wr transaction is wrong though: *that* should report the error (by reading the same register). Apparently, that check wasn't working before but we've just tweaked wait_dai_op_idle to check more sensibly and that now fails because we're calling it with no expected error. Expect the error, which fixes that failure and also makes the following read redundant.
8bdde5e to
88e35fe
Compare
…pdated timestamp and hash after successful run
Collaborator
|
Started the promote-pipeline for this PR |
…pdated timestamp and hash after successful run
ekarabu
approved these changes
Sep 30, 2025
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
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 builds on top of #750. Only the last commit is unique. It has the following commit message:
Carefully work through the logic in wait_dai_op_idle and document
exactly what it is doing.
This changes behaviour slightly if status_mask is nonzero. To look at
all sites where this might have an effect, I grepped for the following
regex: "wait_dai_op_idle([^0)]"
There are a couple of places where this function is copy-pasted:
cptra_uds_prog.ccptra_zeroizationTidying these up to use the (now correct!) version of this function
should be a separate change.