Skip to content

Commit

Permalink
Add MLDSA addr to fht info test. (#1883)
Browse files Browse the repository at this point in the history
  • Loading branch information
mtimkovich authored Jan 13, 2025
1 parent 934323e commit 12af58e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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);
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,
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

0 comments on commit 12af58e

Please sign in to comment.