@@ -98,6 +98,11 @@ _CONFIGS = {
9898 for name , position in _POSITIONS .items ()
9999]
100100
101+ # Important note: many of the tests in this file modify the owner
102+ # configuration and/or expect an empty owner configuration when
103+ # starting the test. Currently, the only way to clear this configuration
104+ # is to clear the bitstream.
105+
101106[
102107 opentitan_test (
103108 name = "rescue_firmware_{}_{}" .format (name , protocol ),
@@ -110,7 +115,7 @@ _CONFIGS = {
110115 binaries = {
111116 ":boot_test_{}" .format (name ): "payload" ,
112117 },
113- changes_otp = True ,
118+ changes_otp = True , # See important note at the top
114119 params = config ["params" ],
115120 rom_ext = config ["rom_ext" ],
116121 setup = config ["setup" ],
@@ -171,7 +176,7 @@ genrule(
171176 ":boot_test_{}" .format (name ): "payload" ,
172177 ":bad_rom_ext" : "bad_rom_ext" ,
173178 },
174- changes_otp = True ,
179+ changes_otp = True , # See important note at the top
175180 exit_failure = _RESCUE_ROMEXT_RESULTS [name == rxslot ]["failure" ],
176181 exit_success = _RESCUE_ROMEXT_RESULTS [name == rxslot ]["success" ].format (slot = name ),
177182 image_name = "/tmp/rescue_rom_ext_{}.img" .format (name ),
@@ -211,7 +216,7 @@ genrule(
211216 ":boot_test_slot_a" : "slot_a" ,
212217 ":boot_test_slot_b" : "slot_b" ,
213218 },
214- changes_otp = True ,
219+ changes_otp = True , # See important note at the top
215220 params = config ["params" ],
216221 rom_ext = config ["rom_ext" ],
217222 setup = config ["setup" ],
@@ -251,7 +256,7 @@ genrule(
251256 ":boot_test_slot_a" : "slot_a" ,
252257 ":boot_test_slot_b" : "slot_b" ,
253258 },
254- changes_otp = True ,
259+ changes_otp = True , # See important note at the top
255260 params = config ["params" ],
256261 rom_ext = config ["rom_ext" ],
257262 setup = config ["setup" ],
@@ -293,7 +298,7 @@ genrule(
293298 binaries = {
294299 ":boot_test_slot_a" : "payload" ,
295300 },
296- changes_otp = True ,
301+ changes_otp = True , # See important note at the top
297302 rate = rate ,
298303 test_cmd = """
299304 --exec="transport init"
@@ -328,7 +333,7 @@ genrule(
328333 binaries = {
329334 ":boot_test_slot_a" : "payload" ,
330335 },
331- changes_otp = True ,
336+ changes_otp = True , # See important note at the top
332337 rate = rate ,
333338 test_cmd = """
334339 --exec="transport init"
@@ -369,7 +374,7 @@ opentitan_test(
369374 binaries = {
370375 ":boot_test_slot_a" : "payload" ,
371376 },
372- changes_otp = True ,
377+ changes_otp = True , # See important note at the top
373378 rom_ext = "//sw/device/silicon_creator/rom_ext/e2e/rescue/testdata:rom_ext_rescue_protocol_0" ,
374379 test_cmd = """
375380 --exec="transport init"
@@ -396,7 +401,7 @@ opentitan_test(
396401 "//hw/top_earlgrey:fpga_cw340_rom_ext" : None ,
397402 },
398403 fpga = fpga_params (
399- changes_otp = True ,
404+ changes_otp = True , # See important note at the top
400405 rom_ext = "//sw/device/silicon_creator/rom_ext:rom_ext_xmodem_timeout" ,
401406 test_cmd = """
402407 --exec="transport init"
@@ -438,7 +443,7 @@ opentitan_test(
438443 "//hw/top_earlgrey:fpga_cw340_rom_ext" : None ,
439444 },
440445 fpga = fpga_params (
441- changes_otp = True ,
446+ changes_otp = True , # See important note at the top
442447 # We configure OTP to preserve the reset reason and set the watchdog timeout
443448 # to one second.
444449 otp = "//sw/device/silicon_creator/rom_ext/e2e:otp_img_secret2_locked_preserve_reset_prod" ,
@@ -477,7 +482,7 @@ opentitan_test(
477482 "//hw/top_earlgrey:fpga_cw340_rom_ext" : None ,
478483 },
479484 fpga = fpga_params (
480- changes_otp = True ,
485+ changes_otp = True , # See important note at the top
481486 exit_failure = "ok: " ,
482487 exit_success = "error: mode not allowed" ,
483488 rom_ext = "//sw/device/silicon_creator/rom_ext:rom_ext_xmodem_restricted_commands" ,
@@ -515,7 +520,7 @@ opentitan_test(
515520 "//hw/top_earlgrey:fpga_cw340_rom_ext" : None ,
516521 },
517522 fpga = fpga_params (
518- changes_otp = True ,
523+ changes_otp = True , # See important note at the top
519524 params = "-p spi-dfu -t gpio -v +Ioa2" ,
520525 rom_ext = "//sw/device/silicon_creator/rom_ext:rom_ext_spidfu_restricted_commands" ,
521526 setup = "--exec=\" gpio set --mode OpenDrain Ioa2\" " ,
@@ -547,7 +552,7 @@ opentitan_test(
547552 },
548553 fpga = fpga_params (
549554 assemble = "" ,
550- changes_otp = True ,
555+ changes_otp = True , # See important note at the top
551556 exit_success = "BFV:05525304\r \n " ,
552557 rom_ext = config .get (
553558 "alt_rom_ext" ,
@@ -580,7 +585,7 @@ opentitan_test(
580585 },
581586 fpga = fpga_params (
582587 assemble = "" ,
583- changes_otp = True ,
588+ changes_otp = True , # See important note at the top
584589 params = config ["params" ],
585590 rom_ext = config ["rom_ext" ],
586591 test_cmd = """
@@ -603,7 +608,7 @@ opentitan_test(
603608 },
604609 fpga = fpga_params (
605610 assemble = "" ,
606- changes_otp = True ,
611+ changes_otp = True , # See important note at the top
607612 device_id = DEVICE_ID ,
608613 params = config ["params" ],
609614 rom_ext = config ["rom_ext" ],
@@ -632,7 +637,7 @@ opentitan_test(
632637 config ["rom_ext" ]: "romext" ,
633638 "//sw/device/silicon_creator/rom_ext/e2e/attestation:print_certs" : "firmware" ,
634639 },
635- changes_otp = True ,
640+ changes_otp = True , # See important note at the top
636641 params = config ["params" ],
637642 test_cmd = """
638643 --clear-bitstream
@@ -657,7 +662,7 @@ opentitan_test(
657662 "//sw/device/silicon_creator/rom_ext:rom_ext_xmodem_rescue_disability" : "romext" ,
658663 "//sw/device/silicon_creator/rom_ext/e2e/attestation:print_certs" : "firmware" ,
659664 },
660- changes_otp = True ,
665+ changes_otp = True , # See important note at the top
661666 test_cmd = """
662667 --clear-bitstream
663668 --bootstrap={firmware}
@@ -679,7 +684,7 @@ opentitan_test(
679684 "//sw/device/silicon_creator/rom_ext:rom_ext_spidfu_rescue_disability" : "romext" ,
680685 "//sw/device/silicon_creator/rom_ext/e2e/attestation:print_certs" : "firmware" ,
681686 },
682- changes_otp = True ,
687+ changes_otp = True , # See important note at the top
683688 params = "-p spi-dfu -t gpio -v +Ioa2" ,
684689 test_cmd = """
685690 --clear-bitstream
@@ -885,7 +890,7 @@ opentitan_test(
885890 "//hw/top_earlgrey:fpga_cw340_rom_ext" : None ,
886891 },
887892 fpga = fpga_params (
888- changes_otp = True ,
893+ changes_otp = True , # See important note at the top
889894 exit_failure = "(FAIL|BFV:|mode: RESQ).*" ,
890895 rom_ext = "//sw/device/silicon_creator/rom_ext:rom_ext_dice_x509_slot_a" ,
891896 test_cmd = """
@@ -918,7 +923,7 @@ opentitan_test(
918923 "//hw/top_earlgrey:fpga_cw340_rom_ext" : None ,
919924 },
920925 fpga = fpga_params (
921- changes_otp = True ,
926+ changes_otp = True , # See important note at the top
922927 exit_success = "mode: RESQ" ,
923928 rom_ext = "//sw/device/silicon_creator/rom_ext:rom_ext_xmodem_enter_on_watchdog" ,
924929 test_cmd = """
0 commit comments