Skip to contentSkip to conversation

QEMU: arm64: bloblist not found and alloc space exhausted

PATCH Superseded Johannes Krottmayer 4 participants 17 messages Feb 24 – Apr 20

lore
Share & tools
lore
#0 lore raw

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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".

Signature · 3 lines
Kind regards,

Johannes K.
#1 lore raw
Quoted 20 lines · Johannes Krottmayer

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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
$
Quoted 6 lines

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.

Signature · 1 line
Tom
#2 lore raw

Hello Tom!

Quoted 25 lines · Tom Rini
Quoted 23 lines · Johannes Krottmayer

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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.

Quoted 8 lines
Quoted 3 lines

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.

Signature · 3 lines
Kind regards,

Johannes K.
#3 lore raw
Quoted 50 lines · Johannes Krottmayer

Hello Tom!

Quoted 25 lines · Tom Rini
Quoted 23 lines · Johannes Krottmayer

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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.

Quoted 8 lines
Quoted 3 lines

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
$
Quoted 4 lines

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 would 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?

Signature · 1 line
Tom
#4 lore raw

Hello Tom!

Quoted 26 lines · Tom Rini
Quoted 25 lines · Johannes Krottmayer

Hello Tom!

Quoted 22 lines · Tom Rini
Quoted 20 lines · Johannes Krottmayer

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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
$
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

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"

.

Quoted 19 lines
Quoted 19 lines
Quoted 5 lines

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
$
Quoted 6 lines
Quoted 4 lines

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

Quoted 3 lines

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 see 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.

Signature · 3 lines
Kind regards,

Johannes K.
#5 lore raw
Quoted 68 lines · Johannes Krottmayer

Hello Tom!

Quoted 26 lines · Tom Rini
Quoted 25 lines · Johannes Krottmayer

Hello Tom!

Quoted 22 lines · Tom Rini
Quoted 20 lines · Johannes Krottmayer

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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
$
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

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"

.

Quoted 19 lines
Quoted 19 lines
Quoted 5 lines

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
$
Quoted 6 lines
Quoted 4 lines

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

Quoted 3 lines

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:

Quoted 7 lines

I see 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.

Signature · 1 line
Tom
#6 lore raw
In reply to Tom Rini

Hello Tom!

Quoted 26 lines · Tom Rini
Quoted 25 lines · Johannes Krottmayer

Hello Tom!

Quoted 22 lines · Tom Rini
Quoted 20 lines · Johannes Krottmayer

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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
$
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

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"

.

Quoted 19 lines
Quoted 19 lines
Quoted 5 lines

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
$
Quoted 6 lines
Quoted 4 lines

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

Quoted 3 lines

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?

I have created a pre-patch for the doc. As maintainer I see you with the script get_maintainer.pl:

$ ./scripts/get_maintainer.pl ./doc/board/emulation/qemu-arm.rst
Tom Rini <[email protected]> (maintainer:THE REST)
[email protected] (open list)
$

Created was the file by Tuomas Tynkkynen. Should I send (CC) the patch to him too?

Thanks in advance!

Signature · 3 lines
Kind regards,

Johannes K.
#7 lore raw
Quoted 69 lines · Johannes Krottmayer

Hello Tom!

Quoted 26 lines · Tom Rini
Quoted 25 lines · Johannes Krottmayer

Hello Tom!

Quoted 22 lines · Tom Rini
Quoted 20 lines · Johannes Krottmayer

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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
$
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

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"

.

Quoted 19 lines
Quoted 19 lines
Quoted 5 lines

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
$
Quoted 6 lines
Quoted 4 lines

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

Quoted 3 lines

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?

I have created a pre-patch for the doc. As maintainer I see you with the script get_maintainer.pl:

Quoted 7 lines
$ ./scripts/get_maintainer.pl ./doc/board/emulation/qemu-arm.rst
Tom Rini <[email protected]> (maintainer:THE REST)
[email protected] (open list)
$

Created was the file by Tuomas Tynkkynen. Should I send (CC) the patch to him too?

Yes please. And Tuomas, can you please update board/emulation/qemu-arm/MAINTAINERS to list the doc files as well?

Signature · 1 line
Tom
#8 lore raw

cover doc: emulation: qemu-arm: add secure state steps

I added some initial build steps how to build TF-A and OP-TEE with U-Boot and run U-Boot with the specified option in secure state (enabled EL3) in a QEMU instance. Currently I only added the build steps for AArch64.

I also add a note the current used version from OP-TEE:

CROSS_COMPILE will be no longer accepted. To successful build OP-TEE for AArch64 the variables CROSS_COMPILE64 and CROSS_COMPILE32 must be set. The AArch64 built also needs the 32-Bit edition from the ARM toolchains, otherwise the building fails. Current version is v4.9.0.

TF-A v2.14.0:

Sine at least version v2.14.0 the build system creates a binary (qemu_fw.bios) which can passed directly to QEMU. I also added the steps how to create an image from bl1.bin and fip.bin with dd, if qemu_fw.bios isn't created.

Johannes Krottmayer (1):
doc: emulation: qemu-arm: add secure state steps

 doc/board/emulation/qemu-arm.rst | 86 ++++++++++++++++++++++++++++++--
 1 file changed, 82 insertions(+)

, 4 deletions(-)

Signature · 1 line
2.47.3
#9 lore raw

PATCH 1/1 doc: emulation: qemu-arm: add secure state steps

Add build steps for building U-Boot in secure state with TF-A and OP-TEE. It includes the full steps for building OP-TEE and TF-A to use with U-Boot. Also a short description how to invoke QEMU with enabled EL3 and EL2. EL3 (machine option secure=on) is required to run TF-A.

---
 doc/board/emulation/qemu-arm.rst | 86 ++++++++++++++++++++++++++++++--
 1 file changed, 82 insertions(+), 4 deletions(-)
doc/board/emulation/qemu-arm.rst +37 -3
index 1c91c7f3ac6..017dbab3831 100644
@@ -24,8 +24,76 @@ Additionally, a number of optional peripherals can be added to the PCI bus.
 See :doc:`../../develop/devicetree/dt_qemu` for information on how to see
 the devicetree actually generated by QEMU.
 
-Building U-Boot
-------
---------
+Building (secure)
+-----------------
+
+U-Boot
+^^^^^^
+
+- For AArch64::
+
+    make qemu_arm64_defconfig
+    make
+
+On successful build 'u-boot.bin' should be created. It's necessary in the following steps
+(building TF-A).
+
+OT-TEE
+^^^^^^
+
+- For AArch64::
+
+    git clone https://github.com/OP-TEE/optee_os.git
+    cd optee_os
+    export CROSS_COMPILE64=aarch64-none-elf-
+    export CROSS_COMPILE32=arm-none-eabi-
+    make PLATFORM=vexpress-qemu_armv8a CFG_TRANSFER_LIST=y CFG_MAP_EXT_DT_SECURE=y
+
+At least OP-TEE v4.9.0 for AArch64 needs both compiler (64-Bit and 32-Bit edition) for a
+successful build. On a successful build following files should be created under the directory
+'out/arm-plat-vexpress/core' from OP-TEE::
+
+    optee_os/out/arm-plat-vexpress/core/tee-header_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pageable_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pager_v2.bin
+
+TF-A
+^^^^
+
+- For AArch64

::
+

+    git clone https://github.com/ARM-software/arm-trusted-firmware.git
+    cd arm-trusted-firmware
+    git submodule update --init
+    export CROSS_COMPILE=aarch64-none-elf-
+    export BL32=path/to/tee-header_v2.bin
+    export BL32_EXTRA1=path/to/tee-pager_v2.bin
+    export BL32_EXTRA2=path/to/tee-pageable_v2.bin
+    export BL33=path/to/u-boot.bin
+    make PLAT=qemu BL32_RAM_LOCATION=tdram SPD=opteed TRANSFER_LIST=1 all fip

+
+On successful build the following files should be created under the directory +'build/qemu/release' from TF-A::
+
+ arm-trusted-firmware/build/qemu/release/bl1.bin
+ arm-trusted-firmware/build/qemu/release/fip.bin
+
+The following file is at least created with TF-A v2.14.0 and can directly passed +with the '-bios' option to QEMU::
+
+ arm-trusted-firmware/build/qemu/release/qemu_fw.bios
+
+If the single file doesn't exists 'bl1.bin' and 'fip.bin' can be concatenated with the +command 'dd' alternatively::
+
+ dd
if=bl1.bin of=flash.bin bs=4096 conv=notrunc
+ dd if=fip.bin of=flash.bin seek=64 bs=4096 conv=notrunc
+
+Building (none-secure)
+----------------------
+
+U-Boot
+^^^^^^
Set the CROSS_COMPILE environment variable as usual, and run:

- For ARM::
@@ -38,8 +106,18 @@ Set the CROSS_COMPILE environment variable as usual, and run:
make qemu_arm64_defconfig
make

-Running U-Boot
---------------
+Running U-Boot (secure)
+-----------------------
+
+- For AArch64::
+
+ qemu-system-aarch64 -machine virt,secure=on,virtualization=on \
+ -nographic -cpu cortex-a57 -bios qemu_fw.bios
+
+For additional QEMU command description see running U-Boot in none-secure state. +
+Running U-Boot (none-secure)
+----------------------------
The minimal QEMU command line to get U-Boot up and running is:

- For ARM::

Signature · 1 line
2.47.3
#10 lore raw

Re: [PATCH 1/1] doc: emulation: qemu-arm: add secure state steps

Quoted 9 lines · Johannes Krottmayer

Add build steps for building U-Boot in secure state with TF-A and OP-TEE. It includes the full steps for building OP-TEE and TF-A to use with U-Boot. Also a short description how to invoke QEMU with enabled EL3 and EL2. EL3 (machine option secure=on) is required to run TF-A.

Hello Johannes,

Thank you for your suggestion to enhance the documentation.

Unfortunately your mail does not contain a valid patch.

Applying: doc: emulation: qemu-arm: add secure state steps
error: corrupt patch at line 53
Patch failed at 0001 doc: emulation: qemu-arm: add secure state step

Please, use git format-patch and resend the patch with git-email.

Best regards

Heinrich

Quoted 111 lines
---
  doc/board/emulation/qemu-arm.rst | 86 ++++++++++++++++++++++++++++++--
  1 file changed, 82 insertions(+), 4 deletions(-)
doc/board/emulation/qemu-arm.rst +37 -3
index 1c91c7f3ac6..017dbab3831 100644
@@ -24,8 +24,76 @@ Additionally, a number of optional peripherals can be added to the PCI bus.
  See :doc:`../../develop/devicetree/dt_qemu` for information on how to see
  the devicetree actually generated by QEMU.
 
-Building U-Boot
-------
---------
+Building (secure)
+-----------------
+
+U-Boot
+^^^^^^
+
+- For AArch64::
+
+    make qemu_arm64_defconfig
+    make
+
+On successful build 'u-boot.bin' should be created. It's necessary in the following steps
+(building TF-A).
+
+OT-TEE
+^^^^^^
+
+- For AArch64::
+
+    git clone https://github.com/OP-TEE/optee_os.git
+    cd optee_os
+    export CROSS_COMPILE64=aarch64-none-elf-
+    export CROSS_COMPILE32=arm-none-eabi-
+    make PLATFORM=vexpress-qemu_armv8a CFG_TRANSFER_LIST=y CFG_MAP_EXT_DT_SECURE=y
+
+At least OP-TEE v4.9.0 for AArch64 needs both compiler (64-Bit and 32-Bit edition) for a
+successful build. On a successful build following files should be created under the directory
+'out/arm-plat-vexpress/core' from OP-TEE::
+
+    optee_os/out/arm-plat-vexpress/core/tee-header_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pageable_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pager_v2.bin
+
+TF-A
+^^^^
+
+- For AArch64

::

doc/board/emulation/qemu-arm.rst +26 -0
+
+    git clone https://github.com/ARM-software/arm-trusted-firmware.git
+    cd arm-trusted-firmware
+    git submodule update --init
+    export CROSS_COMPILE=aarch64-none-elf-
+    export BL32=path/to/tee-header_v2.bin
+    export BL32_EXTRA1=path/to/tee-pager_v2.bin
+    export BL32_EXTRA2=path/to/tee-pageable_v2.bin
+    export BL33=path/to/u-boot.bin
+    make PLAT=qemu BL32_RAM_LOCATION=tdram SPD=opteed TRANSFER_LIST=1 all fip
+
+On successful build the following files should be created under the directory
+'build/qemu/release' from TF-A::
+
+    arm-trusted-firmware/build/qemu/release/bl1.bin
+    arm-trusted-firmware/build/qemu/release/fip.bin
+
+The following file is at least created with TF-A v2.14.0 and can directly passed
+with the '-bios' option to QEMU::
+
+    arm-trusted-firmware/build/qemu/release/qemu_fw.bios
+
+If the single file doesn't exists 'bl1.bin' and 'fip.bin' can be concatenated with the
+command 'dd' alternatively::
+
+    dd

if=bl1.bin of=flash.bin bs=4096 conv=notrunc

doc/board/emulation/qemu-arm.rst +19 -2
+    dd if=fip.bin of=flash.bin seek=64 bs=4096 conv=notrunc
+
+Building (none-secure)
+----------------------
+
+U-Boot
+^^^^^^
  Set the CROSS_COMPILE environment variable as usual, and run:
 
  - For ARM::
@@ -38,8 +106,18 @@ Set the CROSS_COMPILE environment variable as usual, and run:
      make qemu_arm64_defconfig
      make
 
-Running U-Boot
---------------
+Running U-Boot (secure)
+-----------------------
+
+- For AArch64::
+
+    qemu-system-aarch64 -machine virt,secure=on,virtualization=on \
+    -nographic -cpu cortex-a57 -bios qemu_fw.bios
+
+For additional QEMU command description see running U-Boot in none-secure state.
+
+Running U-Boot (none-secure)
+----------------------------
  The minimal QEMU command line to get U-Boot up and running is:
 
  - For ARM::
#11 lore raw

Re: [PATCH 1/1] doc: emulation: qemu-arm: add secure state steps

In reply to Johannes Krottmayer

Hi Johannes,

Quoted 12 lines · Johannes Krottmayer

doc: emulation: qemu-arm: add secure state steps

Add build steps for building U-Boot in secure state with TF-A and OP-TEE. It includes the full steps for building OP-TEE and TF-A to use with U-Boot. Also a short description how to invoke QEMU with enabled EL3 and EL2. EL3 (machine option secure=on) is required to run TF-A.

Quoted 5 lines

doc/board/emulation/qemu-arm.rst | 86 ++++++++++++++++++++++++++++++++++++++--

 1 file changed, 82 insertions(+), 4 deletions(-)

+OT-TEE
+^^^^^^

Typo: OP-TEE.

Quoted 2 lines

+Building (none-secure)
+----------------------

I suspect this should be non-secure is the conventional spelling - same for 'Running U-Boot (none-secure)' below.

Review

Quoted 2 lines
(quoted diff) +2 -0
+The following file is at least created with TF-A v2.14.0 and can directly passed
+with the '-bios' option to QEMU::

can be directly passed

Quoted 1 line

+If the single file doesn't exists 'bl1.bin' and 'fip.bin' can be concatenated with the

doesn't exist

Review

Quoted 2 lines
(quoted diff) +2 -0
+    dd if=bl1.bin of=flash.bin bs=4096 conv=notrunc
+    dd if=fip.bin of=flash.bin seek=64 bs=4096 conv=notrunc

Where does flash.bin come from?

Regards,
Simon

#12 lore raw

Re: [PATCH 1/1] doc: emulation: qemu-arm: add secure state steps

Hi Simon!

Thanks for the answer.

Quoted 21 lines · Simon Glass

Hi Johannes,

Quoted 12 lines · Johannes Krottmayer

doc: emulation: qemu-arm: add secure state steps

Add build steps for building U-Boot in secure state with TF-A and OP-TEE. It includes the full steps for building OP-TEE and TF-A to use with U-Boot. Also a short description how to invoke QEMU with enabled EL3 and EL2. EL3 (machine option secure=on) is required to run TF-A.

Quoted 5 lines

doc/board/emulation/qemu-arm.rst | 86 ++++++++++++++++++++++++++++++++++++++--

  1 file changed, 82 insertions(+), 4 deletions(-)

+OT-TEE
+^^^^^^

Quoted 6 lines

Typo: OP-TEE.

Quoted 2 lines

+Building (none-secure)
+----------------------

I suspect this should be non-secure is the conventional spellin

g -

Quoted 10 lines

same for 'Running U-Boot (none-secure)' below.

Review

Quoted 2 lines
(quoted diff) +2 -0
+The following file is at least created with TF-A v2.14.0 and can directly passed
+with the '-bios' option to QEMU::

can be directly passed

Quoted 1 line

+If the single file doesn't exists 'bl1.bin' and 'fip.bin' can be concatenated with the

doesn't exist

Thanks for the fixes. Corrected.

Quoted 4 lines

Review

Quoted 2 lines
(quoted diff) +2 -0
+    dd if=bl1.bin of=flash.bin bs=4096 conv=notrunc
+    dd if=fip.bin of=flash.bin seek=64 bs=4096 conv=notrunc

Where does flash.bin come from?

With 'flash.bin' I have meant the file 'qemu_fw.bios'. Yes, I agree it's not really clear. Have changed the part of the text and the file name:

---
If the single file ('qemu_fw.bios') doesn't exist 'bl1.bin' and 'fip.bin' can be concatenated with the command 'dd' alternatively::

dd if=bl1.bin of=qemu_fw.bios bs=4096 conv=notrunc dd if=fip.bin of=qemu_fw.bios seek=64 bs=4096 conv=notrunc
---

I will create and send a new patch, but before I need to know how these mail patches are applied. As Heinrich mentioned there was an error at a specific line, although I checked the patch before with the U-Boot script 'scripts/checkpatch.pl' and unfortunately there were no error and no warnings shown. Also sent the patch with 'git email'.

Is there a specific script how I can apply these mail patches on a local branch to test the patches before I can send them?

Thanks in advance!

Quoted 2 lines

Regards,
Simon

Kind regards,

Johannes K.

#13 lore raw

PATCH v2 1/1 doc: emulation: qemu-arm: add secure state steps

In reply to Simon Glass

Add build steps for building U-Boot in secure state with TF-A and OP-TEE. It includes the full steps for building OP-TEE and TF-A to use with U-Boot. Also a short description how to invoke QEMU with enabled EL3 and EL2. EL3 (machine option secure=on) is required to run TF-A.

---

Changes PATCH v2:
- Fix typo (OT-TEE -> OP-TEE)
- Fix grammatic and correct spellings
- Fix line warp and formatting
- Add 'git checkout' for the specific (tested) version in the used build commands
- Change misleading filename 'flash.bin' to 'qemu_fw.bios'

 doc/board/emulation/qemu-arm.rst | 88 ++++++++++++++++++++++++++++++--
 1 file changed, 84 insertions(+), 4 deletions(-)
doc/board renamed from doc/board/emulation/qemu-arm.rst +0 -0
index 1c91c7f3ac6..9e993ca9783 100644

/emulation/qemu-arm.rst
@@ -24,8 +24,78 @@ Additionally, a number of optional peripherals can be added to the PCI bus.
See :doc:../../develop/devicetree/dt_qemu for information on how to see
the devicetree actually generated by QEMU.

-Building U-Boot
----------------
+Building (secure)
+-----------------
+
+U-Boot
+^^^^^^
+
+- For AArch64::
+
+ make qemu_arm64_defconfig
+ make
+
+On successful build 'u-boot.bin' should be created. It's necessary in the following +steps (building TF-A).
+
+OP-TEE
+^^^^^^
+
+- For AArch64::
+

+    git clone https://github.com/OP-TEE/optee_os.git
+    cd optee_os
+    git checkout 4.9.0
+    export CROSS_COMPILE64=aarch64-none-elf-
+    export CROSS_COMPILE32=arm-none-eabi-
+    make PLATFORM=vexpress-qemu_armv8a CFG_TRANSFER_LIST=y CFG_MAP_EXT_DT_SECURE=y

+
+At least OP-TEE v4.9.0 for AArch64 needs both compiler (64-Bit and 32-Bit edition) for +a successful build. On a successful build following files should
be created under the
+directory 'out/arm-plat-vexpress/core' from OP-TEE::
+

+    optee_os/out/arm-plat-vexpress/core/tee-header_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pageable_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pager_v2.bin

+
+TF-A
+^^^^
+
+- For AArch64::
+

+    git clone https://github.com/ARM-software/arm-trusted-firmware.git
+    cd arm-trusted-firmware
+    git submodule update --init
+    git checkout v2.14.0
+    export CROSS_COMPILE=aarch64-none-elf-
+    export BL32=path/to/tee-header_v2.bin
+    export BL32_EXTRA1=path/to/tee-pager_v2.bin
+    export BL32_EXTRA2=path/to/tee-pageable_v2.bin
+    export BL33=path/to/u-boot.bin
+    make PLAT=qemu BL32_RAM_LOCATION=tdram SPD=opteed TRANSFER_LIST=1 all fip

+
+On successful build the following files should be created under the directory +'build/qemu/release' from TF-A::
+
+ arm-trusted-firmware/build/qemu/release/bl1.bin
+ arm-trusted-firmware/build/qemu/release/fip.b
in
+
+The following file is at least created with TF-A v2.14.0 and can be directly passed +with the '-bios' option to QEMU::
+
+ arm-trusted-firmware/build/qemu/release/qemu_fw.bios
+
+If the single file ('qemu_fw.bios') doesn't exist, 'bl1.bin' and 'fip.bin' can be +concatenated with the command 'dd' alternatively::
+
+ dd if=bl1.bin of=qemu_fw.bios bs=4096 conv=notrunc
+ dd if=fip.bin of=qemu_fw.bios seek=64 bs=4096 conv=notrunc
+
+Building (non-secure)
+---------------------
+
+U-Boot
+^^^^^^
Set the CROSS_COMPILE environment variable as usual, and run:

- For ARM::
@@ -38,8 +108,18 @@ Set the CROSS_COMPILE environment variable as usual, and run:
make qemu_arm64_defconfig
make

-Running U-Boot
---------------
+Running U-Boot (secure)
+-----------------------
+
+- For AArch64::
+
+ qemu-system-aarch64 -machine virt,secure=on,virtualization=on \
+ -nographic -cpu cortex-a57 -bios qemu_fw.bios
+
+For additional QEMU comman
d description see running U-Boot in non-secure state. +
+Running U-Boot (non-secure)
+---------------------------
The minimal QEMU command line to get U-Boot up and running is:

- For ARM::

Signature · 1 line
2.47.3
#14 lore raw

Re: [PATCH v2] doc: emulation: qemu-arm: add secure state steps

Quoted 125 lines · Johannes Krottmayer

Add build steps for building U-Boot in secure state with TF-A and OP-TEE. It includes the full steps for building OP-TEE and TF-A to use with U-Boot. Also a short description how to invoke QEMU with enabled EL3 and EL2. EL3 (machine option secure=on) is required to run TF-A.

---

Changes PATCH v2:
- Fix typo (OT-TEE -> OP-TEE)
- Fix grammatic and correct spellings
- Fix line warp and formatting
- Add 'git checkout' for the specific (tested) version in the used build commands
- Change misleading filename 'flash.bin' to 'qemu_fw.bios'

  doc/board/emulation/qemu-arm.rst | 88 ++++++++++++++++++++++++++++++--
  1 file changed, 84 insertions(+), 4 deletions(-)
doc/board renamed from doc/board/emulation/qemu-arm.rst +0 -0
index 1c91c7f3ac6..9e993ca9783 100644

/emulation/qemu-arm.rst

doc/board renamed from doc/board/emulation/qemu-arm.rst +28 -2
@@ -24,8 +24,78 @@ Additionally, a number of optional peripherals can be added to the PCI bus.
  See :doc:`../../develop/devicetree/dt_qemu` for information on how to see
  the devicetree actually generated by QEMU.
 
-Building U-Boot
----------------
+Building (secure)
+-----------------
+
+U-Boot
+^^^^^^
+
+- For AArch64::
+
+    make qemu_arm64_defconfig
+    make
+
+On successful build 'u-boot.bin' should be created. It's necessary in the following
+steps (building TF-A).
+
+OP-TEE
+^^^^^^
+
+- For AArch64::
+
+    git clone https://github.com/OP-TEE/optee_os.git
+    cd optee_os
+    git checkout 4.9.0
+    export CROSS_COMPILE64=aarch64-none-elf-
+    export CROSS_COMPILE32=arm-none-eabi-
+    make PLATFORM=vexpress-qemu_armv8a CFG_TRANSFER_LIST=y CFG_MAP_EXT_DT_SECURE=y
+
+At least OP-TEE v4.9.0 for AArch64 needs both compiler (64-Bit and 32-Bit edition) for
+a successful build. On a successful build following files should

be created under the

doc/board renamed from doc/board/emulation/qemu-arm.rst +27 -0
+directory 'out/arm-plat-vexpress/core' from OP-TEE::
+
+    optee_os/out/arm-plat-vexpress/core/tee-header_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pageable_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pager_v2.bin
+
+TF-A
+^^^^
+
+- For AArch64::
+
+    git clone https://github.com/ARM-software/arm-trusted-firmware.git
+    cd arm-trusted-firmware
+    git submodule update --init
+    git checkout v2.14.0
+    export CROSS_COMPILE=aarch64-none-elf-
+    export BL32=path/to/tee-header_v2.bin
+    export BL32_EXTRA1=path/to/tee-pager_v2.bin
+    export BL32_EXTRA2=path/to/tee-pageable_v2.bin
+    export BL33=path/to/u-boot.bin
+    make PLAT=qemu BL32_RAM_LOCATION=tdram SPD=opteed TRANSFER_LIST=1 all fip
+
+On successful build the following files should be created under the directory
+'build/qemu/release' from TF-A::
+
+    arm-trusted-firmware/build/qemu/release/bl1.bin
+    arm-trusted-firmware/build/qemu/release/fip.b

in

doc/board renamed from doc/board/emulation/qemu-arm.rst +26 -2
+
+The following file is at least created with TF-A v2.14.0 and can be directly passed
+with the '-bios' option to QEMU::
+
+    arm-trusted-firmware/build/qemu/release/qemu_fw.bios
+
+If the single file ('qemu_fw.bios') doesn't exist, 'bl1.bin' and 'fip.bin' can be
+concatenated with the command 'dd' alternatively::
+
+    dd if=bl1.bin of=qemu_fw.bios bs=4096 conv=notrunc
+    dd if=fip.bin of=qemu_fw.bios seek=64 bs=4096 conv=notrunc
+
+Building (non-secure)
+---------------------
+
+U-Boot
+^^^^^^
  Set the CROSS_COMPILE environment variable as usual, and run:
 
  - For ARM::
@@ -38,8 +108,18 @@ Set the CROSS_COMPILE environment variable as usual, and run:
      make qemu_arm64_defconfig
      make
 
-Running U-Boot
---------------
+Running U-Boot (secure)
+-----------------------
+
+- For AArch64::
+
+    qemu-system-aarch64 -machine virt,secure=on,virtualization=on \
+    -nographic -cpu cortex-a57 -bios qemu_fw.bios
+
+For additional QEMU comman
Quoted 1 line

d description see running U-Boot in non-secure state.

This is not a valid patch:

b4 shazam https://lore.kernel.org/u-boot/[email protected]/T/#u

Applying: doc: emulation: qemu-arm: add secure state steps Patch failed at 0001 doc: emulation: qemu-arm: add secure state steps
error: patch with only garbage at line 17

Best regards

Heinrich

Quoted 6 lines
doc/board renamed from doc/board/emulation/qemu-arm.rst +3 -0
+
+Running U-Boot (non-secure)
+---------------------------
  The minimal QEMU command line to get U-Boot up and running is:
 
  - For ARM::
#15 lore raw

Re: [PATCH v2] doc: emulation: qemu-arm: add secure state steps

Hi Heinrich!

I'm really sorry about that. Seems I have some troubles with my mail provider or the software (Proton Mail Bridge).

Will definitely try to fix the issues.

I have test the raw patch file with success on a local branch. Haven't got any errors.

I know it's might not be ideal but I attach the raw patch and it's might violates the contributing guidelines.

Would be nice if you can test the patch file and report if there are still errors please.

Thanks in advance!

Quoted 10 lines · Heinrich Schuchardt
Quoted 9 lines · Johannes Krottmayer

Add build steps for building U-Boot in secure state with TF-A and OP-TEE. It includes the full steps for building OP-TEE and TF-A to use with U-Boot. Also a short description how to invoke QEMU with enabled EL3 and EL2. EL3 (machine option secure=on) is required to run TF-A.

Cc:

Tuomas Tynkkynen <[email protected]>

Quoted 22 lines
Quoted 22 lines

---

Changes PATCH v2:
- Fix typo (OT-TEE -> OP-TEE)
- Fix grammatic and correct spellings
- Fix line warp and formatting
- Add 'git checkout' for the specific (tested) version in the used build commands
- Change misleading filename 'flash.bin' to 'qemu_fw.bios'

  doc/board/emulation/qemu-arm.rst | 88 ++++++++++++++++++++++++++++++--
  1 file changed, 84 insertions(+), 4 deletions(-)
doc/board renamed from doc/board/emulation/qemu-arm.rst +0 -0
index 1c91c7f3ac6..9e993ca9783 100644

/emulation/qemu-arm.rst

doc/board renamed from doc/board/emulation/qemu-arm.rst +0 -0
@@ -24,8 +24,78 @@ Additionally, a number of optional peripherals can be added to the PCI bus.
  See :doc:`../../develop/devicetree/dt_qemu` for information on how to see
  the devicetree actually generated by QEMU.
 
Quoted 4 lines

doc/board Additionally, a number of optional peripherals can be added to the PCI bus. · line 28

Quoted 4 lines
doc/board renamed from doc/board/emulation/qemu-arm.rst +1 -2
-Building U-Boot
----------------
+Building (secure)
 

+-----------------

Quoted 24 lines
Quoted 24 lines
doc/board renamed from doc/board/emulation/qemu-arm.rst +24 -0
+
+U-Boot
+^^^^^^
+
+- For AArch64::
+
+    make qemu_arm64_defconfig
+    make
+
+On successful build 'u-boot.bin' should be created. It's necessary in the following
+steps (building TF-A).
+
+OP-TEE
+^^^^^^
+
+- For AArch64::
+
+    git clone https://github.com/OP-TEE/optee_os.git
+    cd optee_os
+    git checkout 4.9.0
+    export CROSS_COMPILE64=aarch64-none-elf-
+    export CROSS_COMPILE32=arm-none-eabi-
+    make PLATFORM=vexpress-qemu_armv8a CFG_TRANSFER_LIST=y CFG_MAP_EXT_DT_SECURE=y
+
Quoted 8 lines

doc/board

Quoted 8 lines
doc/board renamed from doc/board/emulation/qemu-arm.rst +2 -0
+At least OP-TEE v4.9.0 for AArch64 needs both compiler (64-Bit and 32-Bit edition) for
+a successful build. On a successful build following files should

be created under the

doc/board renamed from doc/board/emulation/qemu-arm.rst +5 -0
+directory 'out/arm-plat-vexpress/core' from OP-TEE::
+
+    optee_os/out/arm-plat-vexpress/core/tee-header_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pageable_v2.bin
+

optee_os/out/arm-plat-vexpress/core/tee-pager_v2.bin

Quoted 18 lines
Quoted 18 lines
doc/board renamed from doc/board/emulation/qemu-arm.rst +18 -0
+
+TF-A
+^^^^
+
+- For AArch64::
+
+    git clone https://github.com/ARM-software/arm-trusted-firmware.git
+    cd arm-trusted-firmware
+    git submodule update --init
+    git checkout v2.14.0
+    export CROSS_COMPILE=aarch64-none-elf-
+    export BL32=path/to/tee-header_v2.bin
+    export BL32_EXTRA1=path/to/tee-pager_v2.bin
+    export BL32_EXTRA2=path/to/tee-pageable_v2.bin
+    export BL33=path/to/u-boot.bin
+    make PLAT=qemu BL32_RAM_LOCATION=tdram SPD=opteed TRANSFER_LIST=1 all fip
+
+On successful build the following files should be created under the directory
Quoted 8 lines

doc/board

Quoted 8 lines

+'build/qemu/release' from TF-A::

doc/board renamed from doc/board/emulation/qemu-arm.rst +3 -0
+
+    arm-trusted-firmware/build/qemu/release/bl1.bin
+    arm-trusted-firmware/build/qemu/release/fip.b

in

doc/board renamed from doc/board/emulation/qemu-arm.rst +3 -0
+
+The following file is at least created with TF-A v2.14.0 and can be directly passed
+with the '-bios' option to QE

MU::

Quoted 21 lines
Quoted 21 lines
doc/board renamed from doc/board/emulation/qemu-arm.rst +14 -0
+
+    arm-trusted-firmware/build/qemu/release/qemu_fw.bios
+
+If the single file ('qemu_fw.bios') doesn't exist, 'bl1.bin' and 'fip.bin' can be
+concatenated with the command 'dd' alternatively::
+
+    dd if=bl1.bin of=qemu_fw.bios bs=4096 conv=notrunc
+    dd if=fip.bin of=qemu_fw.bios seek=64 bs=4096 conv=notrunc
+
+Building (non-secure)
+---------------------
+
+U-Boot
+^^^^^^
  Set the CROSS_COMPILE environment variable as usual, and run:
 
  - For ARM::
@@ -38,8 +108,18 @@ Set the CROSS_COMPILE environment variable as usual, and run:
      make qemu_arm64_defconfig
      make
 
Quoted 12 lines
Quoted 11 lines
doc/board renamed from doc/board/emulation/qemu-arm.rst +9 -2
-Running U-Boot
---------------
+Running U-Boot (secure)
+-----------------------
+
+- For AArch64::
+
+    qemu-system-aarch64 -machine virt,secure=on,virtualization=on \
+    -nographic -cpu cortex-a57 -bios qemu_fw.bios
+
+For additional QEMU comman
Quoted 1 line

d description see runn

ing U-Boot in non-secure state.

Quoted 12 lines

This is not a valid patch:

b4 shazam
https://lore.kernel.org/u-boot/[email protected]/T/#u

Applying: doc: emulation: qemu-arm: add secure state steps Patch failed at 0001 doc: emulation: qemu-arm: add secure state steps
error: patch with only garbage at line 17

Best regards

Quoted 9 lines

Heinrich

doc/board

Quoted 6 lines
doc/board renamed from doc/board/emulation/qemu-arm.rst +3 -0
+
+Running U-Boot (non-secure)
+---------------------------
  The minimal QEMU command line to get U-Boot up and running is:
 
  - For ARM::

From 559a5c03549855e09c9362284088d4944e75a7d8 Mon Sep 17 00:00:00 2001
From: Johannes Krottmayer <[email protected]>
Date: Mon, 20 Apr 2026 12:08:07 +0200
Subject: [PATCH v2] doc: emulation: qemu-arm: add secure state steps

Add build steps for building U-Boot in secure state with TF-A and OP-TEE. It includes the full steps for building OP-TEE and TF-A to use with U-Boot. Also a short description how to invoke QEMU with enabled EL3 and EL2. EL3 (machine option secure=on) is required to run TF-A.

---

Changes PATCH v2:
- Fix typo (OT-TEE -> OP-TEE)
- Fix grammatic and correct spellings
- Fix line warp and formatting
- Add 'git checkout' for the specific (tested) version in the used build commands
- Change misleading filename 'flash.bin' to 'qemu_fw.bios'

 doc/board/emulation/qemu-arm.rst | 88 ++++++++++++++++++++++++++++++--
 1 file changed, 84 insertions(+), 4 deletions(-)
doc/board/emulation/qemu-arm.rst +84 -4
index 1c91c7f3ac6..9e993ca9783 100644
@@ -24,8 +24,78 @@ Additionally, a number of optional peripherals can be added to the PCI bus.
 See :doc:`../../develop/devicetree/dt_qemu` for information on how to see
 the devicetree actually generated by QEMU.
 
-Building U-Boot
----------------
+Building (secure)
+-----------------
+
+U-Boot
+^^^^^^
+
+- For AArch64::
+
+    make qemu_arm64_defconfig
+    make
+
+On successful build 'u-boot.bin' should be created. It's necessary in the following
+steps (building TF-A).
+
+OP-TEE
+^^^^^^
+
+- For AArch64::
+
+    git clone https://github.com/OP-TEE/optee_os.git
+    cd optee_os
+    git checkout 4.9.0
+    export CROSS_COMPILE64=aarch64-none-elf-
+    export CROSS_COMPILE32=arm-none-eabi-
+    make PLATFORM=vexpress-qemu_armv8a CFG_TRANSFER_LIST=y CFG_MAP_EXT_DT_SECURE=y
+
+At least OP-TEE v4.9.0 for AArch64 needs both compiler (64-Bit and 32-Bit edition) for
+a successful build. On a successful build following files should be created under the
+directory 'out/arm-plat-vexpress/core' from OP-TEE::
+
+    optee_os/out/arm-plat-vexpress/core/tee-header_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pageable_v2.bin
+    optee_os/out/arm-plat-vexpress/core/tee-pager_v2.bin
+
+TF-A
+^^^^
+
+- For AArch64::
+
+    git clone https://github.com/ARM-software/arm-trusted-firmware.git
+    cd arm-trusted-firmware
+    git submodule update --init
+    git checkout v2.14.0
+    export CROSS_COMPILE=aarch64-none-elf-
+    export BL32=path/to/tee-header_v2.bin
+    export BL32_EXTRA1=path/to/tee-pager_v2.bin
+    export BL32_EXTRA2=path/to/tee-pageable_v2.bin
+    export BL33=path/to/u-boot.bin
+    make PLAT=qemu BL32_RAM_LOCATION=tdram SPD=opteed TRANSFER_LIST=1 all fip
+
+On successful build the following files should be created under the directory
+'build/qemu/release' from TF-A::
+
+    arm-trusted-firmware/build/qemu/release/bl1.bin
+    arm-trusted-firmware/build/qemu/release/fip.bin
+
+The following file is at least created with TF-A v2.14.0 and can be directly passed
+with the '-bios' option to QEMU::
+
+    arm-trusted-firmware/build/qemu/release/qemu_fw.bios
+
+If the single file ('qemu_fw.bios') doesn't exist, 'bl1.bin' and 'fip.bin' can be
+concatenated with the command 'dd' alternatively::
+
+    dd if=bl1.bin of=qemu_fw.bios bs=4096 conv=notrunc
+    dd if=fip.bin of=qemu_fw.bios seek=64 bs=4096 conv=notrunc
+
+Building (non-secure)
+---------------------
+
+U-Boot
+^^^^^^
 Set the CROSS_COMPILE environment variable as usual, and run:
 
 - For ARM::
@@ -38,8 +108,18 @@ Set the CROSS_COMPILE environment variable as usual, and run:
     make qemu_arm64_defconfig
     make
 
-Running U-Boot
---------------
+Running U-Boot (secure)
+-----------------------
+
+- For AArch64::
+
+    qemu-system-aarch64 -machine virt,secure=on,virtualization=on \
+    -nographic -cpu cortex-a57 -bios qemu_fw.bios
+
+For additional QEMU command description see running U-Boot in non-secure state.
+
+Running U-Boot (non-secure)
+---------------------------
 The minimal QEMU command line to get U-Boot up and running is:
 
 - For ARM::
Signature · 1 line
2.47.3
#16 lore raw
In reply to Tom Rini

Hi,

Quoted 26 lines · Tom Rini
Quoted 23 lines · Johannes Krottmayer

Hello,

I'm tried to compile U-Boot for an QEMU AArch64 environment, 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.

Quoted 7 lines
Quoted 3 lines

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 can repeat this. I didn't dig into which memory-allocation fails. Somehow it is not fatal, but likely should be.

Regards,
Simon