u-boot/doc/usage/fit/kernel_fdt_optee.rst
Marek Vasut 20861863eb ARM: bootm: Add support for starting Linux through OPTEE-OS on ARMv7a
Add support for jumping to Linux kernel through OPTEE-OS on ARMv7a.
This is only supported if U-Boot runs in PL1 secure. This change adds
two components, one is fitImage OPTEE-OS loadable handler, which makes
a note of OPTEE-OS being loaded and stores the load address for later
jump to it. The second part is the actual jump to Linux through OPTEE-OS.
The jump through OPTEE-OS requires set up of multiple CPU registers, r1
and r2 are passed through, r0 and r3 have to be set to 0, lr is set to
Linux kernel entry point. This setup is done by new assembler function
boot_jump_linux_via_optee().

The boot_jump_linux_via_optee() also includes STM32MP13xx late TZC
configuration write, this cannot be moved easily, hence the ifdef.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
2025-11-06 11:26:18 -06:00

77 lines
2.2 KiB
ReStructuredText

.. SPDX-License-Identifier: GPL-2.0+
Single kernel, FDT blob and OPTEE-OS
====================================
Example FIT image description file demonstrating the usage of the
bootm command to launch OPTEE-OS before starting Linux kernel on
STM32MP13xx.
::
/dts-v1/;
/ {
description = "Simple image with single Linux kernel and FDT blob";
#address-cells = <1>;
images {
kernel {
description = "Vanilla Linux kernel";
data = /incbin/("./arch/arm/boot/zImage");
type = "kernel";
arch = "arm";
os = "linux";
compression = "none";
load = <0xc0008000>;
entry = <0xc0008000>;
hash-1 {
algo = "crc32";
};
hash-2 {
algo = "sha256";
};
};
fdt-1 {
description = "Flattened Device Tree blob";
data = /incbin/("./arch/arm/boot/dts/st/stm32mp135f-dhcor-dhsbc.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash-1 {
algo = "crc32";
};
hash-2 {
algo = "sha256";
};
};
/* Bundled OPTEE-OS */
tee-1 {
description = "OP-TEE";
data = /incbin/("/path/to/optee_os/out/arm-plat-stm32mp1/core/tee-raw.bin");
type = "tee";
arch = "arm";
compression = "none";
os = "tee";
load = <0xde000000>;
entry = <0xde000000>;
hash-1 {
algo = "crc32";
};
hash-2 {
algo = "sha256";
};
};
};
configurations {
default = "conf-1";
conf-1 {
description = "Boot Linux kernel with FDT blob";
kernel = "kernel";
fdt = "fdt-1";
loadables = "tee-1"; /* OPTEE-OS */
};
};
};