Skip to content
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

Move sp_update and rot_update to MgsCommon #1731

Merged
merged 1 commit into from
Apr 8, 2024
Merged

Conversation

mkeeter
Copy link
Collaborator

@mkeeter mkeeter commented Apr 5, 2024

It would be convenient for #1707 if MgsCommon could check update state, so this PR moves the SpUpdate and RotUpdate members into MgsCommon.

@@ -26,7 +26,8 @@ use userlib::sys_get_timer;

// How big does our shared update buffer need to be? Has to be able to handle SP
// update blocks for now, no other updateable components.
const UPDATE_BUFFER_SIZE: usize = SpUpdate::BLOCK_SIZE;
const UPDATE_BUFFER_SIZE: usize =
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a drive-by fix to make UPDATE_BUFFER_SIZE more robust in case per-component block size ever diverges; mgs_gimlet.rs was already doing this.

@@ -42,7 +42,8 @@ userlib::task_slot!(TRANSCEIVERS, transceivers);

// How big does our shared update buffer need to be? Has to be able to handle SP
// update blocks for now, no other updateable components.
const UPDATE_BUFFER_SIZE: usize = SpUpdate::BLOCK_SIZE;
const UPDATE_BUFFER_SIZE: usize =
usize_max(SpUpdate::BLOCK_SIZE, RotUpdate::BLOCK_SIZE);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

(same here)

@mkeeter mkeeter enabled auto-merge (squash) April 8, 2024 13:49
@mkeeter mkeeter merged commit d72a833 into master Apr 8, 2024
103 checks passed
@mkeeter mkeeter deleted the move-update-to-common branch April 8, 2024 13:54
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.

None yet

3 participants