
On 11/1/21 17:23, Ricardo Salveti wrote:
On Thu, Oct 14, 2021 at 4:15 AM Michal Simek michal.simek@xilinx.com wrote:
On 10/13/21 15:48, Jorge Ramirez-Ortiz wrote:
When boot.bin is configured for secure boot the CSU will disable the JTAG interface on all cases.
Some boards might rely on this interface for flashing to QSPI in which case those systems might end up bricked during development.
This commit will restore the interface under CSU control
Signed-off-by: Jorge Ramirez-Ortiz jorge@foundries.io
v3: delete unvalid removal of empty line
arch/arm/mach-zynqmp/Kconfig | 8 +++++ arch/arm/mach-zynqmp/include/mach/hardware.h | 31 +++++++++++++++----- board/xilinx/zynqmp/zynqmp.c | 19 ++++++++++++ 3 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-zynqmp/Kconfig b/arch/arm/mach-zynqmp/Kconfig index f7b08db355..ee0895d9a2 100644 --- a/arch/arm/mach-zynqmp/Kconfig +++ b/arch/arm/mach-zynqmp/Kconfig @@ -149,6 +149,14 @@ config SPL_ZYNQMP_ALT_BOOTMODE_ENABLED Overwrite bootmode selected via boot mode pins to tell SPL what should be the next boot device.
+config SPL_ZYNQMP_RESTORE_JTAG
bool "Restore JTAG"
depends on SPL
help
Booting SPL in secure mode causes the CSU to disable the JTAG interface
even if no eFuses were burnt. This option restores the interface if
possible.
here should be tab and 2 spaces.
I have fixed it myself and applied.
I see this is applied at your next tree, but there is one minor issue which is fixed with the patch bellow:
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index dfb5dab7afa..2b5239ccb47 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -394,7 +394,7 @@ int board_init(void) printf("Silicon version:\t%d\n", zynqmp_get_silicon_version());
/* the CSU disables the JTAG interface when secure boot is enabled */
if (CONFIG_IS_ENABLED(SPL_ZYNQMP_RESTORE_JTAG))
#else if (CONFIG_IS_ENABLED(DM_I2C) && CONFIG_IS_ENABLED(I2C_EEPROM))if (CONFIG_IS_ENABLED(ZYNQMP_RESTORE_JTAG)) restore_jtag();
Do you want me to send a patch directly to you or do you prefer to squash the changes as it seems this wasn't asked to be merged upstream yet?
Please send regular patch.
Thanks, Michal