Skip to content

Commit 9d7b380

Browse files
clundin25jhand2
authored andcommitted
Space optimization
1 parent ca892b8 commit 9d7b380

File tree

5 files changed

+10
-31
lines changed

5 files changed

+10
-31
lines changed

runtime/src/drivers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl Drivers {
232232
}
233233
match result {
234234
Ok(_) => {
235-
cprintln!("Disabled attest : DPE valid fail");
235+
cprintln!("Disabled attest: DPE valid fail");
236236
// store specific validation error in CPTRA_FW_EXTENDED_ERROR_INFO
237237
drivers.soc_ifc.set_fw_extended_error(e.get_error_code());
238238
caliptra_drivers::report_fw_error_non_fatal(

runtime/src/main.rs

+5-12
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,7 @@ use core::hint::black_box;
2828
#[cfg(feature = "std")]
2929
pub fn main() {}
3030

31-
const BANNER: &str = r#"
32-
____ _ _ _ ____ _____
33-
/ ___|__ _| (_)_ __ | |_ _ __ __ _ | _ \_ _|
34-
| | / _` | | | '_ \| __| '__/ _` | | |_) || |
35-
| |__| (_| | | | |_) | |_| | | (_| | | _ < | |
36-
\____\__,_|_|_| .__/ \__|_| \__,_| |_| \_\|_|
37-
|_|
38-
"#;
31+
const BANNER: &str = "Caliptra RT";
3932

4033
#[no_mangle]
4134
#[allow(clippy::empty_loop)]
@@ -57,7 +50,7 @@ pub extern "C" fn entry_point() -> ! {
5750

5851
let mut drivers = unsafe {
5952
Drivers::new_from_registers().unwrap_or_else(|e| {
60-
cprintln!("[rt] Runtime can't load drivers");
53+
cprintln!("[rt] RT can't load drivers");
6154
handle_fatal_error(e.into());
6255
})
6356
};
@@ -79,15 +72,15 @@ pub extern "C" fn entry_point() -> ! {
7972
}
8073

8174
drivers.run_reset_flow().unwrap_or_else(|e| {
82-
cprintln!("[rt] Runtime failed reset flow");
75+
cprintln!("[rt] RT failed reset flow");
8376
handle_fatal_error(e.into());
8477
});
8578

8679
if !drivers.persistent_data.get().fht.is_valid() {
87-
cprintln!("[rt] Runtime can't load FHT");
80+
cprintln!("[rt] RT can't load FHT");
8881
handle_fatal_error(caliptra_drivers::CaliptraError::RUNTIME_HANDOFF_FHT_NOT_LOADED.into());
8982
}
90-
cprintln!("[rt] Runtime listening for mailbox commands...");
83+
cprintln!("[rt] RT listening for mailbox commands...");
9184
if let Err(e) = caliptra_runtime::handle_mailbox_commands(&mut drivers) {
9285
handle_fatal_error(e.into());
9386
}

test/tests/caliptra_integration_tests/fake_collateral_boot_test.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,7 @@ fn fake_boot_test() {
9393
assert_output_contains(&output, "Running Caliptra ROM");
9494
assert_output_contains(&output, "[fake-rom-cold-reset]");
9595
assert_output_contains(&output, "Running Caliptra FMC");
96-
assert_output_contains(
97-
&output,
98-
r#"
99-
/ ___|__ _| (_)_ __ | |_ _ __ __ _ | _ \_ _|
100-
| | / _` | | | '_ \| __| '__/ _` | | |_) || |
101-
| |__| (_| | | | |_) | |_| | | (_| | | _ < | |
102-
\____\__,_|_|_| .__/ \__|_| \__,_| |_| \_\|_|"#,
103-
);
96+
assert_output_contains(&output, "Caliptra RT");
10497

10598
let payload = MailboxReqHeader {
10699
chksum: caliptra_common::checksum::calc_checksum(u32::from(CommandId::GET_LDEV_CERT), &[]),

test/tests/caliptra_integration_tests/jtag_test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ fn gdb_test() {
121121
.unwrap();
122122

123123
hw.step();
124-
hw.step_until_output_contains("[rt] Runtime listening for mailbox commands...\n")
124+
hw.step_until_output_contains("[rt] RT listening for mailbox commands...\n")
125125
.unwrap();
126126

127127
#[cfg(feature = "fpga_realtime")]

test/tests/caliptra_integration_tests/smoke_test.rs

+2-9
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fn smoke_test() {
235235
.unwrap();
236236

237237
if firmware::rom_from_env() == &firmware::ROM_WITH_UART {
238-
hw.step_until_output_contains("[rt] Runtime listening for mailbox commands...\n")
238+
hw.step_until_output_contains("[rt] RT listening for mailbox commands...\n")
239239
.unwrap();
240240

241241
let output = hw.output().take(usize::MAX);
@@ -251,14 +251,7 @@ fn smoke_test() {
251251
assert_output_contains(&output, "[kat] LMS");
252252
assert_output_contains(&output, "[kat] --");
253253
assert_output_contains(&output, "Running Caliptra FMC");
254-
assert_output_contains(
255-
&output,
256-
r#"
257-
/ ___|__ _| (_)_ __ | |_ _ __ __ _ | _ \_ _|
258-
| | / _` | | | '_ \| __| '__/ _` | | |_) || |
259-
| |__| (_| | | | |_) | |_| | | (_| | | _ < | |
260-
\____\__,_|_|_| .__/ \__|_| \__,_| |_| \_\|_|"#,
261-
);
254+
assert_output_contains(&output, "Caliptra RT");
262255
}
263256

264257
let ldev_cert_resp = hw.mailbox_execute_req(GetLdevCertReq::default()).unwrap();

0 commit comments

Comments
 (0)