A-core no-SPL Boot Support
Subsystems (2)
v4 cover A-core no-SPL Boot Support
A-Core no-SPL Mode is a boot approach that bypasses the A Core SPL while retaining U-Boot in the boot flow. This mode provides faster boot times compared to normal boot while maintaining U-Boot's flexibility for kernel loading and system configuration.
v4<==> v3
==========
* Updated a small info in the Documentation.
* Updated the MAINTAINERS entry for the A-core no-SPL Boot mode config
* fragments.
* Link to v3: https://lore.kernel.org/all/[email protected]/
v3<==> v2
===========
* Updated the naming convention used from "no-spl" to "A-core no-spl" to
* make it more specific and clear.
* Link to v2: https://lore.kernel.org/all/[email protected]/
v2<==> v1
===========
* Updated the naming convention used from "semi-falcon" to "no-spl".
* Link to v1: https://lore.kernel.org/all/[email protected]/
Boot logs link :
https://gist.github.com/GokulPraveen2001/fef407a482e2dad30272006de557627c
Gokul Praveen (3):
configs: add A-core no-SPL mode fragment for k3 devices
arm: k3-binman: add tinospl.bin for direct U-Boot boot
doc: ti: document A Core no-SPL boot mode for J784S4 EVM
Makefile | 2 +- arch/arm/dts/k3-binman.dtsi | 47 ++++++++ arch/arm/dts/k3-j784s4-binman.dtsi | 65 +++++++++++ arch/arm/dts/k3-j784s4-evm-u-boot.dtsi | 14 +++ board/ti/j784s4/MAINTAINERS | 2 + configs/k3_a72_nospl.config | 1 + configs/k3_r5_nospl.config | 1 + doc/board/ti/j784s4_evm.rst | 143 +++++++++++++++++++++++++ 8 files changed, 274 insertions(+), 1 deletion(-) create mode 100644 configs/k3_a72_nospl.config create mode 100644 configs/k3_r5_nospl.config
Signature · 1 line
2.34.1
PATCH v4 1/3 configs: add A-core no-SPL mode fragment for k3 devices
This fragment enables a boot mode for K3 platforms where the R5 SPL directly loads U-Boot proper, bypassing the A Core SPL stage
The R5 config modifies the payload filename to load tinospl.bin instead of tispl.bin. The A Core config updates the U-Boot load address to match the A Core SPL load address, allowing R5 SPL to load U-Boot directly from that location since A Core SPL is not present in this boot flow.
This reduces boot time by eliminating the A Core SPL stage.
Reviewed-by Neha Malcom Francis <[email protected]>
--- board/ti/j784s4/MAINTAINERS | 2 ++ configs/k3_a72_nospl.config | 1 + configs/k3_r5_nospl.config | 1 + 3 files changed, 4 insertions(+) create mode 100644 configs/k3_a72_nospl.config create mode 100644 configs/k3_r5_nospl.config
board/ti/j784s4/MAINTAINERS +2 -0
@@ -12,6 +12,8 @@ F: arch/arm/dts/k3-j784s4-r5.dtsi F: arch/arm/dts/k3-j784s4-ddr.dtsi F: arch/arm/dts/k3-j784s4-ddr-evm-lp4-4266.dtsi F: doc/board/ti/j784s4_evm.rst +F: configs/k3_a72_nospl.config +F: configs/k3_r5_nospl.config AM69 SK BOARD M: Apurva Nandan <[email protected]>
configs/k3_a72_nospl.config new file +1 -0
@@ -0,0 +1 @@ +CONFIG_TEXT_BASE=0x80080000
configs/k3_r5_nospl.config new file +1 -0
@@ -0,0 +1 @@ +CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="tinospl.bin"
Signature · 1 line
2.34.1
Re: [PATCH v4 1/3] configs: add A-core no-SPL mode fragment for k3 devices
Quoted 10 lines · Gokul Praveen
This fragment enables a boot mode for K3 platforms where the R5 SPL directly loads U-Boot proper, bypassing the A Core SPL stage
The R5 config modifies the payload filename to load tinospl.bin instead of tispl.bin. The A Core config updates the U-Boot load address to match the A Core SPL load address, allowing R5 SPL to load U-Boot directly from that location since A Core SPL is not present in this boot flow.
This reduces boot time by eliminating the A Core SPL stage.
I'm not a huge fan of adding single line config fragments, if the change really is that trivial it should better go in the documentation or just be easily exposed via Kconfig.
configs/k3_a72_nospl.config line 1
Quoted 9 lines
configs/k3_a72_nospl.config new file +1
-0@@ -0,0 +1 @@ +CONFIG_TEXT_BASE=0x80080000
If I understand correctly this is done to match TFA's PRELOADED_BL33_BASE. This is a valid approach but we could just use CONFIG_SPL_TEXT_BASE instead while building tinospl.bin as the load address for U-Boot, check my comment on the next patch.
configs/k3_r5_nospl.config line 1
Quoted 8 lines
configs/k3_r5_nospl.config new file +1
-0@@ -0,0 +1 @@ +CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="tinospl.bin"
You could also just ask the user to rename 'tinospl.bin' to 'tispl.bin' which would allow us to have Non-SPL boot without changing the R5 SPL.
Signature · 1 line
Anshul Dalal <[email protected]>
PATCH v4 2/3 arm: k3-binman: add tinospl.bin for direct U-Boot boot
In reply to Gokul PraveenThis patch adds creation of tinospl.bin for J784S4 EVM.
The contents are similar to the existing tispl.bin but the A72 SPL and its FDT have been removed and replaced with U-Boot proper and its FDT. This binary is used in a boot mode where R5 SPL directly loads U-Boot, bypassing the A Core SPL stage.
This reduces boot time by eliminating the A Core SPL stage.
tispl.bin = TFA + TEE + DM + A72 SPL + FDT(A72 SPL)
tinospl.bin = TFA + TEE + DM + U-Boot + FDT(U-Boot)
--- Makefile | 2 +- arch/arm/dts/k3-binman.dtsi | 47 +++++++++++++++++++ arch/arm/dts/k3-j784s4-binman.dtsi | 65 ++++++++++++++++++++++++++ arch/arm/dts/k3-j784s4-evm-u-boot.dtsi | 14 ++++++ 4 files changed, 127 insertions(+), 1 deletion(-)
Makefile +1 -1
@@ -2556,7 +2556,7 @@ CLEAN_FILES += include/autoconf.mk* include/bmp_logo.h include/bmp_logo_data.h \ idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb \ Test* capsule*.*.efi-capsule capsule*.map mkimage.imx-boot.spl \ mkimage.imx-boot.u-boot mkimage-out.imx-boot.spl mkimage-out.imx-boot.u-boot \ - imx9image* m33-oei-ddrfw* tifalcon.bin + imx9image* m33-oei-ddrfw* tifalcon.bin tinospl.bin # Directories & files removed with 'make mrproper' MRPROPER_FILES += include/config include/generated spl tpl vpl \
arch/arm/dts/k3-binman.dtsi +47 -0
53 lines not on this page · raw message
arch/arm/dts/k3-j784s4-binman.dtsi +65 -0
69 lines not on this page · raw message
arch/arm/dts/k3-j784s4-evm-u-boot.dtsi +14 -0
@@ -87,6 +87,20 @@ u-boot-unsigned { insert-template = <&u_boot_unsigned>; }; + + ti-nospl { + insert-template = <&ti_nospl>; + + fit { + images { + dm { + ti-dm { + filename = "ti-dm/j784s4/ipc_echo_testb_mcu1_0_release_strip.xer5f"; + }; + }; + }; + }; + }; }; #endif
Signature · 1 line
2.34.1
Re: [PATCH v4 2/3] arm: k3-binman: add tinospl.bin for direct U-Boot boot
arch/arm/dts/k3-binman.dtsi line 547
Quoted 10 lines · Gokul Praveen
arch/arm/dts/k3-binman.dtsi +2
-0@@ -543,6 +543,53 @@ }; }; + ti_nospl_template: template-16 { + filename = "tinospl.bin";
Asides from the filename and fit description, this template looks identical to the existing 'ti_falcon_template' for AM62 family of SoCs, could we reuse that here?
arch/arm/dts/k3-binman.dtsi line 565
Quoted 7 lines
[ ... skip 12 lines ... ]
arch/arm/dts/k3-binman.dtsi +6
-0+ os = "arm-trusted-firmware"; + load = <CONFIG_K3_ATF_LOAD_ADDR>; + entry = <CONFIG_K3_ATF_LOAD_ADDR>; + atf-bl31 { + filename = "bl31.bin"; + };
Why don't we have ti-secure nodes here?
arch/arm/dts/k3-binman.dtsi line 578
Quoted 13 lines
arch/arm/dts/k3-binman.dtsi +13
-0+ }; + tee { + description = "OP-TEE"; + type = "tee"; + arch = "arm64"; + compression = "none"; + os = "tee"; + load = <CONFIG_K3_OPTEE_LOAD_ADDR>; + entry = <CONFIG_K3_OPTEE_LOAD_ADDR>; + tee-os { + filename = "tee-raw.bin"; + optional; + };
No ti-secure node here too?
arch/arm/dts/k3-j784s4-binman.dtsi line 338
Quoted 13 lines
arch/arm/dts/k3-j784s4-binman.dtsi +0
-0@@ -317,4 +317,69 @@[ ... skip 16 lines ... ]
arch/arm/dts/k3-j784s4-binman.dtsi +6
-0+ description = UBOOT_BOARD_DESCRIPTION; + type = "firmware"; + os = "u-boot"; + arch = "arm"; + compression = "none"; + load = <CONFIG_TEXT_BASE>;
A bit of a hack but if we use 'CONFIG_SPL_TEXT_BASE' here, the default defconfig should produce a functional tinospl.bin too. No config fragments should be required.
Signature · 1 line
Anshul Dalal <[email protected]>
PATCH v4 3/3 doc: ti: document A Core no-SPL boot mode for J784S4 EVM
In reply to Gokul PraveenThis patch adds user documentation for the A Core no-SPL boot mode on J784S4 EVM, where R5 SPL directly loads U-Boot proper, bypassing the A Core SPL stage.
The documentation covers the boot flow, build steps, and usage instructions for this boot mode using tinospl.bin.
--- doc/board/ti/j784s4_evm.rst | 143 ++++++++++++++++++++++++++++++++++++ 1 file changed, 143 insertions(+)
doc/board/ti/j784s4_evm.rst +143 -0
@@ -637,6 +637,149 @@ to the J784S4 endpoint: This program copies the boot image to the PCIe endpoint's memory region and writes the necessary control words to signal image transfer completion. +A-Core No-SPL Boot Mode +---------------- + +A-Core No-SPL Boot Mode on J784S4 platforms is a boot approach that bypasses +the A72 SPL while retaining U-Boot in the boot flow. This mode provides faster +boot times compared to normal boot while maintaining U-Boot's flexibility for +kernel loading and system configuration. + +**Key differences from Normal Boot:** + +* Skips A72 SPL execution +* U-Boot binary included in tinospl.bin alongside TFA, OP-TEE, and DM +* U-Boot loads at CONFIG_TEXT_BASE=0x80080000 (A72 SPL's earlier load location) + +Boot Flow +^^^^^^^^^ + +**Normal boot flow:** + +.. code-block:: + + | tiboot3.bin | tispl.bin | u-boot.img | Image | + |-------------+----------------------------+------------+---------| + R5 Core | SPL | | | | + ---------| \ | | | | + A72 Core | ------> TFA -> OP-TEE -> A72 SPL --> U-Boot --> Kernel | + +**With A-Core no-SPL boot mode:** + +.. code-block:: + + | tiboot3.bin | tinospl.bin | Image | + |-------------+-----------------------------+---------| + R5 Core | SPL | | | + ---------| \ | | | + A72 Core | ------> TFA -> OP-TEE -> U-Boot --> Kernel | + +Build Process +^^^^^^^^^^^^^ + +Enabling A-Core no-SPL boot mode requires re-building U-Boot as follows: + +0. Setup environment variables: +""""""""""""""""""""""""""""""" + +Refer to the build procedure above for setting up the environment variables. + +1. U-Boot: +"""""""""" + +* **1.1 R5:** + +.. prompt:: bash $ + + # use the no-SPL config fragment for K3 platforms + export UBOOT_NOSPL_CFG_FRAGMENTR="k3_r5_nospl.config" + export UBOOT_CFG_CORTEXR="${UBOOT_CFG_CORTEXR} ${UBOOT_NOSPL_CFG_FRAGMENTR}" + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_spl_r5 + :end-before: .. k3_rst_include_end_build_steps_spl_r5 + +* **1.2 A72:** + +.. prompt:: bash $ + + # use the no-SPL config fragment for A72 + export UBOOT_NOSPL_CFG_FRAGMENTA="k3_a72_nospl.config" + export UBOOT_CFG_CORTEXA="${UBOOT_CFG_CORTEXA} ${UBOOT_NOSPL_CFG_FRAGMENTA}" + +.. include:: k3.rst + :start-after: .. k3_rst_include_start_build_steps_uboot + :end-before: .. k3_rst_include_end_build_steps_uboot + +.. note:: + + The ``tinospl.bin`` file is automatically generated by binman during + the A72 U-Boot build process. This binary contains TFA, OP-TEE, DM, and + the U-Boot binary with its device tree. + +Usage +^^^^^ + +A-Core No-SPL Boot Mode uses a specialized binary called ``tinospl.bin`` which +contains all necessary components to boot directly to U-Boot without loading +the A72 SPL. + +**tinospl.bin structure:** + +The tinospl.bin is a FIT image containing: + +* **ATF (ARM Trusted Firmware)** - loaded at CONFIG_K3_ATF_LOAD_ADDR +* **OP-TEE** - loaded at CONFIG_K3_OPTEE_LOAD_ADDR +* **DM (Device Manager)** - loaded at 0x89000000 +* **U-Boot** - loaded at CONFIG_TEXT_BASE (0x80080000) +* **DTB (Device Tree Blob)** - U-Boot device tree + +The R5 SPL requires both ``tiboot3.bin`` and ``tinospl.bin`` to be present +in the boot partition (first partition) of the MMC device. By default, the SD +card boot partition is used (``mmcdev=1``). The ``bootpart`` environment variable +defaults to 1:2, specifying the second partition of the SD card. + +To use eMMC instead of SD as the boot media, rebuild the R5 SPL with the +following diff: + +.. code-block:: diff + + diff --git a/board/ti/j784s4/j784s4.env b/board/ti/j784s4/j784s4.env + index 82b9f0741bb..73d59ac425c 100644 + --- a/board/ti/j784s4/j784s4.env + +++ b/board/ti/j784s4/j784s4.env + @@ -17,8 +17,8 @@ run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr} + + boot_targets=mmc1 mmc0 usb pxe dhcp + boot=mmc + -mmcdev=1 + -bootpart=1:2 + +mmcdev=0 + +bootpart=0:2 + bootdir=/boot + rd_spec=- + +**List of files required on SD/eMMC for A-Core No-SPL Boot Mode:** + +.. list-table:: + :widths: 10 15 10 25 + :header-rows: 1 + + * - File + - Copy path on SD/eMMC + - Partition + - Description + + * - ``tiboot3.bin`` + - Boot partition (raw) + - 1st partition (FAT32) + - R5 SPL binary + + * - ``tinospl.bin`` + - Boot partition (raw) + - 1st partition (FAT32) + - Combined binary with TFA, OP-TEE, DM, and U-Boot + Debugging U-Boot ----------------
Signature · 1 line
2.34.1
Re: [PATCH v4 3/3] doc: ti: document A Core no-SPL boot mode for J784S4 EVM
doc/board/ti/j784s4_evm.rst to the J784S4 endpoint: · line 735
Quoted 12 lines · Gokul Praveen
doc/board/ti/j784s4_evm.rst +0
-0@@ -637,6 +637,149 @@ to the J784S4 endpoint:[ ... skip 93 lines ... ]
doc/board/ti/j784s4_evm.rst +6
-0+ +* **ATF (ARM Trusted Firmware)** - loaded at CONFIG_K3_ATF_LOAD_ADDR +* **OP-TEE** - loaded at CONFIG_K3_OPTEE_LOAD_ADDR +* **DM (Device Manager)** - loaded at 0x89000000 +* **U-Boot** - loaded at CONFIG_TEXT_BASE (0x80080000) +* **DTB (Device Tree Blob)** - U-Boot device tree
If you want to represent the FIT structure, I would suggest we go with the SVG representation like we have at doc/board/ti/img/tifsstub_dm_tispl.bin.svg.
Signature · 1 line
Anshul Dalal <[email protected]>
Hi Tom,
Apologies for the reminder. Hope I have clarified your queries.
Best Regards
Gokul Praveen
Quoted 44 lines · Gokul Praveen
A-Core no-SPL Mode is a boot approach that bypasses the A Core SPL while retaining U-Boot in the boot flow. This mode provides faster boot times compared to normal boot while maintaining U-Boot's flexibility for kernel loading and system configuration.
v4<==> v3
==========
* Updated a small info in the Documentation.
* Updated theMAINTAINERSentry for the A-core no-SPL Boot mode config
* fragments.
* Link to v3: https://lore.kernel.org/all/[email protected]/v3<==> v2
===========
* Updated the naming convention used from "no-spl" to "A-core no-spl" to
* make it more specific and clear.
* Link to v2: https://lore.kernel.org/all/[email protected]/v2<==> v1
===========
* Updated the naming convention used from "semi-falcon" to "no-spl".
* Link to v1: https://lore.kernel.org/all/[email protected]/Boot logs link :
https://gist.github.com/GokulPraveen2001/fef407a482e2dad30272006de557627cGokul Praveen (3):
configs: add A-core no-SPL mode fragment for k3 devices
arm: k3-binman: add tinospl.bin for direct U-Boot boot
doc: ti: document A Core no-SPL boot mode for J784S4 EVMMakefile | 2 +- arch/arm/dts/k3-binman.dtsi | 47 ++++++++ arch/arm/dts/k3-j784s4-binman.dtsi | 65 +++++++++++ arch/arm/dts/k3-j784s4-evm-u-boot.dtsi | 14 +++ board/ti/j784s4/MAINTAINERS | 2 + configs/k3_a72_nospl.config | 1 + configs/k3_r5_nospl.config | 1 + doc/board/ti/j784s4_evm.rst | 143 +++++++++++++++++++++++++ 8 files changed, 274 insertions(+), 1 deletion(-)create mode 100644
configs/k3_a72_nospl.configcreate mode 100644configs/k3_r5_nospl.config