Arria10 HPS secure boot from FPGA
Hi,
For bootstrapping in production and as a rescue mechanism for 'bricked' boards, we use an FPGA image, with a U-boot image embedded in ROM. The FPGA image is loaded over JTAG and forces the HPS to boot the embedded image. This is working fine as long as we don't enforce secure boot of the HPS. To enforce secure boot, we program the encryption key and KAK and set the following fuses:
kak_src_uaf=0x01
kak_len=0
kak_key=...
authen_en=0x01
aes_en=0x01
dbg_disable_access=0x01
dbg_lock_JTAG=0x01
dbg_lock_DAP=0x01
dbg_lock_CPU0=0x01
dbg_lock_CPU1=0x01
dbg_lock_CS=0x01
dbg_lock_FPGA=0x01
With these settings, we can boot the signed and encrypted U-boot image from flash, but not if it's embedded in the FPGA ROM. I have also tried this on a board without the authen_en and aes_en fuses set. On such a board only the unsigned, unencrypted U-boot image successfully boots from FPGA. Trying signed and encrypted, signed and not encrypted or encrypted but not signed images all fail to boot.
How can we make this work? Are there any special steps we must perform to prepare a signed and encrypted bootloader to boot from FPGA? Do we need to enable something in the FPGA image itself?
Kind regards,
Robbe