Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This demonstration leverages AR68391 which details the sequence of register writes required to enable JTAG after a secure boot. For U-Boot to modify those registers it utilizes the PMU FW. In PMU FW (in pm_mmio_access.c) there is a filtering process that determines which registers can be accessed. The status of the filtering for the registers of interest is listed below. Modifications are required to enable access to the full set.

Operation

Reg Name

Symbol

Note

Xil_Out32(0xffca0038,0x3F);

jtag_sec

CSU_JTAG_SEC

Access enabled if
SECURE_ACCESS_VAL=1 defined

Xil_Out32(0xffca003C,0xFF);

jtag_dap_cfg

CSU_JTAG_DAP_CFG

Access enabled if
SECURE_ACCESS_VAL=1 defined

Xil_Out32(0xffca0030,0x3);

jtag_chain_cfg

CSU_JTAG_CHAIN_CFG

Access enabled if
SECURE_ACCESS_VAL=1 defined + patch applied

Xil_Out32(0xFF5E00B0,0x01002002);

DBG_LPD_CTRL

CRL_APB_DBG_LPD_CTRL

Patch required to enable access

Xil_Out32(0xFF5E0240,0x0);

RST_LPD_DBG

CRL_APB_RST_LPD_DBG

Patch required to enable access

Xil_Out32(0xFFCA3000,0x1);

Pcap_prog

CSU_PCAP_PROG_REG

Access enabled if
SECURE_ACCESS_VAL=1 defined

General Steps

  • It is assumed that you have a PetaLinux 2022.1 Project for the ZCU102 board

  • Configure the PMU FW to support modification of the registers of interest

    • Define the symbol

    • Apply the provided patch

  • Build the PetaLinux Project

  • Create the Boot Image

  • Deploy and Test on the ZCU102 boatdboard

Workflow

...

PetaLinux Project : It is assumed that this has been created.
Configure & Build : Incorporate changes to the PMU FW using build settings along with a patch.
Create Boot Image : Use of bootgen to create BOOT. BIN. Authentication uses boot header mode, encryption uses a BBRAM key. For other use cases, the example BIF will need to be modified accordingly.
Deploy & Test on the ZCU102 : Configure a terminal for the U-Boot shell, boot the board from an SD card with the created BOOT.BIN, verify that JTAG is disabled, issue the provided commands, verify that JTAG has been enabled.

...