* [PATCH] sunxi: a133: adjust TF-A load address
@ 2026-10-29 23:37 Andre Przywara
2026-10-30 15:33 ` Paul Kocialkowski
2026-10-30 16:08 ` Parthiban
0 siblings, 2 replies; 3+ messages in thread
From: Andre Przywara @ 2026-10-29 23:37 UTC (permalink / raw)
To: u-boot; +Cc: linux-sunxi, Paul Kocialkowski, Mikhail Kalashnikov
When development of the Allwinner A133 TF-A port started, BL31 was put
in SRAM, like on the similar H6 SoC. Consequently we used the same SRAM
address as the H6 in the Kconfig stanza of the A133 U-Boot port.
Later we realised that the SRAM space will become too tight, in fact it
was already spilling over into SRAM C, which we cannot use any more at
runtime, once the display engine is used. So the mainline TF-A port
eventually put BL31 in DRAM, which of course requires a different load
address.
Adjust the BL31 load address to use the same DRAM location as the (almost
SRAM-less) H616, by just adjusting the match pattern, to not let the A133
fall through to the SUN50I_GEN_H6 symbol.
This allows U-Boot to use the now merged mainline TF-A port for the A133.
This is unfortunately a breaking change, but there is not much we can do
about it, and since U-Boot packages TF-A in our booting scheme, we have
that under control.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
arch/arm/mach-sunxi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
index b0c5d3cd903..b7ee14c6678 100644
--- a/arch/arm/mach-sunxi/Kconfig
+++ b/arch/arm/mach-sunxi/Kconfig
@@ -267,7 +267,7 @@ config SUNXI_RVBAR_ALTERNATIVE
config SUNXI_BL31_BASE
hex
default 0x00044000 if MACH_SUN50I || MACH_SUN50I_H5
- default 0x40000000 if MACH_SUN50I_H616
+ default 0x40000000 if MACH_SUN50I_H616 || MACH_SUN50I_A133
default 0x00104000 if SUN50I_GEN_H6
default 0x00054000 if MACH_SUN55I_A523
default 0x0
--
2.46.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] sunxi: a133: adjust TF-A load address
2026-10-29 23:37 [PATCH] sunxi: a133: adjust TF-A load address Andre Przywara
@ 2026-10-30 15:33 ` Paul Kocialkowski
2026-10-30 16:08 ` Parthiban
1 sibling, 0 replies; 3+ messages in thread
From: Paul Kocialkowski @ 2026-10-30 15:33 UTC (permalink / raw)
To: Andre Przywara; +Cc: u-boot, linux-sunxi, Mikhail Kalashnikov
[-- Attachment #1: Type: text/plain, Size: 2487 bytes --]
Hi Andre,
On Fri 30 Oct 26, 00:37, Andre Przywara wrote:
> When development of the Allwinner A133 TF-A port started, BL31 was put
> in SRAM, like on the similar H6 SoC. Consequently we used the same SRAM
> address as the H6 in the Kconfig stanza of the A133 U-Boot port.
>
> Later we realised that the SRAM space will become too tight, in fact it
> was already spilling over into SRAM C, which we cannot use any more at
> runtime, once the display engine is used. So the mainline TF-A port
> eventually put BL31 in DRAM, which of course requires a different load
> address.
>
> Adjust the BL31 load address to use the same DRAM location as the (almost
> SRAM-less) H616, by just adjusting the match pattern, to not let the A133
> fall through to the SUN50I_GEN_H6 symbol.
> This allows U-Boot to use the now merged mainline TF-A port for the A133.
>
> This is unfortunately a breaking change, but there is not much we can do
> about it, and since U-Boot packages TF-A in our booting scheme, we have
> that under control.
Thanks for submitting this! I agree this is the right thing to do.
Also note that I've been using the 0x104000 SRAM address as base for the
crust SCP firmware, which will be submitted once crust support is there.
Another aspect is that I'm not sure we actually lock down the address in
the TZC, so it's likely that Linux could still overwrite the TF-A code.
But that's a TF-A problem, not a U-Boot problem.
Reviewed-by: Paul Kocialkowski <paulk@sys-base.io>
All the best,
Paul
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> arch/arm/mach-sunxi/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index b0c5d3cd903..b7ee14c6678 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -267,7 +267,7 @@ config SUNXI_RVBAR_ALTERNATIVE
> config SUNXI_BL31_BASE
> hex
> default 0x00044000 if MACH_SUN50I || MACH_SUN50I_H5
> - default 0x40000000 if MACH_SUN50I_H616
> + default 0x40000000 if MACH_SUN50I_H616 || MACH_SUN50I_A133
> default 0x00104000 if SUN50I_GEN_H6
> default 0x00054000 if MACH_SUN55I_A523
> default 0x0
> --
> 2.46.4
>
--
Paul Kocialkowski,
Independent contractor - sys-base - https://www.sys-base.io/
Free software developer - https://www.paulk.fr/
Expert in multimedia, graphics and embedded hardware support with Linux.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sunxi: a133: adjust TF-A load address
2026-10-29 23:37 [PATCH] sunxi: a133: adjust TF-A load address Andre Przywara
2026-10-30 15:33 ` Paul Kocialkowski
@ 2026-10-30 16:08 ` Parthiban
1 sibling, 0 replies; 3+ messages in thread
From: Parthiban @ 2026-10-30 16:08 UTC (permalink / raw)
To: Andre Przywara, u-boot
Cc: parthiban, linux-sunxi, Paul Kocialkowski, Mikhail Kalashnikov
On 10/30/26 12:37 AM, Andre Przywara wrote:
> When development of the Allwinner A133 TF-A port started, BL31 was put
> in SRAM, like on the similar H6 SoC. Consequently we used the same SRAM
> address as the H6 in the Kconfig stanza of the A133 U-Boot port.
>
> Later we realised that the SRAM space will become too tight, in fact it
> was already spilling over into SRAM C, which we cannot use any more at
> runtime, once the display engine is used. So the mainline TF-A port
> eventually put BL31 in DRAM, which of course requires a different load
> address.
>
> Adjust the BL31 load address to use the same DRAM location as the (almost
> SRAM-less) H616, by just adjusting the match pattern, to not let the A133
> fall through to the SUN50I_GEN_H6 symbol.
> This allows U-Boot to use the now merged mainline TF-A port for the A133.
>
> This is unfortunately a breaking change, but there is not much we can do
> about it, and since U-Boot packages TF-A in our booting scheme, we have
> that under control.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> arch/arm/mach-sunxi/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
> index b0c5d3cd903..b7ee14c6678 100644
> --- a/arch/arm/mach-sunxi/Kconfig
> +++ b/arch/arm/mach-sunxi/Kconfig
> @@ -267,7 +267,7 @@ config SUNXI_RVBAR_ALTERNATIVE
> config SUNXI_BL31_BASE
> hex
> default 0x00044000 if MACH_SUN50I || MACH_SUN50I_H5
> - default 0x40000000 if MACH_SUN50I_H616
> + default 0x40000000 if MACH_SUN50I_H616 || MACH_SUN50I_A133
Thanks for the changes.
Reviewed-by: Parthiban Nallathambi <parthiban@linumiz.com>
Thanks,
Parthiban
> default 0x00104000 if SUN50I_GEN_H6
> default 0x00054000 if MACH_SUN55I_A523
> default 0x0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-10-30 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 23:37 [PATCH] sunxi: a133: adjust TF-A load address Andre Przywara
2026-10-30 15:33 ` Paul Kocialkowski
2026-10-30 16:08 ` Parthiban
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox