Skip to content

Commit

Permalink
Revert changes to strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty1968 committed Jan 28, 2025
1 parent 8ac3f45 commit 0ba785d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
15 changes: 11 additions & 4 deletions runtime/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ use core::hint::black_box;
#[cfg(feature = "std")]
pub fn main() {}

const BANNER: &str = r#"Caliptra RT"#;
const BANNER: &str = r#"
____ _ _ _ ____ _____
/ ___|__ _| (_)_ __ | |_ _ __ __ _ | _ \_ _|
| | / _` | | | '_ \| __| '__/ _` | | |_) || |
| |__| (_| | | | |_) | |_| | | (_| | | _ < | |
\____\__,_|_|_| .__/ \__|_| \__,_| |_| \_\|_|
|_|
"#;

#[no_mangle]
#[allow(clippy::empty_loop)]
Expand Down Expand Up @@ -72,15 +79,15 @@ pub extern "C" fn entry_point() -> ! {
}

drivers.run_reset_flow().unwrap_or_else(|e| {
cprintln!("[rt] failed reset flow");
cprintln!("[rt] Runtime failed reset flow");
handle_fatal_error(e.into());
});

if !drivers.persistent_data.get().fht.is_valid() {
cprintln!("[rt] can't load FHT");
cprintln!("[rt] Runtime can't load FHT");
handle_fatal_error(caliptra_drivers::CaliptraError::RUNTIME_HANDOFF_FHT_NOT_LOADED.into());
}
cprintln!("[rt] listening for commands...");
cprintln!("[rt] Runtime listening for mailbox commands...");
if let Err(e) = caliptra_runtime::handle_mailbox_commands(&mut drivers) {
handle_fatal_error(e.into());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,14 @@ fn fake_boot_test() {
assert_output_contains(&output, "Running Caliptra ROM");
assert_output_contains(&output, "[fake-rom-cold-reset]");
assert_output_contains(&output, "Running Caliptra FMC");
assert_output_contains(&output, r#"Caliptra RT"#);
assert_output_contains(
&output,
r#"
/ ___|__ _| (_)_ __ | |_ _ __ __ _ | _ \_ _|
| | / _` | | | '_ \| __| '__/ _` | | |_) || |
| |__| (_| | | | |_) | |_| | | (_| | | _ < | |
\____\__,_|_|_| .__/ \__|_| \__,_| |_| \_\|_|"#,
);

let payload = MailboxReqHeader {
chksum: caliptra_common::checksum::calc_checksum(u32::from(CommandId::GET_LDEV_CERT), &[]),
Expand Down
14 changes: 11 additions & 3 deletions test/tests/caliptra_integration_tests/smoke_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ fn smoke_test() {
.unwrap();

if firmware::rom_from_env() == &firmware::ROM_WITH_UART {
hw.step_until_output_contains("[rt] listening for commands...\n")
hw.step_until_output_contains("[rt] Runtime listening for mailbox commands...\n")
.unwrap();

let output = hw.output().take(usize::MAX);
assert_output_contains(&output, "Running Caliptra ROM");
assert_output_contains(&output, "[cold-reset]");
Expand All @@ -250,7 +251,14 @@ fn smoke_test() {
assert_output_contains(&output, "[kat] LMS");
assert_output_contains(&output, "[kat] --");
assert_output_contains(&output, "Running Caliptra FMC");
assert_output_contains(&output, r#"Caliptra RT"#);
assert_output_contains(
&output,
r#"
/ ___|__ _| (_)_ __ | |_ _ __ __ _ | _ \_ _|
| | / _` | | | '_ \| __| '__/ _` | | |_) || |
| |__| (_| | | | |_) | |_| | | (_| | | _ < | |
\____\__,_|_|_| .__/ \__|_| \__,_| |_| \_\|_|"#,
);
}

let ldev_cert_resp = hw.mailbox_execute_req(GetLdevCertReq::default()).unwrap();
Expand Down Expand Up @@ -781,7 +789,7 @@ fn test_rt_wdt_timeout() {
hw.step_until_boot_status(RUNTIME_BOOT_STATUS_READY, true);
let fmc_target = hw.output().sink().now();

let rt_wdt_timeout_cycles = fmc_target - wdt_start - 2_000;
let rt_wdt_timeout_cycles = fmc_target - wdt_start - 5_000;
drop(hw);

let security_state = *caliptra_hw_model::SecurityState::default().set_debug_locked(true);
Expand Down

0 comments on commit 0ba785d

Please sign in to comment.