All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshul Dalal <anshuld@ti.com>
Cc: Anshul Dalal <anshuld@ti.com>, <afd@ti.com>, <b-liu@ti.com>,
	<bb@ti.com>,  <m-chawdhry@ti.com>, <n-francis@ti.com>,
	<nm@ti.com>, <trini@konsulko.com>, <u-boot@lists.denx.de>,
	<vigneshr@ti.com>
Subject: [PATCH v8 2/8] configs: add falcon mode fragment for k3 devices
Date: Mon, 27 Oct 2025 18:29:57 +0530	[thread overview]
Message-ID: <20251027130004.2156121-3-anshuld@ti.com> (raw)
In-Reply-To: <20251027130004.2156121-1-anshuld@ti.com>

This fragment enables falcon boot 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 requires 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@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..9ceda7ce963
--- /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
+CONFIG_SPL_LOAD_FIT=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
+
+# Disable all non MMC/SD FS boot media to save space
+CONFIG_SPL_SYS_MMCSD_RAW_MODE=n
+CONFIG_SPL_SPI_FLASH_SUPPORT=n
+CONFIG_SPL_YMODEM_SUPPORT=n
+CONFIG_SUPPORT_EMMC_BOOT=n
+CONFIG_SPL_NAND_SUPPORT=n
+CONFIG_SPL_NOR_SUPPORT=n
+CONFIG_SPL_RAM_SUPPORT=n
+
+# 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
+
+# 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
+CONFIG_SPL_FS_FAT=n
+
+# 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"
-- 
2.51.0


  parent reply	other threads:[~2025-10-27 13:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-27 12:59 [PATCH v8 0/8] Allow falcon boot from R5 SPL on TI's AM62 devices Anshul Dalal
2025-10-27 12:59 ` [PATCH v8 1/8] arch: arm: k3-binman: add fit for falcon boot Anshul Dalal
2025-10-27 12:59 ` Anshul Dalal [this message]
2025-10-27 12:59 ` [PATCH v8 3/8] mach-k3: common: enable falcon mode from R5 SPL Anshul Dalal
2025-10-27 12:59 ` [PATCH v8 4/8] mach-k3: common: support only MMC in R5 falcon mode Anshul Dalal
2025-10-27 13:00 ` [PATCH v8 5/8] mach-k3: r5: common: add fdt fixups for " Anshul Dalal
2025-10-27 13:00 ` [PATCH v8 6/8] mach-k3: r5: common: add bootargs to kernel's dtb Anshul Dalal
2025-10-27 13:00 ` [PATCH v8 7/8] Makefile: add tifalcon.bin to CLEAN_FILES Anshul Dalal
2025-10-27 13:00 ` [PATCH v8 8/8] doc: ti: document R5 falcon mode for AM62 platforms Anshul Dalal
2025-10-29 18:16   ` Andrew Davis
2025-10-30  5:08     ` Anshul Dalal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251027130004.2156121-3-anshuld@ti.com \
    --to=anshuld@ti.com \
    --cc=afd@ti.com \
    --cc=b-liu@ti.com \
    --cc=bb@ti.com \
    --cc=m-chawdhry@ti.com \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.