summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2025-10-30 22:23:49 +0100
committerTom Rini <[email protected]>2025-11-06 11:26:18 -0600
commit20861863eb3010581b12e9a77eb7958460edaa82 (patch)
treec008dd359ecf2c2fe21dafbf9d62370d25af9507 /doc
parent08bf42e1faa4411cd347c2e370da790a0116e318 (diff)
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 <[email protected]>
Diffstat (limited to 'doc')
-rw-r--r--doc/usage/fit/index.rst1
-rw-r--r--doc/usage/fit/kernel_fdt_optee.rst76
2 files changed, 77 insertions, 0 deletions
diff --git a/doc/usage/fit/index.rst b/doc/usage/fit/index.rst
index a822bf20cb2..6c78d8584ed 100644
--- a/doc/usage/fit/index.rst
+++ b/doc/usage/fit/index.rst
@@ -14,6 +14,7 @@ images that it reads and boots. Documentation about FIT is available in
howto
kernel_fdt
kernel_fdts_compressed
+ kernel_fdt_optee
kernel
multi
multi_spl
diff --git a/doc/usage/fit/kernel_fdt_optee.rst b/doc/usage/fit/kernel_fdt_optee.rst
new file mode 100644
index 00000000000..07587710fe5
--- /dev/null
+++ b/doc/usage/fit/kernel_fdt_optee.rst
@@ -0,0 +1,76 @@
+.. 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 */
+ };
+ };
+ };