Zynqmp: SPL loads from jtag but it gets stuck when run from SD

Álvaro G. M. alvaro at linenoise.info
Mon Oct 20 18:51:42 CEST 2025


Hi,

I'm trying to get u-boot SPL to load by itself, without using the Xilinx FSBL
workflow on a COTS board that fits an xczu7eg-ffvf1517. I export the XSA file
from Vivado and Petalinux is able to boot it with no issue. I use the same XSA
file to generate psu_init_gpl.c (minimized using zynqmp_psu_init_minimize.sh)
and pm_cfg_obj.c from Vitis and right now I'm using one of the prebuilt PMUFW
images from Luca Ceresoli at
https://github.com/lucaceresoli/zynqmp-pmufw-binaries/

Since my full project is a buildroot based one, I'm using buildroot to compile
u-boot, which eases most of the cross compiling issues and also
generates pm_cfg_obj.bin object for me, alongisde ARM trusted firmware bl31,
and such other things.

A few years ago I did exactly the same with another board, a full custom one,
that used a xczu4cg, so to ease the transition from one board to the other and 
before upgrading u-boot, I'm trying to load the same old u-boot version,
2022.04. Since the workflow is the same I was expecting this to work
without any issues. Sadly, I'm having a few of them.

So, what's happening is that when placing u-spl/boot.bin and u-boot.itb files
on the SD card, I get no output at all on the serial console, but I can see via
xsdb that the SPL is being executed but got stuck at hang():

xsdb% stop
Info: Cortex-A53 #0 (target 9) Stopped at 0xfffc6a2c (External Debug Request)
hang() at include/bootstage.h: 389
389: 	return 0;


I can set PC back to the start address and then it will proceed past this stage:

xsdb% rwr pc 0xfffc0000
xsdb% con

At the terminal:
<debug_uart>
### ERROR ### Please RESET the board ###


I understand that this is not orthodox at all, moving the PC like that, but
this just proves that SPL ELF file is there on the CPU, so I get why some
unspecified error may be occurring. However, if I just upload spl ELF file
through xsdb, then it somehow goes on further. This is with the SD card
removed from the board:


xsdb% rst -processor -clear-registers
Info: Cortex-A53 #0 (target 9) Stopped at 0xffff0000 (Reset Catch)
xsdb% dow spl/u-boot-spl 
Downloading Program --
/home/sslayer/Proyectos/ART/DAR/DAR.git/SAR/output/build/uboot-2022.04/spl/u-
boot-spl
	section, .text: 0xfffc0000 - 0xfffd0847
	section, .rodata: 0xfffd0850 - 0xfffd4008
	section, .dtb.init.rodata: 0xfffd4010 - 0xfffd4eff
	section, .data: 0xfffd4f00 - 0xfffd585f
	section, .u_boot_list: 0xfffd5860 - 0xfffd6357
	section, .image_copy_end: 0xfffd6358 - 0xfffd6357
	section, .end: 0xfffd6358 - 0xfffd6357
	section, .bss_start: 0x00000000 - 0xffffffffffffffff
	section, .bss: 0x00000000 - 0x00000167
	section, .bss_end: 0x00000168 - 0x00000167
100%    0MB   0.2MB/s  00:00    
Setting PC to Program Start Address 0xfffc0000
Successfully downloaded
/home/sslayer/Proyectos/ART/DAR/DAR.git/SAR/output/build/uboot-2022.04/spl/u-
boot-spl
xsdb% con


And this is serial output:

<debug_uart>

U-Boot SPL 2022.04 (Oct 20 2025 - 14:33:53 +0200)
PMUFW is not found - Please load it!

### ERROR ### Please RESET the board ###


If I let it boot from SD card and the proceed to upload SPL via xsdb,
then it is able to find PMUFW, which I assume has been placed in memory
during the SD card boot process:

xsdb% rst -processor -clear-registers
Info: Cortex-A53 #0 (target 9) Stopped at 0xffff0000 (External Debug Request)
xsdb% dow spl/u-boot-spl 
Downloading Program --
/home/sslayer/Proyectos/ART/DAR/DAR.git/SAR/output/build/uboot-2022.04/spl/u-
boot-spl
	section, .text: 0xfffc0000 - 0xfffd0847
	section, .rodata: 0xfffd0850 - 0xfffd4008
	section, .dtb.init.rodata: 0xfffd4010 - 0xfffd4eff
	section, .data: 0xfffd4f00 - 0xfffd585f
	section, .u_boot_list: 0xfffd5860 - 0xfffd6357
	section, .image_copy_end: 0xfffd6358 - 0xfffd6357
	section, .end: 0xfffd6358 - 0xfffd6357
	section, .bss_start: 0x00000000 - 0xffffffffffffffff
	section, .bss: 0x00000000 - 0x00000167
	section, .bss_end: 0x00000168 - 0x00000167
100%    0MB   0.2MB/s  00:00    
Setting PC to Program Start Address 0xfffc0000
Successfully downloaded
/home/sslayer/Proyectos/ART/DAR/DAR.git/SAR/output/build/uboot-2022.04/spl/u-
boot-spl
xsdb% con


And UART output is:

U-Boot SPL 2022.04 (Oct 20 2025 - 14:33:53 +0200)
PMUFW:	v1.1
Loading new PMUFW cfg obj (1984 bytes)
PMUFW no permission to change config object
Silicon version:	3
EL Level:	EL3
Secure Boot:	not authenticated, not encrypted
Multiboot:	0
Trying to boot from MMC2
spl: could not initialize mmc. error: -19
Trying to boot from MMC1
spl: could not initialize mmc. error: -19
SPL: Unsupported Boot Device!
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

So, it seems that the SoC is properly reading boot.bin from SD card,
is placing PMUFW somewhere in memory and it runs, but doesn't get to
show <debug_uart> message. Booting from JTAG succeeds in showing some
UART messages, and if PMUFW was loaded by the SoC from boot.bin file,
SPL is even able to find and load it.

I'm quite lost at the moment, specially because this very same procedure
is the one I used a couple of years ago and that I've replicated today.
The same workflow generates a boot.bin and u-boot.itb file that my old
board boots.

The only difference should be the different psu_init_gpl.c and pm_cfg_obj.c
files, but they are obtained the same way using Xilinx' tools.

I'll be trying directly with master or latest official release of u-boot,
but I'm not sure if that'll help, as it seems I'm doing something wrong,
given that the same procedure on the other board works fine... I dunno.

Any help would be greatly appreciated.

Thanks


More information about the U-Boot mailing list