Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ hif = { git = "https://github.com/oxidecomputer/hif" }
humpty = { git = "https://github.com/oxidecomputer/humpty", version = "0.1.3" }
idol = {git = "https://github.com/oxidecomputer/idolatry.git"}
idt8a3xxxx = { git = "https://github.com/oxidecomputer/idt8a3xxxx" }
measurement-token = { git = "https://github.com/oxidecomputer/lpc55_support", default-features = false }
pmbus = { git = "https://github.com/oxidecomputer/pmbus" }
spd = { git = "https://github.com/oxidecomputer/spd" }
serialport = { git = "https://github.com/jgallagher/serialport-rs", branch = "illumos-support" }
spd = { git = "https://github.com/oxidecomputer/spd" }
tlvc = { git = "https://github.com/oxidecomputer/tlvc" }
tlvc-text = {git = "https://github.com/oxidecomputer/tlvc"}
vsc7448-info = { git = "https://github.com/oxidecomputer/vsc7448.git" }
Expand Down
1 change: 1 addition & 0 deletions cmd/flash/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ humility-probes-core = { workspace = true }
cmd-auxflash = { workspace = true }
clap = { workspace = true }
anyhow = { workspace = true }
measurement-token = { workspace = true }
parse_int = { workspace = true }
num-traits = { workspace = true }
tempfile = { workspace = true }
Expand Down
18 changes: 17 additions & 1 deletion cmd/flash/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,23 @@ fn flashcmd(context: &mut ExecutionContext) -> Result<()> {
std::thread::sleep(std::time::Duration::from_millis(delay));
}

core.reset()?;
// If this image uses handoff to send a measurement token between the RoT
// and SP, this won't work with a debugger physically attached. To prevent
// the SP from resetting itself, we write a different token which skips this
// reboot loop. The memory address and token values are pulled from the
// `measurement-token` crate in `lpc55_support`, which is also used in the
// SP firmware.
if hubris.manifest.features.iter().any(|s| s == "measurement-handoff") {
core.reset_and_halt(std::time::Duration::from_millis(25))?;
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to make this time a constant in measurement-token too?

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 don't think so – it's a Humility-specific delay, so it doesn't need to be coordinated between repositories.

humility::msg!("skipping measurement token handoff");
core.write_word_32(
measurement_token::SP_ADDR as u32,
measurement_token::SKIP,
)?;
core.run()?;
} else {
core.reset()?;
}

// At this point, we can attempt to program the auxiliary flash. This has
// to happen *after* the image is flashed and the core is reset, because it
Expand Down
2 changes: 1 addition & 1 deletion humility-bin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[package]
name = "humility-bin"
version = "0.12.6"
version = "0.12.7"
edition = "2021"
license = "MPL-2.0"
rust-version = "1.68"
Expand Down
4 changes: 2 additions & 2 deletions humility-bin/tests/cmd/chip.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For more information try --help

```
$ humility --chip this-can-be-anything -V
humility 0.12.6
humility 0.12.7

```

Expand All @@ -28,7 +28,7 @@ For more information try --help

```
$ humility -c apx432 -V
humility 0.12.6
humility 0.12.7

```

4 changes: 2 additions & 2 deletions humility-bin/tests/cmd/version.trycmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Long version flag:

```
$ humility --version
humility 0.12.6
humility 0.12.7

```

Short version flag:

```
$ humility -V
humility 0.12.6
humility 0.12.7

```
2 changes: 1 addition & 1 deletion humility-core/src/hubris.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const OXIDE_NT_HUBRIS_ARCHIVE: u32 = OXIDE_NT_BASE + 1;
const OXIDE_NT_HUBRIS_REGISTERS: u32 = OXIDE_NT_BASE + 2;
const OXIDE_NT_HUBRIS_TASK: u32 = OXIDE_NT_BASE + 3;

const MAX_HUBRIS_VERSION: u32 = 9;
const MAX_HUBRIS_VERSION: u32 = 10;

#[derive(Default, Debug, Serialize)]
pub struct HubrisManifest {
Expand Down
Loading