Skip to content

Conversation

@jgallagher
Copy link
Contributor

There are a couple spots here that I want to double-check are faithful to real SP behavior; will leave comments below.

@jgallagher jgallagher requested a review from labbott July 11, 2025 17:48
// hash of this slot.
if *component == SpComponent::HOST_CPU_BOOT_FLASH {
self.phase1_hash_state
.insert(*slot, HostFlashHashState::HashInvalidated);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is consistent with the real SP, but wanted to check. If we start up and have this sequence of requests:

  • get_host_flash_hash -> will return HfError::HashUncalculated
  • we do not get a request to start_host_flash_hash
  • we perform an update, writing the target slot
  • after the update, we get another get_host_flash_hash request -> this will now return HfError::RecalculateHash, because the act of writing sets our state to HashInvalidated

I think this is completely reasonable but wanted to double check it matches; any write will cause future gets to return HfError::RecalculateHash, even if we'd never calculated it a first time, right?

@jgallagher
Copy link
Contributor Author

This only touches sp-sim and appears to be fine in followon work, so going to land this.

@jgallagher jgallagher merged commit 464e168 into main Jul 16, 2025
17 checks passed
@jgallagher jgallagher deleted the john/sp-sim-host-flash-hashing branch July 16, 2025 19:49
jgallagher added a commit that referenced this pull request Jul 17, 2025
This builds on #8584. The main point of this PR is adding two new MGS
endpoints ("start" and "get status" for the async host phase1 hashing
operation); the bulk of the diff is adding a test that exercises the
simulator to show the expected behavior of these endpoints.
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.

2 participants