Skip to content

Commit e08ac24

Browse files
authored
Make apob_lock allowed on Gimlet (#2290)
`host-sp-comms` always calls `apob_lock` when it receives a message associated with the later stages of boot (e.g. getting MAC addresses). Unfortunately, the Gimlet host flash task would kill it for this impertinence. Fixes #2289
1 parent dd809a0 commit e08ac24

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drv/gimlet-hf-server/src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,12 @@ impl idl::InOrderHostFlashImpl for ServerImpl {
944944
&mut self,
945945
_: &RecvMessage,
946946
) -> Result<(), RequestError<core::convert::Infallible>> {
947-
Err(RequestError::Fail(ClientError::BadMessageContents))
947+
// `apob_lock` is called by `host_sp_comms` once it receives *any*
948+
// message indicating that we've reached a late phase of booting (e.g.
949+
// asking the SP for MAC addresses). The Gimlet has no APOB, so it's
950+
// fine to just return `Ok(())` here; this is cleaner than
951+
// special-casing `host_sp_comms` to only call `apob_lock` on Cosmo.
952+
Ok(())
948953
}
949954

950955
fn apob_read(

0 commit comments

Comments
 (0)