Hello Tom!

I have found the memory allocation issue.

src/common/board_f.c:

In function initcall_run_f() there will be fdtdec_setup() called
BEFORE the memory allocate functions are initialized. Placing
INITCALL(initf_malloc) before INITCALL(fdtdec_setup) fixes the
issue. fdtdec_setup() also calls the bloblist functions which
try to allocate some memory, but because the memory allocation
system isn't initialized yet (current source) it fails.

But I don't know if this breaks other systems or boards.


On 2/24/26 8:52 PM, Tom Rini wrote:
On Tue, Feb 24, 2026 at 07:51:22PM +0000, Johannes Krottmayer wrote:
Hello Tom!

On 2/24/26 8:33 PM, Tom Rini wrote:
On Tue, Feb 24, 2026 at 07:23:54PM +0000, Johannes Krottmayer wrote:
Hello Tom!

On 2/24/26 6:09 PM, Tom Rini wrote:
On Tue, Feb 24, 2026 at 10:26:35AM +0000, Johannes Krottmayer wrote:

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environ
ment, but get
some error messages in SPL:

--
Bloblist at 0 not found (err=-2)
alloc space exhausted ptr 400 limit 0
Bloblist at 0 not found (err=-2)


U-Boot 2026.01 (Feb 24 2026 - 10:22:15 +0100)
[...]
--

Started the QEMU instance with the command line:
$ qemu-system-aarch64 -m 4G -machine virt -cpu cortex-a53 /
bios u-boot.bin
$

Also the same errors when I use TF-A and OP-TEE with enabled
EL3 and EL2 in QEMU and "u-boot.bin" as BL33.

Has somebody noticed the same issue?

I used the configuration "qemu_arm64_defconfig"
.

That's odd. We run it in CI, but as cortex-a57 not a53 with otherwise
similar arguments. Running with TF-A/OP-TEE is also in CI, but more
difficult to configure.


I have tried it now with the Cortex-A57 but running into the same
issue
without OP-TEE and TF-A. Using OP-TEE and TF-A works now
without the issue because I have forgotten to pass the option
TRANSFER_LIST=1 to TF-A and CFG_TRANSFER_LIST=y and
CFG_MAP_EXT_DT_SECURE=y to OP-TEE.

Host OS: Debian 13 (Trixie)
QEMU version:
$ qemu-system-aarch64 --version
QEMU emulator version 10.0.7 (Debian 1:10.0.7+ds-0+deb13u1+b1)
Copyright (c) 2003-2025 Fabrice Bellard and the QEMU Project developers
$

BTW: doc/board/emulation/qemu-arm.rst doesn't mention how to build
U-Boot with OP-TEE and TF-A. Should I include the build steps into the
docs and create a patch for the doc? I think it's also useful for
other users.

Yes, some doc updates woul
d be appreciated and please CC the board
maintainers as well. And perhaps the question I forgot to ask earlier
is, are you seeing those as fatal errors, or just noting they exist?


My personal opinion:

I s
ee the "bloblist not found" personally only as
warning. But I think the memory allocation issue should be
investigated and maybe fixed, because I think it could have
site effects.

But I don't know the memory allocation code fully from U-Boot,
so therefore the "site effects" is only a guess as normal user.

Ah, yes, thank you. Yes, it's a bit scarrier of a message than is
warranted and we should look in to clarifying things. I seem to recall
it's just what happens in the case of having started and no bloblist
found, but not expected. I'll dig around a bit more myself now.


--
Kind regards,

Johannes K.

Attachment: publickey - [email protected] - 0x1A5D6E0E.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to