* [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
@ 2025-04-16 7:30 Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 1/4] spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000 Anshul Dalal
` (4 more replies)
0 siblings, 5 replies; 14+ messages in thread
From: Anshul Dalal @ 2025-04-16 7:30 UTC (permalink / raw)
To: u-boot
Cc: Anshul Dalal, vigneshr, trini, nm, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
The change to ATF's PRELOADED_BL33_BASE[1] requires respective changes to
SPL_TEXT_BASE on u-boot side. This is necessary to allow the ATF to jump
directly to linux kernel (like in falcon mode) which requires a 2MiB aligned
load address[2]. The current address ATF jumps to is 0x80080000 which is not
2MiB aligned.
Therefore in parallel to the ATF change, this patch set makes the corresponding
changes to u-boot. To maintain backwards compatibility with older ATF builds
(that still use older address of 0x80080000), the patch set also adds a
jump-stub which modifies the execution as follows:
Old ATF -> 0x80080000 -> 0x822000000 (Main domain SPL or kernel image)
jump stub SPL_TEXT_BASE
With the following instructions loaded by the jump-stub:
ADDR | Instruction
0x80080000 | mov x15, CONFIG_SPL_TEXT_BASE (0x822000000)
0x80080004 | br x15
Depends on:
* [PATCH v3] configs: set SPL_TEXT_BASE by default for k3 platforms
https://lore.kernel.org/u-boot/20250415095028.446254-1-anshuld@ti.com/
[1]:
https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/37447
[2]:
"The Image must be placed text_offset bytes from a 2MB aligned base
address anywhere in usable system RAM and called there."
- Documentation/arch/arm64/booting.rst (linux kernel)
Anshul Dalal (4):
spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000
mach-k3: add a jump stub to support older ATF builds
binman: k3: add jump-stub to tispl.bin
binman: k3: add jump-stub as loadable
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 2 +-
arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 4 +--
arch/arm/dts/k3-am625-sk-binman.dtsi | 4 +--
.../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 4 +--
arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 4 +--
arch/arm/dts/k3-am62a-sk-binman.dtsi | 4 +--
arch/arm/dts/k3-am62p-sk-binman.dtsi | 2 +-
arch/arm/dts/k3-am642-phycore-som-binman.dtsi | 8 ++---
arch/arm/dts/k3-am64x-binman.dtsi | 8 ++---
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 2 +-
arch/arm/dts/k3-am65x-binman.dtsi | 4 +--
arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi | 2 +-
arch/arm/dts/k3-binman.dtsi | 31 +++++++++++++++++++
arch/arm/dts/k3-j7200-binman.dtsi | 4 +--
.../dts/k3-j721e-beagleboneai64-u-boot.dtsi | 2 +-
arch/arm/dts/k3-j721e-binman.dtsi | 4 +--
arch/arm/dts/k3-j721s2-binman.dtsi | 4 +--
arch/arm/dts/k3-j722s-binman.dtsi | 2 +-
arch/arm/dts/k3-j784s4-binman.dtsi | 4 +--
arch/arm/mach-k3/Makefile | 7 +++++
arch/arm/mach-k3/jump_stub.S | 16 ++++++++++
common/spl/Kconfig | 2 +-
22 files changed, 89 insertions(+), 35 deletions(-)
create mode 100644 arch/arm/mach-k3/jump_stub.S
--
2.49.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v1 1/4] spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000
2025-04-16 7:30 [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Anshul Dalal
@ 2025-04-16 7:30 ` Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 2/4] mach-k3: add a jump stub to support older ATF builds Anshul Dalal
` (3 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: Anshul Dalal @ 2025-04-16 7:30 UTC (permalink / raw)
To: u-boot
Cc: Anshul Dalal, vigneshr, trini, nm, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
In falcon boot, the kernel should be loaded to the same address as main
domain SPL, which necessitates the address to be 2MiB aligned[1].
Therefore this patch updates the SPL_TEXT_BASE to a 2MiB aligned
address.
[1]:
"The Image must be placed text_offset bytes from a 2MB aligned
baseaddress anywhere in usable system RAM and called there."
- Documentation/arch/arm64/booting.rst (linux kernel)
Signed-off-by: Anshul Dalal <anshuld@ti.com>
---
common/spl/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 35161d02d19..6336b0635b1 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -270,7 +270,7 @@ config SPL_TEXT_BASE
default 0x40200000 if OMAP34XX
default 0x402F4000 if AM43XX
default 0x402F0400 if AM33XX
- default 0x80080000 if ARCH_K3 && ARM64
+ default 0x82200000 if ARCH_K3 && ARM64
default 0x43c00000 if ARCH_K3 && !ARM64
default 0x00908000 if ARCH_MX6
default 0x00912000 if ARCH_MX7
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v1 2/4] mach-k3: add a jump stub to support older ATF builds
2025-04-16 7:30 [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 1/4] spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000 Anshul Dalal
@ 2025-04-16 7:30 ` Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 3/4] binman: k3: add jump-stub to tispl.bin Anshul Dalal
` (2 subsequent siblings)
4 siblings, 0 replies; 14+ messages in thread
From: Anshul Dalal @ 2025-04-16 7:30 UTC (permalink / raw)
To: u-boot
Cc: Anshul Dalal, vigneshr, trini, nm, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
The older ATF had it's PRELOADED_BL33_BASE set to 0x80080000, changing
SPL_TEXT_BASE to the newer address of 0x822000000 is incompatible with
older ATF builds.
Therefore, this patch adds a jump stub to move execution back to
SPL_TEXT_BASE with the stub being loaded at the older ATF address of
0x80080000.
Signed-off-by: Anshul Dalal <anshuld@ti.com>
---
arch/arm/mach-k3/Makefile | 7 +++++++
arch/arm/mach-k3/jump_stub.S | 16 ++++++++++++++++
2 files changed, 23 insertions(+)
create mode 100644 arch/arm/mach-k3/jump_stub.S
diff --git a/arch/arm/mach-k3/Makefile b/arch/arm/mach-k3/Makefile
index b2fd5810b67..573956a8a2c 100644
--- a/arch/arm/mach-k3/Makefile
+++ b/arch/arm/mach-k3/Makefile
@@ -17,3 +17,10 @@ obj-$(CONFIG_SOC_K3_J7200) += j7200/
obj-$(CONFIG_SOC_K3_J721S2) += j721s2/
obj-$(CONFIG_SOC_K3_J722S) += j722s/
obj-$(CONFIG_SOC_K3_J784S4) += j784s4/
+
+ifdef CONFIG_ARM64
+obj-y += jump_stub.o
+$(src)/jump_stub.o: $(src)/jump_stub.s
+ $(AS) $(src)/jump_stub.s -o $(src)/jump_stub.o
+ $(OBJCOPY) -O binary --only-section .text $(src)/jump_stub.o jump_stub.bin
+endif
diff --git a/arch/arm/mach-k3/jump_stub.S b/arch/arm/mach-k3/jump_stub.S
new file mode 100644
index 00000000000..694d4ee47a6
--- /dev/null
+++ b/arch/arm/mach-k3/jump_stub.S
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2025 Texas Instruments Incorporated - https://www.ti.com/
+ * Anshul Dalal <anshuld@ti.com>
+ */
+
+/*
+ This jump stub is to be loaded at the older PRELOADED_BL33_BASE to forward
+ execution to SPL_TEXT_BASE when using older ATF builds.
+ */
+
+.text
+
+jump_stub:
+ mov x15, CONFIG_SPL_TEXT_BASE
+ br x15
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v1 3/4] binman: k3: add jump-stub to tispl.bin
2025-04-16 7:30 [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 1/4] spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000 Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 2/4] mach-k3: add a jump stub to support older ATF builds Anshul Dalal
@ 2025-04-16 7:30 ` Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 4/4] binman: k3: add jump-stub as loadable Anshul Dalal
2025-04-16 11:24 ` [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Nishanth Menon
4 siblings, 0 replies; 14+ messages in thread
From: Anshul Dalal @ 2025-04-16 7:30 UTC (permalink / raw)
To: u-boot
Cc: Anshul Dalal, vigneshr, trini, nm, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
To preserve backwards compatibility with older ATF builds with
PRELOADED_BL33_BASE set to 0x80080000, we add a jump-stub component to
all tispl derrivatives which jumps execution to the address where u-boot
spl is actually loaded (SPL_LOAD_TEXT).
Signed-off-by: Anshul Dalal <anshuld@ti.com>
---
arch/arm/dts/k3-binman.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm/dts/k3-binman.dtsi b/arch/arm/dts/k3-binman.dtsi
index 5163161b94d..5d971ecf886 100644
--- a/arch/arm/dts/k3-binman.dtsi
+++ b/arch/arm/dts/k3-binman.dtsi
@@ -5,6 +5,8 @@
#include "k3-security.h"
+#define LEGACY_ATF_PRELOADED_BL33_BASE 0x80080000
+
/ {
binman: binman {
multiple-images;
@@ -325,6 +327,22 @@
};
};
+ jump-stub {
+ description = "Jump stub for backwards compatibility with older ATF builds";
+ type = "firmware";
+ arch = "arm64";
+ compression = "none";
+ load = <LEGACY_ATF_PRELOADED_BL33_BASE>;
+ entry = <LEGACY_ATF_PRELOADED_BL33_BASE>;
+ ti-secure {
+ content = <&jump_stub>;
+ keyfile = "custMpk.pem";
+ };
+ jump_stub: blob-ext {
+ filename = "jump_stub.bin";
+ };
+ };
+
};
};
};
@@ -387,6 +405,19 @@
filename = "spl/u-boot-spl-nodtb.bin";
};
};
+
+ jump-stub {
+ description = "Jump stub for backwards compatibility with older ATF builds";
+ type = "firmware";
+ arch = "arm64";
+ compression = "none";
+ load = <LEGACY_ATF_PRELOADED_BL33_BASE>;
+ entry = <LEGACY_ATF_PRELOADED_BL33_BASE>;
+ blob-ext {
+ filename = "jump_stub.bin";
+ };
+ };
+
};
};
};
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v1 4/4] binman: k3: add jump-stub as loadable
2025-04-16 7:30 [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Anshul Dalal
` (2 preceding siblings ...)
2025-04-16 7:30 ` [PATCH v1 3/4] binman: k3: add jump-stub to tispl.bin Anshul Dalal
@ 2025-04-16 7:30 ` Anshul Dalal
2025-04-16 11:24 ` [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Nishanth Menon
4 siblings, 0 replies; 14+ messages in thread
From: Anshul Dalal @ 2025-04-16 7:30 UTC (permalink / raw)
To: u-boot
Cc: Anshul Dalal, vigneshr, trini, nm, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
Since all k3 platforms use the same ATF build, the jump-stub is required
for each to preserve backwards compatibility.
This patch adds jump-stub as a loadable for each platform's binman dts
which enables the R5 SPL to load the jump stub where older ATF build
would expect main domain SPL to be.
Signed-off-by: Anshul Dalal <anshuld@ti.com>
---
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 2 +-
arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 4 ++--
arch/arm/dts/k3-am625-sk-binman.dtsi | 4 ++--
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi | 4 ++--
arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 4 ++--
arch/arm/dts/k3-am62a-sk-binman.dtsi | 4 ++--
arch/arm/dts/k3-am62p-sk-binman.dtsi | 2 +-
arch/arm/dts/k3-am642-phycore-som-binman.dtsi | 8 ++++----
arch/arm/dts/k3-am64x-binman.dtsi | 8 ++++----
arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 2 +-
arch/arm/dts/k3-am65x-binman.dtsi | 4 ++--
arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi | 2 +-
arch/arm/dts/k3-j7200-binman.dtsi | 4 ++--
arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi | 2 +-
arch/arm/dts/k3-j721e-binman.dtsi | 4 ++--
arch/arm/dts/k3-j721s2-binman.dtsi | 4 ++--
arch/arm/dts/k3-j722s-binman.dtsi | 2 +-
arch/arm/dts/k3-j784s4-binman.dtsi | 4 ++--
18 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
index a067b0ba354..d0ce7259334 100644
--- a/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
+++ b/arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi
@@ -188,7 +188,7 @@
conf-0 {
description = "k3-am625-beagleplay";
firmware = "atf";
- loadables = "tee", "dm", "spl",
+ loadables = "tee", "dm", "spl", "jump-stub",
"tifsstub-gp";
fdt = "fdt-0";
};
diff --git a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
index 4a65427e877..2110cf47598 100644
--- a/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
+++ b/arch/arm/dts/k3-am625-phycore-som-binman.dtsi
@@ -297,7 +297,7 @@
description = "k3-am625-phyboard-lyra-rdk";
firmware = "atf";
loadables = "tee", "tifsstub-hs", "tifsstub-fs",
- "tifsstub-gp", "dm", "spl";
+ "tifsstub-gp", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -441,7 +441,7 @@
description = "k3-am625-phyboard-lyra-rdk";
firmware = "atf";
loadables = "tee", "tifsstub-hs", "tifsstub-fs",
- "tifsstub-gp", "dm", "spl";
+ "tifsstub-gp", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-am625-sk-binman.dtsi b/arch/arm/dts/k3-am625-sk-binman.dtsi
index 534eb14795b..bb5ad83b168 100644
--- a/arch/arm/dts/k3-am625-sk-binman.dtsi
+++ b/arch/arm/dts/k3-am625-sk-binman.dtsi
@@ -298,7 +298,7 @@
description = "k3-am625-sk";
firmware = "atf";
loadables = "tee", "tifsstub-hs", "tifsstub-fs",
- "tifsstub-gp", "dm", "spl";
+ "tifsstub-gp", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -419,7 +419,7 @@
description = "k3-am625-sk";
firmware = "atf";
loadables = "tee", "tifsstub-hs", "tifsstub-fs",
- "tifsstub-gp", "dm", "spl";
+ "tifsstub-gp", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi b/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
index 0e6188907e4..bc340311055 100644
--- a/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
+++ b/arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi
@@ -283,7 +283,7 @@
description = "k3-am625-verdin-wifi-dev";
firmware = "atf";
loadables = "tee", "tifsstub-hs", "tifsstub-fs",
- "tifsstub-gp", "dm", "spl";
+ "tifsstub-gp", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -402,7 +402,7 @@
description = "k3-am625-verdin-wifi-dev";
firmware = "atf";
loadables = "tee", "tifsstub-hs", "tifsstub-fs",
- "tifsstub-gp", "dm", "spl";
+ "tifsstub-gp", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi b/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi
index 325702ed6e0..f88f18ece1d 100644
--- a/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi
+++ b/arch/arm/dts/k3-am62a-phycore-som-binman.dtsi
@@ -302,7 +302,7 @@
description = "k3-am62a7-phyboard-lyra-rdk";
firmware = "atf";
loadables = "tee", "dm", "spl",
- "tifsstub-hs", "tifsstub-fs", "tifsstub-gp";
+ "tifsstub-hs", "tifsstub-fs", "tifsstub-gp", "jump-stub";
fdt = "fdt-0";
};
};
@@ -483,7 +483,7 @@
conf-0 {
description = "k3-am62a7-phyboard-lyra-rdk";
firmware = "atf";
- loadables = "tee", "dm", "spl",
+ loadables = "tee", "dm", "spl", "jump-stub",
"tifsstub-hs", "tifsstub-fs", "tifsstub-gp";
fdt = "fdt-0";
};
diff --git a/arch/arm/dts/k3-am62a-sk-binman.dtsi b/arch/arm/dts/k3-am62a-sk-binman.dtsi
index 2a8c260387b..09b93ce96a9 100644
--- a/arch/arm/dts/k3-am62a-sk-binman.dtsi
+++ b/arch/arm/dts/k3-am62a-sk-binman.dtsi
@@ -287,7 +287,7 @@
conf-0 {
description = "k3-am62a7-sk";
firmware = "atf";
- loadables = "tee", "dm", "spl",
+ loadables = "tee", "dm", "spl", "jump-stub",
"tifsstub-hs", "tifsstub-fs", "tifsstub-gp";
fdt = "fdt-0";
};
@@ -407,7 +407,7 @@
description = "k3-am62a7-sk";
firmware = "atf";
loadables = "tee", "dm", "spl",
- "tifsstub-hs", "tifsstub-fs", "tifsstub-gp";
+ "tifsstub-hs", "tifsstub-fs", "tifsstub-gp", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-am62p-sk-binman.dtsi b/arch/arm/dts/k3-am62p-sk-binman.dtsi
index 797644a7e0d..66bcef55653 100644
--- a/arch/arm/dts/k3-am62p-sk-binman.dtsi
+++ b/arch/arm/dts/k3-am62p-sk-binman.dtsi
@@ -239,7 +239,7 @@
conf-0 {
description = "k3-am62px-sk";
firmware = "atf";
- loadables = "tee", "dm", "spl",
+ loadables = "tee", "dm", "spl", "jump-stub",
"tifsstub-hs", "tifsstub-fs";
fdt = "fdt-0";
};
diff --git a/arch/arm/dts/k3-am642-phycore-som-binman.dtsi b/arch/arm/dts/k3-am642-phycore-som-binman.dtsi
index 5228eed19bf..2db9239ecd7 100644
--- a/arch/arm/dts/k3-am642-phycore-som-binman.dtsi
+++ b/arch/arm/dts/k3-am642-phycore-som-binman.dtsi
@@ -174,7 +174,7 @@
conf-0 {
description = "k3-am642-phyboard-electra-rdk";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -253,7 +253,7 @@
conf-0 {
description = "k3-am642-phyboard-electra-rdk";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -339,7 +339,7 @@
conf-0 {
description = "k3-am642-phyboard-electra-rdk";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -482,7 +482,7 @@
conf-0 {
description = "k3-am642-phyboard-electra-rdk";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-am64x-binman.dtsi b/arch/arm/dts/k3-am64x-binman.dtsi
index f768c4d946d..4ddcc50df7a 100644
--- a/arch/arm/dts/k3-am64x-binman.dtsi
+++ b/arch/arm/dts/k3-am64x-binman.dtsi
@@ -188,14 +188,14 @@
conf-0 {
description = "k3-am642-evm";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
conf-1 {
description = "k3-am642-sk";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-1";
};
};
@@ -312,14 +312,14 @@
conf-0 {
description = "k3-am642-evm";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
conf-1 {
description = "k3-am642-sk";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-1";
};
};
diff --git a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
index f49d6f262f2..4e7702b58df 100644
--- a/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
+++ b/arch/arm/dts/k3-am65-iot2050-boot-image.dtsi
@@ -99,7 +99,7 @@
spl {
fdt = "fdt-0";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
};
};
};
diff --git a/arch/arm/dts/k3-am65x-binman.dtsi b/arch/arm/dts/k3-am65x-binman.dtsi
index 350775e42c2..06b161a4ec5 100644
--- a/arch/arm/dts/k3-am65x-binman.dtsi
+++ b/arch/arm/dts/k3-am65x-binman.dtsi
@@ -148,7 +148,7 @@
conf-0 {
description = "k3-am654-base-board";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0", "fdt-1";
};
};
@@ -257,7 +257,7 @@
conf-0 {
description = "k3-am654-base-board";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0", "fdt-1";
};
};
diff --git a/arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi b/arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi
index 6c52038cdca..4619856ac49 100644
--- a/arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi
+++ b/arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi
@@ -214,7 +214,7 @@
conf-0 {
description = "k3-am67a-beagley-ai";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-j7200-binman.dtsi b/arch/arm/dts/k3-j7200-binman.dtsi
index 423badd7cb5..632a3df5270 100644
--- a/arch/arm/dts/k3-j7200-binman.dtsi
+++ b/arch/arm/dts/k3-j7200-binman.dtsi
@@ -371,7 +371,7 @@
conf-0 {
description = "k3-j7200-common-proc-board";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -451,7 +451,7 @@
conf-1 {
description = "k3-j7200-common-proc-board";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-1";
};
};
diff --git a/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi b/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
index 8cefa39290d..f57b7b51143 100644
--- a/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
+++ b/arch/arm/dts/k3-j721e-beagleboneai64-u-boot.dtsi
@@ -298,7 +298,7 @@
conf-0 {
description = "k3-j721e-beagleboneai64";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-j721e-binman.dtsi b/arch/arm/dts/k3-j721e-binman.dtsi
index 0d607296f0e..4e2aa645255 100644
--- a/arch/arm/dts/k3-j721e-binman.dtsi
+++ b/arch/arm/dts/k3-j721e-binman.dtsi
@@ -492,7 +492,7 @@
conf-0 {
description = "k3-j721e-common-proc-board";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -572,7 +572,7 @@
conf-0 {
description = "k3-j721e-common-proc-board";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-j721s2-binman.dtsi b/arch/arm/dts/k3-j721s2-binman.dtsi
index d121d8c0c54..edf89ad57a9 100644
--- a/arch/arm/dts/k3-j721s2-binman.dtsi
+++ b/arch/arm/dts/k3-j721s2-binman.dtsi
@@ -312,7 +312,7 @@
conf-0 {
description = "k3-j721s2-common-proc-board";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -392,7 +392,7 @@
conf-0 {
description = "k3-j721s2-common-proc-board";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-j722s-binman.dtsi b/arch/arm/dts/k3-j722s-binman.dtsi
index 6b521166575..bd617f92727 100644
--- a/arch/arm/dts/k3-j722s-binman.dtsi
+++ b/arch/arm/dts/k3-j722s-binman.dtsi
@@ -166,7 +166,7 @@
conf-0 {
description = "k3-j722s-evm";
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
diff --git a/arch/arm/dts/k3-j784s4-binman.dtsi b/arch/arm/dts/k3-j784s4-binman.dtsi
index 0553825b383..8505afd38e5 100644
--- a/arch/arm/dts/k3-j784s4-binman.dtsi
+++ b/arch/arm/dts/k3-j784s4-binman.dtsi
@@ -194,7 +194,7 @@
conf-0 {
description = BOARD_DESCRIPTION;
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
@@ -277,7 +277,7 @@
conf-0 {
description = BOARD_DESCRIPTION;
firmware = "atf";
- loadables = "tee", "dm", "spl";
+ loadables = "tee", "dm", "spl", "jump-stub";
fdt = "fdt-0";
};
};
--
2.49.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-16 7:30 [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Anshul Dalal
` (3 preceding siblings ...)
2025-04-16 7:30 ` [PATCH v1 4/4] binman: k3: add jump-stub as loadable Anshul Dalal
@ 2025-04-16 11:24 ` Nishanth Menon
2025-04-16 13:48 ` Anshul Dalal
4 siblings, 1 reply; 14+ messages in thread
From: Nishanth Menon @ 2025-04-16 11:24 UTC (permalink / raw)
To: Anshul Dalal
Cc: u-boot, vigneshr, trini, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
On 13:00-20250416, Anshul Dalal wrote:
> The change to ATF's PRELOADED_BL33_BASE[1] requires respective changes to
> SPL_TEXT_BASE on u-boot side. This is necessary to allow the ATF to jump
> directly to linux kernel (like in falcon mode) which requires a 2MiB aligned
> load address[2]. The current address ATF jumps to is 0x80080000 which is not
> 2MiB aligned.
>
> Therefore in parallel to the ATF change, this patch set makes the corresponding
> changes to u-boot. To maintain backwards compatibility with older ATF builds
> (that still use older address of 0x80080000), the patch set also adds a
> jump-stub which modifies the execution as follows:
>
> Old ATF -> 0x80080000 -> 0x822000000 (Main domain SPL or kernel image)
> jump stub SPL_TEXT_BASE
>
> With the following instructions loaded by the jump-stub:
> ADDR | Instruction
> 0x80080000 | mov x15, CONFIG_SPL_TEXT_BASE (0x822000000)
> 0x80080004 | br x15
>
> Depends on:
> * [PATCH v3] configs: set SPL_TEXT_BASE by default for k3 platforms
> https://lore.kernel.org/u-boot/20250415095028.446254-1-anshuld@ti.com/
>
> [1]:
> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/37447
> [2]:
> "The Image must be placed text_offset bytes from a 2MB aligned base
> address anywhere in usable system RAM and called there."
> - Documentation/arch/arm64/booting.rst (linux kernel)
>
> Anshul Dalal (4):
> spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000
> mach-k3: add a jump stub to support older ATF builds
> binman: k3: add jump-stub to tispl.bin
> binman: k3: add jump-stub as loadable
How about u-boot documentation?
>
> arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 2 +-
> arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 4 +--
> arch/arm/dts/k3-am625-sk-binman.dtsi | 4 +--
> .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 4 +--
> arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 4 +--
> arch/arm/dts/k3-am62a-sk-binman.dtsi | 4 +--
> arch/arm/dts/k3-am62p-sk-binman.dtsi | 2 +-
> arch/arm/dts/k3-am642-phycore-som-binman.dtsi | 8 ++---
> arch/arm/dts/k3-am64x-binman.dtsi | 8 ++---
> arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 2 +-
> arch/arm/dts/k3-am65x-binman.dtsi | 4 +--
> arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi | 2 +-
> arch/arm/dts/k3-binman.dtsi | 31 +++++++++++++++++++
> arch/arm/dts/k3-j7200-binman.dtsi | 4 +--
> .../dts/k3-j721e-beagleboneai64-u-boot.dtsi | 2 +-
> arch/arm/dts/k3-j721e-binman.dtsi | 4 +--
> arch/arm/dts/k3-j721s2-binman.dtsi | 4 +--
> arch/arm/dts/k3-j722s-binman.dtsi | 2 +-
> arch/arm/dts/k3-j784s4-binman.dtsi | 4 +--
> arch/arm/mach-k3/Makefile | 7 +++++
> arch/arm/mach-k3/jump_stub.S | 16 ++++++++++
> common/spl/Kconfig | 2 +-
> 22 files changed, 89 insertions(+), 35 deletions(-)
> create mode 100644 arch/arm/mach-k3/jump_stub.S
>
> --
> 2.49.0
>
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-16 11:24 ` [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Nishanth Menon
@ 2025-04-16 13:48 ` Anshul Dalal
2025-04-16 15:05 ` Nishanth Menon
0 siblings, 1 reply; 14+ messages in thread
From: Anshul Dalal @ 2025-04-16 13:48 UTC (permalink / raw)
To: Nishanth Menon
Cc: u-boot, vigneshr, trini, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
On Wed Apr 16, 2025 at 4:54 PM IST, Nishanth Menon wrote:
> On 13:00-20250416, Anshul Dalal wrote:
>> The change to ATF's PRELOADED_BL33_BASE[1] requires respective changes to
>> SPL_TEXT_BASE on u-boot side. This is necessary to allow the ATF to jump
>> directly to linux kernel (like in falcon mode) which requires a 2MiB aligned
>> load address[2]. The current address ATF jumps to is 0x80080000 which is not
>> 2MiB aligned.
>>
>> Therefore in parallel to the ATF change, this patch set makes the corresponding
>> changes to u-boot. To maintain backwards compatibility with older ATF builds
>> (that still use older address of 0x80080000), the patch set also adds a
>> jump-stub which modifies the execution as follows:
>>
>> Old ATF -> 0x80080000 -> 0x822000000 (Main domain SPL or kernel image)
>> jump stub SPL_TEXT_BASE
>>
>> With the following instructions loaded by the jump-stub:
>> ADDR | Instruction
>> 0x80080000 | mov x15, CONFIG_SPL_TEXT_BASE (0x822000000)
>> 0x80080004 | br x15
>>
>> Depends on:
>> * [PATCH v3] configs: set SPL_TEXT_BASE by default for k3 platforms
>> https://lore.kernel.org/u-boot/20250415095028.446254-1-anshuld@ti.com/
>>
>> [1]:
>> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/37447
>> [2]:
>> "The Image must be placed text_offset bytes from a 2MB aligned base
>> address anywhere in usable system RAM and called there."
>> - Documentation/arch/arm64/booting.rst (linux kernel)
>>
>> Anshul Dalal (4):
>> spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000
>> mach-k3: add a jump stub to support older ATF builds
>> binman: k3: add jump-stub to tispl.bin
>> binman: k3: add jump-stub as loadable
>
>
> How about u-boot documentation?
I will update that in the next revision along with any feedback I
receive on this patch.
Regards
>>
>> arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 2 +-
>> arch/arm/dts/k3-am625-phycore-som-binman.dtsi | 4 +--
>> arch/arm/dts/k3-am625-sk-binman.dtsi | 4 +--
>> .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 4 +--
>> arch/arm/dts/k3-am62a-phycore-som-binman.dtsi | 4 +--
>> arch/arm/dts/k3-am62a-sk-binman.dtsi | 4 +--
>> arch/arm/dts/k3-am62p-sk-binman.dtsi | 2 +-
>> arch/arm/dts/k3-am642-phycore-som-binman.dtsi | 8 ++---
>> arch/arm/dts/k3-am64x-binman.dtsi | 8 ++---
>> arch/arm/dts/k3-am65-iot2050-boot-image.dtsi | 2 +-
>> arch/arm/dts/k3-am65x-binman.dtsi | 4 +--
>> arch/arm/dts/k3-am67a-beagley-ai-u-boot.dtsi | 2 +-
>> arch/arm/dts/k3-binman.dtsi | 31 +++++++++++++++++++
>> arch/arm/dts/k3-j7200-binman.dtsi | 4 +--
>> .../dts/k3-j721e-beagleboneai64-u-boot.dtsi | 2 +-
>> arch/arm/dts/k3-j721e-binman.dtsi | 4 +--
>> arch/arm/dts/k3-j721s2-binman.dtsi | 4 +--
>> arch/arm/dts/k3-j722s-binman.dtsi | 2 +-
>> arch/arm/dts/k3-j784s4-binman.dtsi | 4 +--
>> arch/arm/mach-k3/Makefile | 7 +++++
>> arch/arm/mach-k3/jump_stub.S | 16 ++++++++++
>> common/spl/Kconfig | 2 +-
>> 22 files changed, 89 insertions(+), 35 deletions(-)
>> create mode 100644 arch/arm/mach-k3/jump_stub.S
>>
>> --
>> 2.49.0
>>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-16 13:48 ` Anshul Dalal
@ 2025-04-16 15:05 ` Nishanth Menon
2025-04-16 16:38 ` Andrew Davis
0 siblings, 1 reply; 14+ messages in thread
From: Nishanth Menon @ 2025-04-16 15:05 UTC (permalink / raw)
To: Anshul Dalal
Cc: u-boot, vigneshr, trini, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
On 19:18-20250416, Anshul Dalal wrote:
> On Wed Apr 16, 2025 at 4:54 PM IST, Nishanth Menon wrote:
> > On 13:00-20250416, Anshul Dalal wrote:
> >> The change to ATF's PRELOADED_BL33_BASE[1] requires respective changes to
> >> SPL_TEXT_BASE on u-boot side. This is necessary to allow the ATF to jump
> >> directly to linux kernel (like in falcon mode) which requires a 2MiB aligned
> >> load address[2]. The current address ATF jumps to is 0x80080000 which is not
> >> 2MiB aligned.
> >>
> >> Therefore in parallel to the ATF change, this patch set makes the corresponding
> >> changes to u-boot. To maintain backwards compatibility with older ATF builds
> >> (that still use older address of 0x80080000), the patch set also adds a
> >> jump-stub which modifies the execution as follows:
> >>
> >> Old ATF -> 0x80080000 -> 0x822000000 (Main domain SPL or kernel image)
> >> jump stub SPL_TEXT_BASE
> >>
> >> With the following instructions loaded by the jump-stub:
> >> ADDR | Instruction
> >> 0x80080000 | mov x15, CONFIG_SPL_TEXT_BASE (0x822000000)
> >> 0x80080004 | br x15
> >>
> >> Depends on:
> >> * [PATCH v3] configs: set SPL_TEXT_BASE by default for k3 platforms
> >> https://lore.kernel.org/u-boot/20250415095028.446254-1-anshuld@ti.com/
> >>
> >> [1]:
> >> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/37447
> >> [2]:
> >> "The Image must be placed text_offset bytes from a 2MB aligned base
> >> address anywhere in usable system RAM and called there."
> >> - Documentation/arch/arm64/booting.rst (linux kernel)
> >>
> >> Anshul Dalal (4):
> >> spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000
> >> mach-k3: add a jump stub to support older ATF builds
> >> binman: k3: add jump-stub to tispl.bin
> >> binman: k3: add jump-stub as loadable
> >
> >
> > How about u-boot documentation?
>
> I will update that in the next revision along with any feedback I
> receive on this patch.
IMHO, This change is too intrusive and impacts downstream customers
including inflight production devices.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-16 15:05 ` Nishanth Menon
@ 2025-04-16 16:38 ` Andrew Davis
2025-04-16 19:51 ` Nishanth Menon
0 siblings, 1 reply; 14+ messages in thread
From: Andrew Davis @ 2025-04-16 16:38 UTC (permalink / raw)
To: Nishanth Menon, Anshul Dalal
Cc: u-boot, vigneshr, trini, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
On 4/16/25 10:05 AM, Nishanth Menon wrote:
> On 19:18-20250416, Anshul Dalal wrote:
>> On Wed Apr 16, 2025 at 4:54 PM IST, Nishanth Menon wrote:
>>> On 13:00-20250416, Anshul Dalal wrote:
>>>> The change to ATF's PRELOADED_BL33_BASE[1] requires respective changes to
>>>> SPL_TEXT_BASE on u-boot side. This is necessary to allow the ATF to jump
>>>> directly to linux kernel (like in falcon mode) which requires a 2MiB aligned
>>>> load address[2]. The current address ATF jumps to is 0x80080000 which is not
>>>> 2MiB aligned.
>>>>
>>>> Therefore in parallel to the ATF change, this patch set makes the corresponding
>>>> changes to u-boot. To maintain backwards compatibility with older ATF builds
>>>> (that still use older address of 0x80080000), the patch set also adds a
>>>> jump-stub which modifies the execution as follows:
>>>>
>>>> Old ATF -> 0x80080000 -> 0x822000000 (Main domain SPL or kernel image)
>>>> jump stub SPL_TEXT_BASE
>>>>
>>>> With the following instructions loaded by the jump-stub:
>>>> ADDR | Instruction
>>>> 0x80080000 | mov x15, CONFIG_SPL_TEXT_BASE (0x822000000)
>>>> 0x80080004 | br x15
>>>>
>>>> Depends on:
>>>> * [PATCH v3] configs: set SPL_TEXT_BASE by default for k3 platforms
>>>> https://lore.kernel.org/u-boot/20250415095028.446254-1-anshuld@ti.com/
>>>>
>>>> [1]:
>>>> https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/37447
>>>> [2]:
>>>> "The Image must be placed text_offset bytes from a 2MB aligned base
>>>> address anywhere in usable system RAM and called there."
>>>> - Documentation/arch/arm64/booting.rst (linux kernel)
>>>>
>>>> Anshul Dalal (4):
>>>> spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000
>>>> mach-k3: add a jump stub to support older ATF builds
>>>> binman: k3: add jump-stub to tispl.bin
>>>> binman: k3: add jump-stub as loadable
>>>
>>>
>>> How about u-boot documentation?
>>
>> I will update that in the next revision along with any feedback I
>> receive on this patch.
>
> IMHO, This change is too intrusive and impacts downstream customers
> including inflight production devices.
>
Could you elaborate a little?
They do not even need to update their TF-A version, if they want to
use their current version they simply recompile it with a single
extra build flag:
PRELOADED_BL33_BASE=0x822000000
They should have no reason not to be able to do this. But even *if*
they cannot do that, the whole point of the jump-stub here is to
save them even having to do a simple compile.
IMHO "downstream customers including inflight production devices"
should not be a reason to block good and useful changes here in
upstream. But again, this change doesn't break anything for them in
the first place, so why bring that up?
Andrew
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-16 16:38 ` Andrew Davis
@ 2025-04-16 19:51 ` Nishanth Menon
2025-04-17 9:21 ` Anshul Dalal
0 siblings, 1 reply; 14+ messages in thread
From: Nishanth Menon @ 2025-04-16 19:51 UTC (permalink / raw)
To: Andrew Davis
Cc: Anshul Dalal, u-boot, vigneshr, trini, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
On 11:38-20250416, Andrew Davis wrote:
> > > > How about u-boot documentation?
> > >
> > > I will update that in the next revision along with any feedback I
> > > receive on this patch.
> >
> > IMHO, This change is too intrusive and impacts downstream customers
> > including inflight production devices.
> >
>
> Could you elaborate a little?
>
> They do not even need to update their TF-A version, if they want to
> use their current version they simply recompile it with a single
> extra build flag:
>
> PRELOADED_BL33_BASE=0x822000000
For folks who are trying to boot linux from TFA, they could do the same.
>
> They should have no reason not to be able to do this. But even *if*
> they cannot do that, the whole point of the jump-stub here is to
> save them even having to do a simple compile.
>
> IMHO "downstream customers including inflight production devices"
> should not be a reason to block good and useful changes here in
> upstream. But again, this change doesn't break anything for them in
> the first place, so why bring that up?
I dont see a specific value here. U-boot just works. For folks who want
direct TFA to kernel jump (which is a niche fast boot usecase), go ahead
and use TFA with the mentioned build option.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-16 19:51 ` Nishanth Menon
@ 2025-04-17 9:21 ` Anshul Dalal
2025-04-17 11:30 ` Nishanth Menon
0 siblings, 1 reply; 14+ messages in thread
From: Anshul Dalal @ 2025-04-17 9:21 UTC (permalink / raw)
To: Nishanth Menon, Andrew Davis
Cc: u-boot, vigneshr, trini, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
On Thu Apr 17, 2025 at 1:21 AM IST, Nishanth Menon wrote:
> On 11:38-20250416, Andrew Davis wrote:
>> > > > How about u-boot documentation?
>> > >
>> > > I will update that in the next revision along with any feedback I
>> > > receive on this patch.
>> >
>> > IMHO, This change is too intrusive and impacts downstream customers
>> > including inflight production devices.
>> >
>>
>> Could you elaborate a little?
>>
>> They do not even need to update their TF-A version, if they want to
>> use their current version they simply recompile it with a single
>> extra build flag:
>>
>> PRELOADED_BL33_BASE=0x822000000
>
> For folks who are trying to boot linux from TFA, they could do the same.
This change would allow us to support both standard boot flow and falcon
mode from the same upstream source. With the only downside being the
slight overhead added by the jump-stub (~1.7KiB added to tispl.bin and
two extra instructions to jump to u-boot from older ATF builds).
And we can remove the stub altogether once all the customers have
migrated over to the new address.
In addition to that this also frees up the bottom of DDR which allows us
to more easily support low memory systems (512MiB or less) as we can use
the freed up space for more tightly packing OP-TEE, DM etc. instead of
having the binaries loaded at scattered addresses like we do now.
>>
>> They should have no reason not to be able to do this. But even *if*
>> they cannot do that, the whole point of the jump-stub here is to
>> save them even having to do a simple compile.
>>
>> IMHO "downstream customers including inflight production devices"
>> should not be a reason to block good and useful changes here in
>> upstream. But again, this change doesn't break anything for them in
>> the first place, so why bring that up?
>
> I dont see a specific value here. U-boot just works. For folks who want
> direct TFA to kernel jump (which is a niche fast boot usecase), go ahead
> and use TFA with the mentioned build option.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-17 9:21 ` Anshul Dalal
@ 2025-04-17 11:30 ` Nishanth Menon
2025-04-17 14:16 ` Tom Rini
0 siblings, 1 reply; 14+ messages in thread
From: Nishanth Menon @ 2025-04-17 11:30 UTC (permalink / raw)
To: Anshul Dalal
Cc: Andrew Davis, u-boot, vigneshr, trini, robertcnelson, w.egorov,
francesco.dolcini, ggiordano, m-chawdhry, a-nandan
On 14:51-20250417, Anshul Dalal wrote:
> On Thu Apr 17, 2025 at 1:21 AM IST, Nishanth Menon wrote:
> > On 11:38-20250416, Andrew Davis wrote:
> >> > > > How about u-boot documentation?
> >> > >
> >> > > I will update that in the next revision along with any feedback I
> >> > > receive on this patch.
> >> >
> >> > IMHO, This change is too intrusive and impacts downstream customers
> >> > including inflight production devices.
> >> >
> >>
> >> Could you elaborate a little?
> >>
> >> They do not even need to update their TF-A version, if they want to
> >> use their current version they simply recompile it with a single
> >> extra build flag:
> >>
> >> PRELOADED_BL33_BASE=0x822000000
> >
> > For folks who are trying to boot linux from TFA, they could do the same.
>
> This change would allow us to support both standard boot flow and falcon
> mode from the same upstream source. With the only downside being the
Other than trivial usecases, no you cannot. There is a lot of
monkeying of dtb that u-boot does with mac address, HS-FS based dt node
enable/disable etc. In effect, at a product level it ends up as a different
flow.
> slight overhead added by the jump-stub (~1.7KiB added to tispl.bin and
> two extra instructions to jump to u-boot from older ATF builds).
The boot flow is already a complex flow at the moment. If we go down
this road, U-boot will have no choice but to support both variants of
TFA for all eternity - any fallacy that people will upgrade U-boot and
TFA baselines in sync is wrong.
>
> And we can remove the stub altogether once all the customers have
> migrated over to the new address.
When would we know? There are gazillion usage models we are not aware
of. U-boot is not the only game in town for bootloaders. Barebox, and
other bootloader ecosystems will also need to pony up, that too hand in
hand with migration to new address proposed in TFA.
>
> In addition to that this also frees up the bottom of DDR which allows us
> to more easily support low memory systems (512MiB or less) as we can use
> the freed up space for more tightly packing OP-TEE, DM etc. instead of
> having the binaries loaded at scattered addresses like we do now.
Now, we are suggesting an entire memory map revamp impacting more
s/w components. For platforms with low DDR capabilities (e.g.
PocketBeagle2), please do the necessary changes when introducing to
mainline.
>
> >>
> >> They should have no reason not to be able to do this. But even *if*
> >> they cannot do that, the whole point of the jump-stub here is to
> >> save them even having to do a simple compile.
> >>
> >> IMHO "downstream customers including inflight production devices"
> >> should not be a reason to block good and useful changes here in
> >> upstream. But again, this change doesn't break anything for them in
> >> the first place, so why bring that up?
> >
> > I dont see a specific value here. U-boot just works. For folks who want
> > direct TFA to kernel jump (which is a niche fast boot usecase), go ahead
> > and use TFA with the mentioned build option.
>
IMHO, there is a simpler alternate solution - build TFA, dtb etc in the
model of your desire. let us leave the defaults be.
I will let Tom and other U-boot maintainers make their choice, as TFA
maintainer, I have already rejected the approach. it is already
PRELOADED_BL33_BASE ?= 0x80080000 which allows for override at build
time instead of all the massive rework and downstream ecosystem impact.
--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-17 11:30 ` Nishanth Menon
@ 2025-04-17 14:16 ` Tom Rini
2025-04-22 6:59 ` Ahmad Fatoum
0 siblings, 1 reply; 14+ messages in thread
From: Tom Rini @ 2025-04-17 14:16 UTC (permalink / raw)
To: Nishanth Menon
Cc: Anshul Dalal, Andrew Davis, u-boot, vigneshr, robertcnelson,
w.egorov, francesco.dolcini, ggiordano, m-chawdhry, a-nandan
[-- Attachment #1: Type: text/plain, Size: 3970 bytes --]
On Thu, Apr 17, 2025 at 06:30:13AM -0500, Nishanth Menon wrote:
> On 14:51-20250417, Anshul Dalal wrote:
> > On Thu Apr 17, 2025 at 1:21 AM IST, Nishanth Menon wrote:
> > > On 11:38-20250416, Andrew Davis wrote:
> > >> > > > How about u-boot documentation?
> > >> > >
> > >> > > I will update that in the next revision along with any feedback I
> > >> > > receive on this patch.
> > >> >
> > >> > IMHO, This change is too intrusive and impacts downstream customers
> > >> > including inflight production devices.
> > >> >
> > >>
> > >> Could you elaborate a little?
> > >>
> > >> They do not even need to update their TF-A version, if they want to
> > >> use their current version they simply recompile it with a single
> > >> extra build flag:
> > >>
> > >> PRELOADED_BL33_BASE=0x822000000
> > >
> > > For folks who are trying to boot linux from TFA, they could do the same.
> >
> > This change would allow us to support both standard boot flow and falcon
> > mode from the same upstream source. With the only downside being the
>
> Other than trivial usecases, no you cannot. There is a lot of
> monkeying of dtb that u-boot does with mac address, HS-FS based dt node
> enable/disable etc. In effect, at a product level it ends up as a different
> flow.
>
> > slight overhead added by the jump-stub (~1.7KiB added to tispl.bin and
> > two extra instructions to jump to u-boot from older ATF builds).
>
> The boot flow is already a complex flow at the moment. If we go down
> this road, U-boot will have no choice but to support both variants of
> TFA for all eternity - any fallacy that people will upgrade U-boot and
> TFA baselines in sync is wrong.
>
> >
> > And we can remove the stub altogether once all the customers have
> > migrated over to the new address.
>
> When would we know? There are gazillion usage models we are not aware
> of. U-boot is not the only game in town for bootloaders. Barebox, and
> other bootloader ecosystems will also need to pony up, that too hand in
> hand with migration to new address proposed in TFA.
>
> >
> > In addition to that this also frees up the bottom of DDR which allows us
> > to more easily support low memory systems (512MiB or less) as we can use
> > the freed up space for more tightly packing OP-TEE, DM etc. instead of
> > having the binaries loaded at scattered addresses like we do now.
>
> Now, we are suggesting an entire memory map revamp impacting more
> s/w components. For platforms with low DDR capabilities (e.g.
> PocketBeagle2), please do the necessary changes when introducing to
> mainline.
>
> >
> > >>
> > >> They should have no reason not to be able to do this. But even *if*
> > >> they cannot do that, the whole point of the jump-stub here is to
> > >> save them even having to do a simple compile.
> > >>
> > >> IMHO "downstream customers including inflight production devices"
> > >> should not be a reason to block good and useful changes here in
> > >> upstream. But again, this change doesn't break anything for them in
> > >> the first place, so why bring that up?
> > >
> > > I dont see a specific value here. U-boot just works. For folks who want
> > > direct TFA to kernel jump (which is a niche fast boot usecase), go ahead
> > > and use TFA with the mentioned build option.
> >
>
> IMHO, there is a simpler alternate solution - build TFA, dtb etc in the
> model of your desire. let us leave the defaults be.
>
> I will let Tom and other U-boot maintainers make their choice, as TFA
> maintainer, I have already rejected the approach. it is already
> PRELOADED_BL33_BASE ?= 0x80080000 which allows for override at build
> time instead of all the massive rework and downstream ecosystem impact.
Thanks Nishanth. As you point out, all of the relevant projects need to
stay in sync for this to be useful and I agree with your position so
this is nak'd here too.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
2025-04-17 14:16 ` Tom Rini
@ 2025-04-22 6:59 ` Ahmad Fatoum
0 siblings, 0 replies; 14+ messages in thread
From: Ahmad Fatoum @ 2025-04-22 6:59 UTC (permalink / raw)
To: Tom Rini, Nishanth Menon
Cc: Anshul Dalal, Andrew Davis, u-boot, vigneshr, robertcnelson,
w.egorov, francesco.dolcini, ggiordano, m-chawdhry, a-nandan
Hi,
On 17.04.25 16:16, Tom Rini wrote:
> On Thu, Apr 17, 2025 at 06:30:13AM -0500, Nishanth Menon wrote:
>>>> I dont see a specific value here. U-boot just works. For folks who want
>>>> direct TFA to kernel jump (which is a niche fast boot usecase), go ahead
>>>> and use TFA with the mentioned build option.
>>>
>>
>> IMHO, there is a simpler alternate solution - build TFA, dtb etc in the
>> model of your desire. let us leave the defaults be.
>>
>> I will let Tom and other U-boot maintainers make their choice, as TFA
>> maintainer, I have already rejected the approach. it is already
>> PRELOADED_BL33_BASE ?= 0x80080000 which allows for override at build
>> time instead of all the massive rework and downstream ecosystem impact.
>
> Thanks Nishanth. As you point out, all of the relevant projects need to
> stay in sync for this to be useful and I agree with your position so
> this is nak'd here too.
The i.MX folks also did some switcheroos with the TF-A load address (BL31
though [1]) and at least in barebox (running as BL2), it ended up wasting
a lot of time of everyone involved that could have been put to more
productive use.
So thanks Nishanth and Tom for saving AM6x users from the same hassle.
[1]: https://github.com/barebox/barebox/commit/199aabdc7
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-04-22 6:59 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-16 7:30 [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 1/4] spl: Kconfig: k3: set SPL_TEXT_BASE to 0x82200000 Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 2/4] mach-k3: add a jump stub to support older ATF builds Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 3/4] binman: k3: add jump-stub to tispl.bin Anshul Dalal
2025-04-16 7:30 ` [PATCH v1 4/4] binman: k3: add jump-stub as loadable Anshul Dalal
2025-04-16 11:24 ` [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address Nishanth Menon
2025-04-16 13:48 ` Anshul Dalal
2025-04-16 15:05 ` Nishanth Menon
2025-04-16 16:38 ` Andrew Davis
2025-04-16 19:51 ` Nishanth Menon
2025-04-17 9:21 ` Anshul Dalal
2025-04-17 11:30 ` Nishanth Menon
2025-04-17 14:16 ` Tom Rini
2025-04-22 6:59 ` Ahmad Fatoum
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.