Rework host commands - #710
Conversation
This aims to support oxidecomputer/hubris#2518, but also remedy oxidecomputer/hubris#2586.
| // Work through the different places "last panic" info could be hiding | ||
| let sources: [fn(&HubrisArchive, &mut dyn Core) -> _; _] = [ | ||
| host_last_panic_packrat, | ||
| host_last_panic_spcomms_old, | ||
| |h, c| host_last_panic_spcomms_new(h, c, HOST_STATE_BUF_NAME_1), | ||
| |h, c| host_last_panic_spcomms_new(h, c, HOST_STATE_BUF_NAME_2), | ||
| ]; |
There was a problem hiding this comment.
Is this in order of newest to oldest?
There was a problem hiding this comment.
The old code did basically:
host_last_panic_spcomms_oldhost_last_panic_spcomms_new(h, c, HOST_STATE_BUF_NAME_1)
I made the executive decision to try packrat first, then the new-new spcomms last. Open to re-order this, it shouldn't be order dependent.
| fn host_boot_fail_packrat( | ||
| hubris: &HubrisArchive, | ||
| core: &mut dyn Core, | ||
| ) -> Result<Option<Vec<u8>>> { |
There was a problem hiding this comment.
I keep wishing this could share more code with host_last_panic but I think they are just enough different that would be annoying
There was a problem hiding this comment.
I can take a swing at it.
labbott
left a comment
There was a problem hiding this comment.
LGTM. As a follow on it would be good to grab a dump with a panic/boot error in the new format and have that in CI.
(I don't remember when I started doing it but I pruned a bunch of very very old hubris cores that were adding complexity. Adding more cores that are actually in use would be good to do!)
This aims to support oxidecomputer/hubris#2518, but also remedy oxidecomputer/hubris#2586.