[PATCH v10 2/7] configs: add falcon mode fragment for k3 devices
Anshul Dalal
anshuld at ti.com
Fri Oct 31 08:37:52 CET 2025
This fragment enables falcon mode for K3 platforms and modifies the
memory map.
To have enough stack and heap space for loading kernel image as
FIT the memory map was modified by expanding stack + heap size, the
PRELOADED_BL33_BASE in TFA has to also be updated to 0x82000000 since
the kernel needs to be loaded at 2MiB aligned address along with
updating K3_HW_CONFIG_BASE to 0x88000000 for the DT passed to kernel.
Modified memory map for R5 SPL (modified addresses marked with *):
0x80000000 +-------------------------------+ Start of DDR
512KiB | TFA reserved memory space | CONFIG_K3_ATF_LOAD_ADDR*
0x80080000 +-------------------------------+
31.5MiB | Unused |
0x82000000 +-------------------------------+ PRELOADED_BL33_BASE* in TFA
| | CONFIG_SYS_LOAD_ADDR*
57MiB | Kernel + initramfs Image | CONFIG_SPL_LOAD_FIT_ADDRESS*
| |
0x85900000 +-------------------------------+
| |
| R5 U-Boot SPL Stack + Heap |
39MiB | (size defined by |
|SPL_STACK_R_MALLOC_SIMPLE_LEN*)|
| |
0x88000000 +-------------------------------+ CONFIG_SPL_STACK_R_ADDR*
| | K3_HW_CONFIG_BASE* in TFA
16MiB | Kernel DTB | CONFIG_SPL_PAYLOAD_ARGS_ADDR*
| |
0x89000000 +-------------------------------+
331MiB | Device Manager (DM) Load Addr |
0x9db00000 +-------------------------------+
12MiB | DM Reserved |
0x9e700000 +-------------------------------+
1MiB | Unused |
0x9e800000 +-------------------------------+ BL32_BASE in TFA
24MiB | OPTEE |
0xa0000000 +-------------------------------+ End of DDR (512MiB)
Signed-off-by: Anshul Dalal <anshuld at ti.com>
---
configs/k3_r5_falcon.config | 39 +++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
create mode 100644 configs/k3_r5_falcon.config
diff --git a/configs/k3_r5_falcon.config b/configs/k3_r5_falcon.config
new file mode 100644
index 00000000000..b6762b35f74
--- /dev/null
+++ b/configs/k3_r5_falcon.config
@@ -0,0 +1,39 @@
+# Enable falcon mode
+CONFIG_SPL_OS_BOOT=y
+CONFIG_SPL_OS_BOOT_SECURE=y
+
+# We use envs for setting bootargs
+CONFIG_SPL_ENV_SUPPORT=y
+
+# Allows for the SPL to detect UUID for kernel's rootfs
+CONFIG_SPL_PARTITION_UUIDS=y
+
+# Perform FDT fixups from SPL
+CONFIG_OF_SYSTEM_SETUP=y
+
+# We use the rootfs (i.e partition 2) for booting which is ext4 not FAT
+CONFIG_SYS_MMCSD_FS_BOOT=y
+CONFIG_SYS_MMCSD_FS_BOOT_PARTITION=2
+CONFIG_SPL_FS_EXT4=y
+
+# Loading tifalcon instead of tispl which has FDT and A53 SPL saves time
+CONFIG_SPL_FS_LOAD_PAYLOAD_NAME="boot/tifalcon.bin"
+CONFIG_SPL_FS_LOAD_KERNEL_NAME="boot/fitImage"
+CONFIG_SPL_LOAD_FIT=y
+
+# Used as the 2MiB aligned load address for kernel
+CONFIG_SYS_LOAD_ADDR=0x82000000
+CONFIG_SPL_STACK_R_ADDR=0x88000000
+CONFIG_SPL_LOAD_FIT_ADDRESS=0x82000000
+CONFIG_SPL_PAYLOAD_ARGS_ADDR=0x88000000
+CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2700000
+
+# Disable all unsupported boot media to save space
+# CONFIG_SPL_SYS_MMCSD_RAW_MODE is not set
+# CONFIG_SPL_SPI_FLASH_SUPPORT is not set
+# CONFIG_SPL_YMODEM_SUPPORT is not set
+# CONFIG_SUPPORT_EMMC_BOOT is not set
+# CONFIG_SPL_NAND_SUPPORT is not set
+# CONFIG_SPL_NOR_SUPPORT is not set
+# CONFIG_SPL_RAM_DEVICE is not set
+# CONFIG_SPL_FS_FAT is not set
--
2.51.0
More information about the U-Boot
mailing list