Skip to content

Rework host commands#710

Open
jamesmunns wants to merge 3 commits into
masterfrom
james/host-retool
Open

Rework host commands#710
jamesmunns wants to merge 3 commits into
masterfrom
james/host-retool

Conversation

@jamesmunns

Copy link
Copy Markdown

This aims to support oxidecomputer/hubris#2518, but also remedy oxidecomputer/hubris#2586.

@jamesmunns jamesmunns requested review from cbiffle and labbott July 2, 2026 17:42
Comment thread cmd/host/src/lib.rs
Comment on lines +388 to +394
// 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),
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this in order of newest to oldest?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The old code did basically:

  • host_last_panic_spcomms_old
  • host_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.

Comment thread cmd/host/src/lib.rs Outdated
Comment on lines +255 to +258
fn host_boot_fail_packrat(
hubris: &HubrisArchive,
core: &mut dyn Core,
) -> Result<Option<Vec<u8>>> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I keep wishing this could share more code with host_last_panic but I think they are just enough different that would be annoying

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I can take a swing at it.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done in bf0ecf2

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