* RZG2L and DTB blob from TF-A
@ 2025-09-16 12:49 Mathieu Othacehe
2025-09-16 13:29 ` Marek Vasut
0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Othacehe @ 2025-09-16 12:49 UTC (permalink / raw)
To: marek.vasut+renesas, paul; +Cc: u-boot, anton.reding
Hello,
I am working on the RZG2L devkit from Renesas and trying to get the
mainline U-Boot working there.
I have noticed that in several locations, U-Boot is unconditionally
expecting the TF-A to pass a DTB blob:
In board/renesas/rzg2l/rzg2l.c:
--8<---------------cut here---------------start------------->8---
static void apply_atf_overlay(void *fdt_blob)
{
void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
...
}
--8<---------------cut here---------------end--------------->8---
In arch/arm/mach-renesas/cpu_info-rzg2l.c:
--8<---------------cut here---------------start------------->8---
static const struct tfa_info *get_tfa_info(void)
{
void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
...
}
--8<---------------cut here---------------end--------------->8---
Now, the TF-A that I have compiled (v2.5/rzg2l-1.00-43-g950d6a6b9) from
https://github.com/renesas-rz/rzg_trusted-firmware-a.git is not passing
any DTB blob:
--8<---------------cut here---------------start------------->8---
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x50000000
INFO: SPSR = 0x3c5
VERBOSE: Argument #0 = 0x0
VERBOSE: Argument #1 = 0x0
VERBOSE: Argument #2 = 0x0
VERBOSE: Argument #3 = 0x0
VERBOSE: Argument #4 = 0x0
VERBOSE: Argument #5 = 0x0
VERBOSE: Argument #6 = 0x0
VERBOSE: Argument #7 = 0x0
--8<---------------cut here---------------end--------------->8---
That results in dereferencing a NULL pointer and failing to run U-Boot
on that platform. On the other hand, disabling the two pieces of code
mentioned below is enough to have a working U-Boot.
It does not seem that the upstream TF-A has support for the RZG2L
CPU. So my question is, what is the expected TF-A branch / repository
that is meant to be used together with the renesas_rzg2l_smarc_defconfig
U-Boot configuration?
Thanks in advance,
Mathieu
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: RZG2L and DTB blob from TF-A
2025-09-16 12:49 RZG2L and DTB blob from TF-A Mathieu Othacehe
@ 2025-09-16 13:29 ` Marek Vasut
2025-09-16 14:02 ` Biju Das
0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2025-09-16 13:29 UTC (permalink / raw)
To: Mathieu Othacehe, paul, Biju Das, Chris Paterson; +Cc: u-boot, anton.reding
On 9/16/25 2:49 PM, Mathieu Othacehe wrote:
>
> Hello,
+CC Biju, Chris
> I am working on the RZG2L devkit from Renesas and trying to get the
> mainline U-Boot working there.
>
> I have noticed that in several locations, U-Boot is unconditionally
> expecting the TF-A to pass a DTB blob:
>
> In board/renesas/rzg2l/rzg2l.c:
>
> --8<---------------cut here---------------start------------->8---
> static void apply_atf_overlay(void *fdt_blob)
> {
> void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
> ...
> }
> --8<---------------cut here---------------end--------------->8---
>
> In arch/arm/mach-renesas/cpu_info-rzg2l.c:
>
> --8<---------------cut here---------------start------------->8---
> static const struct tfa_info *get_tfa_info(void)
> {
> void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
> ...
> }
> --8<---------------cut here---------------end--------------->8---
>
> Now, the TF-A that I have compiled (v2.5/rzg2l-1.00-43-g950d6a6b9) from
> https://github.com/renesas-rz/rzg_trusted-firmware-a.git is not passing
> any DTB blob:
>
> --8<---------------cut here---------------start------------->8---
> INFO: BL31: Preparing for EL3 exit to normal world
> INFO: Entry point address = 0x50000000
> INFO: SPSR = 0x3c5
> VERBOSE: Argument #0 = 0x0
> VERBOSE: Argument #1 = 0x0
> VERBOSE: Argument #2 = 0x0
> VERBOSE: Argument #3 = 0x0
> VERBOSE: Argument #4 = 0x0
> VERBOSE: Argument #5 = 0x0
> VERBOSE: Argument #6 = 0x0
> VERBOSE: Argument #7 = 0x0
> --8<---------------cut here---------------end--------------->8---
>
> That results in dereferencing a NULL pointer and failing to run U-Boot
> on that platform. On the other hand, disabling the two pieces of code
> mentioned below is enough to have a working U-Boot.
>
> It does not seem that the upstream TF-A has support for the RZG2L
> CPU. So my question is, what is the expected TF-A branch / repository
> that is meant to be used together with the renesas_rzg2l_smarc_defconfig
> U-Boot configuration?
>
> Thanks in advance,
Software versions would be good to include, U-Boot version, TFA version.
--
Best regards,
Marek Vasut
^ permalink raw reply [flat|nested] 9+ messages in thread* RE: RZG2L and DTB blob from TF-A
2025-09-16 13:29 ` Marek Vasut
@ 2025-09-16 14:02 ` Biju Das
2025-09-18 12:54 ` Mathieu Othacehe
0 siblings, 1 reply; 9+ messages in thread
From: Biju Das @ 2025-09-16 14:02 UTC (permalink / raw)
To: marek.vasut@mailbox.org, Mathieu Othacehe, paul@pbarker.dev,
Chris Paterson
Cc: u-boot@lists.denx.de, anton.reding@landisgyr.com
> -----Original Message-----
> From: Marek Vasut <marek.vasut@mailbox.org>
> Sent: 16 September 2025 14:29
> To: Mathieu Othacehe <othacehe@gnu.org>; paul@pbarker.dev; Biju Das <biju.das.jz@bp.renesas.com>; Chris
> Paterson <Chris.Paterson2@renesas.com>
> Cc: u-boot@lists.denx.de; anton.reding@landisgyr.com
> Subject: Re: RZG2L and DTB blob from TF-A
>
> On 9/16/25 2:49 PM, Mathieu Othacehe wrote:
> >
> > Hello,
>
> +CC Biju, Chris
>
> > I am working on the RZG2L devkit from Renesas and trying to get the
> > mainline U-Boot working there.
> >
> > I have noticed that in several locations, U-Boot is unconditionally
> > expecting the TF-A to pass a DTB blob:
> >
> > In board/renesas/rzg2l/rzg2l.c:
> >
> > --8<---------------cut here---------------start------------->8---
> > static void apply_atf_overlay(void *fdt_blob) {
> > void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
> > ...
> > }
> > --8<---------------cut here---------------end--------------->8---
> >
> > In arch/arm/mach-renesas/cpu_info-rzg2l.c:
> >
> > --8<---------------cut here---------------start------------->8---
> > static const struct tfa_info *get_tfa_info(void) {
> > void *atf_fdt_blob = (void *)(rcar_atf_boot_args[1]);
> > ...
> > }
> > --8<---------------cut here---------------end--------------->8---
> >
> > Now, the TF-A that I have compiled (v2.5/rzg2l-1.00-43-g950d6a6b9)
> > from https://github.com/renesas-rz/rzg_trusted-firmware-a.git is not
> > passing any DTB blob:
> >
> > --8<---------------cut here---------------start------------->8---
> > INFO: BL31: Preparing for EL3 exit to normal world
> > INFO: Entry point address = 0x50000000
> > INFO: SPSR = 0x3c5
> > VERBOSE: Argument #0 = 0x0
> > VERBOSE: Argument #1 = 0x0
> > VERBOSE: Argument #2 = 0x0
> > VERBOSE: Argument #3 = 0x0
> > VERBOSE: Argument #4 = 0x0
> > VERBOSE: Argument #5 = 0x0
> > VERBOSE: Argument #6 = 0x0
> > VERBOSE: Argument #7 = 0x0
> > --8<---------------cut here---------------end--------------->8---
> >
> > That results in dereferencing a NULL pointer and failing to run U-Boot
> > on that platform. On the other hand, disabling the two pieces of code
> > mentioned below is enough to have a working U-Boot.
> >
> > It does not seem that the upstream TF-A has support for the RZG2L CPU.
> > So my question is, what is the expected TF-A branch / repository that
> > is meant to be used together with the renesas_rzg2l_smarc_defconfig
> > U-Boot configuration?
> >
> > Thanks in advance,
>
> Software versions would be good to include, U-Boot version, TFA version.
Use the commit 72c86c0af01e007b5542f39823d9e6140937b439
plat: renesas: rz: Disable unused CRYPTO_SUPPORT
Also, you need a patch to identify the device and pass it as blob
to the mainline u-boot
On TF-A:
.ep_info.args.arg1 = (uintptr_t)fdt_blob,
Also you should fill the memory blob(fdt_blob).
Hope you can take over from here.
Cheers,
Biju
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: RZG2L and DTB blob from TF-A
2025-09-16 14:02 ` Biju Das
@ 2025-09-18 12:54 ` Mathieu Othacehe
2025-09-18 13:11 ` Biju Das
2025-09-18 13:14 ` Marek Vasut
0 siblings, 2 replies; 9+ messages in thread
From: Mathieu Othacehe @ 2025-09-18 12:54 UTC (permalink / raw)
To: Biju Das
Cc: marek.vasut@mailbox.org, paul@pbarker.dev, Chris Paterson,
u-boot@lists.denx.de, anton.reding@landisgyr.com
Hey,
> Also, you need a patch to identify the device and pass it as blob
> to the mainline u-boot
>
> On TF-A:
> .ep_info.args.arg1 = (uintptr_t)fdt_blob,
>
> Also you should fill the memory blob(fdt_blob).
>
> Hope you can take over from here.
Thanks Marek and Biju. The current state is still that people will take
the forked Renesas TF-A, the mainline U-Boot with the
renesas_rzg2l_smarc_defconfig configuration and expect things to work
out of the box.
Currently, before figuring out that the TF-A needs to be patched
manually, U-Boot is just crashing without outputing anything, which is
painful to debug.
As the only RZG2L supported by U-Boot is the r9a07g044l2-smarc, and we
are not receiving any blob from the TF-A, I think it is fair to assume
that we are booting from the platform we are compiling U-Boot for.
I have proposed a patch here:
https://lists.denx.de/pipermail/u-boot/2025-September/598712.html
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: RZG2L and DTB blob from TF-A
2025-09-18 12:54 ` Mathieu Othacehe
@ 2025-09-18 13:11 ` Biju Das
2025-09-18 14:33 ` Mathieu Othacehe
2025-09-18 13:14 ` Marek Vasut
1 sibling, 1 reply; 9+ messages in thread
From: Biju Das @ 2025-09-18 13:11 UTC (permalink / raw)
To: Mathieu Othacehe
Cc: marek.vasut@mailbox.org, paul@pbarker.dev, Chris Paterson,
u-boot@lists.denx.de, anton.reding@landisgyr.com
Hi Mathieu,
> -----Original Message-----
> From: Mathieu Othacehe <othacehe@gnu.org>
> Sent: 18 September 2025 13:55
> Subject: Re: RZG2L and DTB blob from TF-A
>
>
> Hey,
>
> > Also, you need a patch to identify the device and pass it as blob to
> > the mainline u-boot
> >
> > On TF-A:
> > .ep_info.args.arg1 = (uintptr_t)fdt_blob,
> >
> > Also you should fill the memory blob(fdt_blob).
> >
> > Hope you can take over from here.
>
> Thanks Marek and Biju. The current state is still that people will take the forked Renesas TF-A, the
> mainline U-Boot with the renesas_rzg2l_smarc_defconfig configuration and expect things to work out of
> the box.
>
> Currently, before figuring out that the TF-A needs to be patched manually, U-Boot is just crashing
> without outputing anything, which is painful to debug.
>
> As the only RZG2L supported by U-Boot is the r9a07g044l2-smarc, and we are not receiving any blob from
> the TF-A, I think it is fair to assume that we are booting from the platform we are compiling U-Boot
> for.
>
> I have proposed a patch here:
> https://lists.denx.de/pipermail/u-boot/2025-September/598712.html
We need common TF-A implementation for Renesas R-Car and RZ/G2 based platforms
Also single U-boot for all RZ/G2L family. To achieve this, you need to pass fdtblob from
TF_A.
Marek previously suggested on RZ/G2M that to upstream U-boot, you need to upstream
TF_A first.
For RZ/G2L that did not happen for some reason.
I suggest
push a version TF_A that works with mainline u-boot in github first.
Or
mainline the TF_A first for RZ/G2L, So that the mainline U-boot inline with TF-A.
Cheers,
Biju
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RZG2L and DTB blob from TF-A
2025-09-18 13:11 ` Biju Das
@ 2025-09-18 14:33 ` Mathieu Othacehe
2025-09-18 14:41 ` Biju Das
0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Othacehe @ 2025-09-18 14:33 UTC (permalink / raw)
To: Biju Das
Cc: marek.vasut@mailbox.org, paul@pbarker.dev, Chris Paterson,
u-boot@lists.denx.de, anton.reding@landisgyr.com
Hello,
> For RZ/G2L that did not happen for some reason.
>
> I suggest
>
> push a version TF_A that works with mainline u-boot in github first.
That seems like something that can be done first, so that at least
there's a way to have Renesas TF-A + U-Boot mainline to work together.
> mainline the TF_A first for RZ/G2L, So that the mainline U-boot inline with TF-A.
That would be the ideal but it will take more time, so starting by
option 1. would at least cover the transition period.
I can propose a patch on Renesas TF-A to pass a DTB blob on the RZG2L
platform as well. From the snippet you sent me, it looks like you may
have one ready somewhere though?
Thanks,
Mathieu
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: RZG2L and DTB blob from TF-A
2025-09-18 14:33 ` Mathieu Othacehe
@ 2025-09-18 14:41 ` Biju Das
2025-10-07 6:41 ` Biju Das
0 siblings, 1 reply; 9+ messages in thread
From: Biju Das @ 2025-09-18 14:41 UTC (permalink / raw)
To: Mathieu Othacehe
Cc: marek.vasut@mailbox.org, paul@pbarker.dev, Chris Paterson,
u-boot@lists.denx.de, anton.reding@landisgyr.com
Hi Mathieu Othace,
> -----Original Message-----
> From: Mathieu Othacehe <othacehe@gnu.org>
> Sent: 18 September 2025 15:34
> Subject: Re: RZG2L and DTB blob from TF-A
>
>
> Hello,
>
> > For RZ/G2L that did not happen for some reason.
> >
> > I suggest
> >
> > push a version TF_A that works with mainline u-boot in github first.
>
> That seems like something that can be done first, so that at least there's a way to have Renesas TF-A +
> U-Boot mainline to work together.
>
> > mainline the TF_A first for RZ/G2L, So that the mainline U-boot inline with TF-A.
>
> That would be the ideal but it will take more time, so starting by option 1. would at least cover the
> transition period.
>
> I can propose a patch on Renesas TF-A to pass a DTB blob on the RZG2L platform as well. From the
> snippet you sent me, it looks like you may have one ready somewhere though?
Yes, I shared the details to BSP TF_A team to integrate with v2.9/rz and push it to github.
This will enable to work on mainline U-boot as well for having single U-boot for all RZ/G2L SoCs.
I will update you if I get any feedback.
Cheers,
Biju
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: RZG2L and DTB blob from TF-A
2025-09-18 14:41 ` Biju Das
@ 2025-10-07 6:41 ` Biju Das
0 siblings, 0 replies; 9+ messages in thread
From: Biju Das @ 2025-10-07 6:41 UTC (permalink / raw)
To: Mathieu Othacehe
Cc: marek.vasut@mailbox.org, paul@pbarker.dev, Chris Paterson,
u-boot@lists.denx.de, anton.reding@landisgyr.com
Hi Mathieu Othacehe,
> -----Original Message-----
> From: Biju Das
> Sent: 18 September 2025 15:41
> To: 'Mathieu Othacehe' <othacehe@gnu.org>
> Cc: marek.vasut@mailbox.org; paul@pbarker.dev; Chris Paterson <Chris.Paterson2@renesas.com>; u-
> boot@lists.denx.de; anton.reding@landisgyr.com
> Subject: RE: RZG2L and DTB blob from TF-A
>
> Hi Mathieu Othace,
>
> > -----Original Message-----
> > From: Mathieu Othacehe <othacehe@gnu.org>
> > Sent: 18 September 2025 15:34
> > Subject: Re: RZG2L and DTB blob from TF-A
> >
> >
> > Hello,
> >
> > > For RZ/G2L that did not happen for some reason.
> > >
> > > I suggest
> > >
> > > push a version TF_A that works with mainline u-boot in github first.
> >
> > That seems like something that can be done first, so that at least
> > there's a way to have Renesas TF-A + U-Boot mainline to work together.
> >
> > > mainline the TF_A first for RZ/G2L, So that the mainline U-boot inline with TF-A.
> >
> > That would be the ideal but it will take more time, so starting by
> > option 1. would at least cover the transition period.
> >
> > I can propose a patch on Renesas TF-A to pass a DTB blob on the RZG2L
> > platform as well. From the snippet you sent me, it looks like you may have one ready somewhere
> though?
>
> Yes, I shared the details to BSP TF_A team to integrate with v2.9/rz and push it to github.
> This will enable to work on mainline U-boot as well for having single U-boot for all RZ/G2L SoCs.
>
> I will update you if I get any feedback.
>
There is a public TF_A [1] that can support mainline RZ/G2{L,LC} U-boot.
I can see fdt_blob setup in [2]
[1]
https://github.com/renesas-rz/rzg_trusted-firmware-a/tree/2.10.5/rz_1.1.0
[2]
https://github.com/renesas-rz/rzg_trusted-firmware-a/blob/2.10.5/rz_1.1.0/plat/renesas/rz/common/bl2_plat_setup.c
Cheers,
Biju
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: RZG2L and DTB blob from TF-A
2025-09-18 12:54 ` Mathieu Othacehe
2025-09-18 13:11 ` Biju Das
@ 2025-09-18 13:14 ` Marek Vasut
1 sibling, 0 replies; 9+ messages in thread
From: Marek Vasut @ 2025-09-18 13:14 UTC (permalink / raw)
To: Mathieu Othacehe, Biju Das
Cc: paul@pbarker.dev, Chris Paterson, u-boot@lists.denx.de,
anton.reding@landisgyr.com
On 9/18/25 2:54 PM, Mathieu Othacehe wrote:
Hello everyone,
>> Also, you need a patch to identify the device and pass it as blob
>> to the mainline u-boot
>>
>> On TF-A:
>> .ep_info.args.arg1 = (uintptr_t)fdt_blob,
>>
>> Also you should fill the memory blob(fdt_blob).
>>
>> Hope you can take over from here.
>
> Thanks Marek and Biju. The current state is still that people will take
> the forked Renesas TF-A
Why not take mainline TFA ? Maybe there is no TFA for G2L upstream (yet) ?
> , the mainline U-Boot with the
> renesas_rzg2l_smarc_defconfig configuration and expect things to work
> out of the box.
>
> Currently, before figuring out that the TF-A needs to be patched
> manually, U-Boot is just crashing without outputing anything, which is
> painful to debug.
>
> As the only RZG2L supported by U-Boot is the r9a07g044l2-smarc, and we
> are not receiving any blob from the TF-A, I think it is fair to assume
> that we are booting from the platform we are compiling U-Boot for.
>
> I have proposed a patch here:
> https://lists.denx.de/pipermail/u-boot/2025-September/598712.html
I'll reply to the patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2025-10-07 13:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 12:49 RZG2L and DTB blob from TF-A Mathieu Othacehe
2025-09-16 13:29 ` Marek Vasut
2025-09-16 14:02 ` Biju Das
2025-09-18 12:54 ` Mathieu Othacehe
2025-09-18 13:11 ` Biju Das
2025-09-18 14:33 ` Mathieu Othacehe
2025-09-18 14:41 ` Biju Das
2025-10-07 6:41 ` Biju Das
2025-09-18 13:14 ` Marek Vasut
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.