From: Paul Kocialkowski <paulk@sys-base.io>
To: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Cc: u-boot@lists.denx.de, "Tom Rini" <trini@konsulko.com>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"André Przywara" <andre.przywara@arm.com>,
"Cody Eksal" <masterr3c0rd@epochal.quest>
Subject: Re: [PATCH] ARM: fdt: copy TF-A reserved memory into fdt passed to Linux
Date: Mon, 15 Jun 2026 12:30:57 +0200 [thread overview]
Message-ID: <ai_UYZEnjO4H2cUK@collins> (raw)
In-Reply-To: <95c289a3e64993c54b1e21737a74e794f90b9c13.camel@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2438 bytes --]
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.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-06-15 10:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-13 20:41 [PATCH] ARM: fdt: copy TF-A reserved memory into fdt passed to Linux Alexander Sverdlin
2026-06-14 13:54 ` Paul Kocialkowski
2026-06-14 18:57 ` Alexander Sverdlin
2026-06-14 21:06 ` Paul Kocialkowski
2026-06-14 22:08 ` Alexander Sverdlin
2026-06-15 10:30 ` Paul Kocialkowski [this message]
2026-06-16 14:10 ` Andre Przywara
2026-06-16 14:11 ` Andre Przywara
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=ai_UYZEnjO4H2cUK@collins \
--to=paulk@sys-base.io \
--cc=alexander.sverdlin@gmail.com \
--cc=andre.przywara@arm.com \
--cc=jernej.skrabec@gmail.com \
--cc=masterr3c0rd@epochal.quest \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.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.