Skip to content

Commit ad9fdba

Browse files
luismarquesAlexJones0
authored andcommitted
Fix OTP descrambling test (otp_ctrl_descrambling_test)
Fixes some prints in `otp_ctrl_descrambling_test.c` and updates the list of supported execution environments. Signed-off-by: Luís Marques <[email protected]> (cherry picked from commit d5b8e0a)
1 parent 1a1b939 commit ad9fdba

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

sw/device/tests/BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2365,12 +2365,21 @@ opentitan_test(
23652365
"//hw/top_earlgrey:sim_dv": None,
23662366
"//hw/top_earlgrey:sim_verilator": None,
23672367
"//hw/top_earlgrey:fpga_cw310_test_rom": None,
2368+
"//hw/top_earlgrey:fpga_cw310_rom_with_fake_keys": None,
2369+
"//hw/top_earlgrey:fpga_cw310_sival": None,
2370+
"//hw/top_earlgrey:fpga_cw340_test_rom": None,
2371+
"//hw/top_earlgrey:fpga_cw340_rom_with_fake_keys": None,
2372+
"//hw/top_earlgrey:fpga_cw340_sival": None,
2373+
"//hw/top_earlgrey:sim_qemu_rom_with_fake_keys": None,
23682374
# This test is not expected to run on silicon, as it would require a very specific OTP configuration that is only useful for this test.
23692375
},
23702376
),
23712377
fpga = fpga_params(
23722378
otp = ":otp_ctrl_descrambling_otp_image",
23732379
),
2380+
qemu = qemu_params(
2381+
otp = ":otp_ctrl_descrambling_otp_image",
2382+
),
23742383
deps = [
23752384
"//hw/top_earlgrey/sw/autogen:top_earlgrey",
23762385
"//sw/device/lib/base:macros",

sw/device/tests/otp_ctrl_descrambling_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ size_t compare_dword(const uint64_t *actual_arr, uint32_t part_idx,
5050
if (actual == expected) {
5151
return 0;
5252
} else {
53-
LOG_WARNING("SECRET%0d, dword %0d: 0x%08x%08x != 0x%08x%08x", part_idx,
53+
LOG_WARNING("SECRET%d, dword %d: 0x%08x%08x != 0x%08x%08x", part_idx,
5454
dword_idx, upper(actual), lower(actual), upper(expected),
5555
lower(expected));
5656
return 1;
@@ -74,7 +74,7 @@ bool test_main(void) {
7474
const partition_data_t *partition = &kPartitions[i];
7575
uint64_t readout[partition->size];
7676

77-
LOG_INFO("Checking partition SECRET%0d.", i);
77+
LOG_INFO("Checking partition SECRET%d.", i);
7878
CHECK_STATUS_OK(otp_ctrl_testutils_dai_read64_array(
7979
&otp_ctrl, partition->partition, 0, readout, ARRAYSIZE(readout)));
8080

0 commit comments

Comments
 (0)