-
Notifications
You must be signed in to change notification settings - Fork 43
sp-sim: update reported version info across updates #8060
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
Open
davepacheco
wants to merge
18
commits into
main
Choose a base branch
from
dap/drafts/sp-sim-update
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
labbott
reviewed
Apr 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks broadly okay. I'd like to do another pass to double check some of the existing update behavior but if everyone else thinks it's okay and wants to merge go ahead and do so.
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 does two main things:
sp-sim
reports caboose and RoT information that reflects the update.While doing this, I found a bunch of places that were self-inconsistent: the
state
operation androt-boot-info
operation would return different FWIDs for slots A and B; Gimlet reported setting the active slot for stage0 but Sidecar didn't; the comments about which components support which operations were inconsistent with each other, the code, and the real implementation; etc. I'm not positive all of my fixes are right. I welcome corrections. But I think it's a step in the right direction regardless.Notes for reviewers
I believe this is basically ready for review, with one kind of big caveat: after discussion, if I were doing this again, I'd implement it very differently. Instead of storing caboose values and updating these during various parts of the update process, I would instead have the
SimSpUpdate
directly store data for all of the firmware slots that it simulates and compute caboose contents on-demand. I'd also have rot_reset recalculate the FWIDs on startup. I don't think this would have any functional change but should be more faithful in cases we haven't thought about and easier to reason about. But I don't think this is the most useful next step.Here's what I'm thinking instead:
MgsUpdateDriver
that use this new behavior so that we have some useful test coverage of that toolPlease let me know if y'all feel like that's wrong.
Fixes #7913.