[PATCH] ARM: fdt: copy TF-A reserved memory into fdt passed to Linux

Paul Kocialkowski paulk at sys-base.io
Mon Jun 15 12:30:57 CEST 2026


Hi Alexander,

Le Mon 15 Jun 26, 00:08, Alexander Sverdlin a écrit :
> Hi Paul,
> 
> On Sun, 2026-06-14 at 23:06 +0200, Paul Kocialkowski wrote:
> > > > But another thing we do overwrite current is the cpu idle states, which
> > > > are added by fdt_add_cpu_idle_states in tf-a. These are only set when the
> > > > SCP firmware is available (which is checked at run-time) and they are
> > > > never propagated to the final device-tree. Including the definitions
> > > > statically would result in cpu idle calls done even without the SCP
> > > > firmware, which would probably fail (although maybe some states can
> > > > still be supported).
> > > 
> > > Do you refer to some unmerged code? Didn't find it in the current TF-A
> > > sources...
> > 
> > fdt_add_cpu_idle_states is in common/fdt_fixup.c and it is called by the
> > common allwinner code in plat/allwinner/common/sunxi_prepare_dtb.c based
> > on the sunxi_psci_is_scpi check (which currently always returns false
> > for A133).
> 
> sorry, I misunderstood you initially, I though there are some data structures
> of the SCP firmware which are being overwritten by Linux, but it turns out,
> you refer to idle-states node and compatible = "arm,idle-state" subnodes...
> But contrary to /reserved-memory nodes for TF-A, these are fixed for a SoC
> model, even if you'd like to load SCP firmware at a different address, right?

The nodes are only inserted by TF-A when the SCP firmware is present.
They should not be there without it so we cannot just have them always
present in the static device-tree declarations.

> It looks to me that all other machines/SoCs do define this stuff statically
> in the Linux DT.

I guess most of them don't consider the SCP firmware as optional but
make it a hard requirement. For Allwinner it is optional (and it's very
nice that way).

> I have a feeling, that idle-states node is more like a "contract" or an API
> between FW and Linux and is supposed to change less frequently, while loading
> TF-A to a completely different address would be transparent to Linux, as long
> as we properly copy /reserved-memory nodes.

You could see it that way yes.

All the best,

Paul

-- 
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260615/3090af52/attachment.sig>


More information about the U-Boot mailing list