From: Anshul Dalal <anshuld@ti.com>
To: Nishanth Menon <nm@ti.com>
Cc: <u-boot@lists.denx.de>, <vigneshr@ti.com>, <trini@konsulko.com>,
<robertcnelson@gmail.com>, <w.egorov@phytec.de>,
<francesco.dolcini@toradex.com>, <ggiordano@phytec.com>,
<m-chawdhry@ti.com>, <a-nandan@ti.com>
Subject: Re: [PATCH v1 0/4] k3: migrate SPL_TEXT_BASE to new address
Date: Wed, 16 Apr 2025 19:18:54 +0530 [thread overview]
Message-ID: <D983ZXCIAF06.2I0POMKUFPF2L@ti.com> (raw)
In-Reply-To: <20250416112418.nod2fut4v77qlmfq@hummus>
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
>>
next prev parent reply other threads:[~2025-04-16 13:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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=D983ZXCIAF06.2I0POMKUFPF2L@ti.com \
--to=anshuld@ti.com \
--cc=a-nandan@ti.com \
--cc=francesco.dolcini@toradex.com \
--cc=ggiordano@phytec.com \
--cc=m-chawdhry@ti.com \
--cc=nm@ti.com \
--cc=robertcnelson@gmail.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
--cc=w.egorov@phytec.de \
/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.