-
Notifications
You must be signed in to change notification settings - Fork 207
Add APOB messages to host_sp_comms #2006
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
base: master
Are you sure you want to change the base?
Conversation
hf.bonus_sector_erase(offset) | ||
.map_err(|err| APOBError::EraseFailed { offset, err })?; | ||
} else { | ||
// Read back the page and confirm that it's all empty |
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.
Could this fail if there's a blip in the IPCC path and the host resends an APOB
request? (I'm not sure what the expectations are for the offsets the host is providing.)
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.
Some mostly kind of annoying nitpicks.
3c34974
to
593980a
Compare
65a65da
to
ebcfe39
Compare
ded20cd
to
7846e44
Compare
fn apob_write( | ||
hf: &HostFlash, | ||
mut offset: u64, | ||
data: &[u8], | ||
) -> Result<(), ApobError> { |
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.
So we need something in the broader API to discover what the erase size granularity is or at least make sure that we're sending stuff that is page size aligned. This gets to what @jgallagher gets at below. But if the host sent things that wasn't page aligned then we'd erase the entire page because our API is not doing a read-modify-write.
See https://github.com/oxidecomputer/stlouis/issues/707, https://github.com/oxidecomputer/rfd/pull/855 , oxidecomputer/amd-host-image-builder#222