Skip to content

Commit 478e8f6

Browse files
committed
caliptra_ss_fuse_ctrl_init_fail fix
Fix to the address bounds in the partition and to the expected error sent to `wait_dai_op_idle()`
1 parent cbb8ca9 commit 478e8f6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/integration/test_suites/caliptra_ss_fuse_ctrl_init_fail/caliptra_ss_fuse_ctrl_init_fail.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ void init_fail() {
4242
CMD_FC_LCC_UNCORRECTABLE_FAULT
4343
};
4444

45+
const uint32_t partition_lower_addr_bound = partitions[SECRET_MANUF_PARTITION].address;
46+
const uint32_t partition_upper_addr_bound = partitions[SECRET_PROD_PARTITION_3].zer_address;
47+
4548
// Collect all buffered partitions with ECC enabled. Their content
4649
// will be read out after bringup which will trigger the ECC errors.
4750
partition_t part_sel[NUM_PARTITIONS];
@@ -56,7 +59,7 @@ void init_fail() {
5659
partition_t partition = part_sel[xorshift32() % count];
5760
uint32_t fault = faults[xorshift32() % 2];
5861

59-
if (partition.address > 0x40 && partition.address < 0xD0) {
62+
if (partition.address > partition_lower_addr_bound && partition.address < partition_upper_addr_bound) {
6063
grant_caliptra_core_for_fc_writes();
6164
} else {
6265
grant_mcu_for_fc_writes();
@@ -72,7 +75,7 @@ void init_fail() {
7275

7376
reset_fc_lcc_rtl();
7477
wait_dai_op_idle(
75-
fault == CMD_FC_LCC_CORRECTABLE_FAULT ? 1 << partition.index : 0x3FFFF
78+
fault == CMD_FC_LCC_CORRECTABLE_FAULT ? 1 << partition.index : OTP_CTRL_STATUS_LIFE_CYCLE_ERROR_MASK - 1 //0x3FFFFFF
7679
);
7780

7881
uint32_t err_reg = lsu_read_32(SOC_OTP_CTRL_ERR_CODE_RF_ERR_CODE_0 + 0x4*partition.index);

0 commit comments

Comments
 (0)