From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: <imx@lists.linux.dev>, <robh@kernel.org>, <conor+dt@kernel.org>,
<devicetree@vger.kernel.org>, <Frank.Li@kernel.org>
Subject: Re: [PATCH 2/5] arm: dts: st: Import optee node from u-boot device trees
Date: Mon, 13 Jul 2026 09:36:29 +0200 [thread overview]
Message-ID: <DJX9RKO8ROIP.1JOJVXZ11PANJ@bootlin.com> (raw)
In-Reply-To: <20260710153944.BFC9B1F000E9@smtp.kernel.org>
On Fri Jul 10, 2026 at 5:39 PM CEST, sashiko-bot wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [High] Missing `bootph-pre-ram` property in the newly added `optee@fe000000` reserved memory node for `stm32mp157c-ed1.dts`, which will cause U-Boot to strip the reservation during SPL and pre-relocation, leading to memory corruption.
> --
>
> --- Patch [2]: [PATCH 2/5] arm: dts: st: Import optee node from u-boot device trees ---
> commit e001824900768a597c1390aaf3fe0b9e2c46bdd1
> Author: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
>
> arm: dts: st: Import optee node from u-boot device trees
>
> U-Boot is importing kernel device trees for these platforms, but adding
> a firmware node to enable communication with OP-TEE. Importing
> changes here will allow to remove these additions in U-Boot.
>
> [ ... ]
>
>> diff --git a/arch/arm/boot/dts/st/stm32mp157c-ed1.dts b/arch/arm/boot/dts/st/stm32mp157c-ed1.dts
>> index 49dd555cc228c..7da7260350869 100644
>> --- a/arch/arm/boot/dts/st/stm32mp157c-ed1.dts
>> +++ b/arch/arm/boot/dts/st/stm32mp157c-ed1.dts
>> @@ -70,6 +70,18 @@ retram: retram@38000000 {
>> reg = <0x38000000 0x10000>;
>> no-map;
>> };
>> +
>> + optee@fe000000 {
>> + reg = <0xfe000000 0x02000000>;
>> + no-map;
>> + };
>
> [Severity: High]
> Does this optee reserved memory node also need the bootph-pre-ram property
> like the one added for stm32mp157a-dk1.dts?
>
> Without the bootph-pre-ram property, U-Boot's fdtgrep utility strips the
> optee reserved-memory node from the SPL and pre-relocation device trees.
>
> Because U-Boot typically relocates itself to the top of available RAM (which
> on this platform overlaps with 0xfe000000), omitting this reservation could
> allow U-Boot to allocate over OP-TEE's secure memory region, potentially
> causing data corruption or TrustZone violations.
I'm a bit torn on this point.
So first, this commit only imports existing code, so I was not planning
to modify the device tree. But looking at the docs, and the
stm32mp157a-dk1.dts file, I suspect bootph-pre-ram is also needed here.
I will probably add a separate commit, adding bootph-pre-ram tag.
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2026-07-13 7:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 15:31 [PATCH 0/5] Import optee node from u-boot device trees Mathieu Dubois-Briand
2026-07-10 15:31 ` [PATCH 1/5] arm64: dts: freescale: " Mathieu Dubois-Briand
2026-07-10 21:09 ` Frank Li
2026-07-13 7:42 ` Mathieu Dubois-Briand
2026-07-10 15:31 ` [PATCH 2/5] arm: dts: st: " Mathieu Dubois-Briand
2026-07-10 15:39 ` sashiko-bot
2026-07-13 7:36 ` Mathieu Dubois-Briand [this message]
2026-07-10 15:31 ` [PATCH 3/5] arm64: dts: hisilicon: hi3798cv200-poplar: Import optee node from u-boot device tree Mathieu Dubois-Briand
2026-07-10 15:31 ` [PATCH 4/5] arm64: dts: nuvoton: npcm845-evb: " Mathieu Dubois-Briand
2026-07-10 15:31 ` [PATCH 5/5] arm64: dts: freescale: imx93-frdm: Add OP-TEE device tree node Mathieu Dubois-Briand
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=DJX9RKO8ROIP.1JOJVXZ11PANJ@bootlin.com \
--to=mathieu.dubois-briand@bootlin.com \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.