Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MLDSA addr to fht info test. #1883

Merged
merged 4 commits into from
Jan 13, 2025
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: 6 additions & 2 deletions fmc/tests/fmc_integration_tests/test_rtalias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ use caliptra_builder::{
};
use caliptra_common::{
memory_layout::{
ECC_FMCALIAS_TBS_ORG, ECC_LDEVID_TBS_ORG, FUSE_LOG_ORG, MEASUREMENT_LOG_ORG, PCR_LOG_ORG,
ECC_FMCALIAS_TBS_ORG, ECC_LDEVID_TBS_ORG, FUSE_LOG_ORG, MEASUREMENT_LOG_ORG,
MLDSA_FMCALIAS_TBS_ORG, MLDSA_LDEVID_TBS_ORG, PCR_LOG_ORG,
},
RomBootStatus::*,
};
Expand Down Expand Up @@ -95,14 +96,17 @@ fn test_fht_info() {

let data = hw.mailbox_execute(TEST_CMD_READ_FHT, &[]).unwrap().unwrap();
let fht = FirmwareHandoffTable::read_from_prefix(data.as_bytes()).unwrap();
// [TODO][CAP2] Add mldsa layout
assert_eq!(fht.ecc_ldevid_tbs_size, 552);
assert_eq!(fht.ecc_fmcalias_tbs_size, 753);
assert_eq!(fht.ecc_ldevid_tbs_addr, ECC_LDEVID_TBS_ORG);
assert_eq!(fht.ecc_fmcalias_tbs_addr, ECC_FMCALIAS_TBS_ORG);
assert_eq!(fht.pcr_log_addr, PCR_LOG_ORG);
assert_eq!(fht.meas_log_addr, MEASUREMENT_LOG_ORG);
assert_eq!(fht.fuse_log_addr, FUSE_LOG_ORG);
assert_eq!(fht.mldsa_ldevid_tbs_addr, MLDSA_LDEVID_TBS_ORG);
assert_eq!(fht.mldsa_fmcalias_tbs_addr, MLDSA_FMCALIAS_TBS_ORG);
assert_ne!(fht.mldsa_ldevid_tbs_size, 0);
mhatrevi marked this conversation as resolved.
Show resolved Hide resolved
assert_ne!(fht.mldsa_fmcalias_tbs_size, 0);
}

#[test]
Expand Down
2 changes: 2 additions & 0 deletions rom/dev/src/fht.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ pub fn initialize_fht(env: &mut RomEnv) {
manifest_load_addr: &pdata.manifest1 as *const _ as u32,
ecc_ldevid_tbs_addr: &pdata.ecc_ldevid_tbs as *const _ as u32,
ecc_fmcalias_tbs_addr: &pdata.ecc_fmcalias_tbs as *const _ as u32,
mldsa_ldevid_tbs_addr: &pdata.mldsa_ldevid_tbs as *const _ as u32,
mtimkovich marked this conversation as resolved.
Show resolved Hide resolved
mldsa_fmcalias_tbs_addr: &pdata.mldsa_fmcalias_tbs as *const _ as u32,
pcr_log_addr: &pdata.pcr_log as *const _ as u32,
meas_log_addr: &pdata.measurement_log as *const _ as u32,
fuse_log_addr: &pdata.fuse_log as *const _ as u32,
Expand Down