From: sashiko-bot@kernel.org
To: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
Frank.Li@kernel.org, robh@kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v2 3/7] arm: dts: st: Import optee node from u-boot device trees
Date: Wed, 15 Jul 2026 14:38:22 +0000 [thread overview]
Message-ID: <20260715143822.7D5A91F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260715-mathieu-uboot-dts-import-v2-3-bc931417bd0e@bootlin.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Critical] The `bootph-pre-ram` property is missing from the `optee@fe000000` node and its parent `reserved-memory` node in `stm32mp157c-ed1.dts`, which will crash U-Boot on this board.
- [High] The patch unconditionally reserves 32MB of RAM for OP-TEE in the base board device trees, permanently removing this memory for users booting without OP-TEE.
- [High] The OP-TEE nodes were added to the DK1 base DT but omitted from the DK2 base DT, which will silently break OP-TEE support for DK2 when U-Boot drops its local overrides.
- [Low] The newly added `optee@de000000` and `optee@fe000000` nodes duplicate definitions that already exist in the corresponding `-scmi.dts` variants.
--
--- Patch [3]: [PATCH v2 3/7] arm: dts: st: Import optee node from u-boot device trees ---
commit 455c0e25ccd33494a8e1d7d65c591a7e9158f5c7
Author: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
arm: dts: st: Import optee node from u-boot device trees
This commit imports OP-TEE firmware nodes and reserved-memory regions from
U-Boot device trees into the upstream kernel device trees. The goal is to
allow U-Boot to drop its local additions and use the kernel device trees
directly for these platforms.
> diff --git a/arch/arm/boot/dts/st/stm32mp157a-dk1.dts b/arch/arm/boot/dts/st/stm32mp157a-dk1.dts
> index 0da3667ab1e0e..236da589eb909 100644
> --- a/arch/arm/boot/dts/st/stm32mp157a-dk1.dts
> +++ b/arch/arm/boot/dts/st/stm32mp157a-dk1.dts
[ ... ]
> @@ -22,4 +22,21 @@ aliases {
> chosen {
> stdout-path = "serial0:115200n8";
> };
> +
> + reserved-memory {
> + bootph-pre-ram;
> +
> + optee@de000000 {
[Severity: High]
Since stm32mp157c-dk2.dts does not include stm32mp157a-dk1.dts, won't adding
this only to the dk1-specific file silently break OP-TEE on the DK2 board once
U-Boot drops its local overrides? Should these nodes be placed in the shared
stm32mp15xx-dkx.dtsi instead?
[Severity: High]
Does this unconditionally consume 32MB of RAM for users booting the standard
stm32mp157a-dk1.dtb without OP-TEE?
ST provides dedicated *-scmi.dts variants for OP-TEE environments that already
contain these exact memory reservations. By placing this in the base device
tree, it looks like standard non-secure users permanently lose this memory to
the memblock allocator.
[Severity: Low]
Since stm32mp157a-dk1-scmi.dts includes this base file, does adding
optee@de000000 here duplicate the node already existing in the -scmi.dts
variant?
> + reg = <0xde000000 0x02000000>;
> + no-map;
> + bootph-pre-ram;
> + };
> + };
[ ... ]
> 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 {
[Severity: Critical]
Is the bootph-pre-ram property missing here and in the parent reserved-memory
node?
During pre-relocation, U-Boot allocates memory downwards from the top of RAM
where OP-TEE also resides. Without bootph-pre-ram, U-Boot's DT parser will
ignore the reservation. Won't this cause U-Boot to relocate its code and stack
directly into OP-TEE's secure memory space and trigger a synchronous abort?
[Severity: Low]
Similar to the DK1 file, does adding optee@fe000000 to the base ED1 device
tree duplicate the reservation that already exists in the
stm32mp157c-ed1-scmi.dts variant?
> + reg = <0xfe000000 0x02000000>;
> + no-map;
> + };
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260715-mathieu-uboot-dts-import-v2-0-bc931417bd0e@bootlin.com?part=3
next prev parent reply other threads:[~2026-07-15 14:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-15 14:22 [PATCH v2 0/7] Import optee node from u-boot device trees Mathieu Dubois-Briand
2026-07-15 14:22 ` [PATCH v2 1/7] arm64: dts: freescale: Import optee node from u-boot i.MX91 and i.MX93 " Mathieu Dubois-Briand
2026-07-15 14:22 ` [PATCH v2 2/7] arm64: dts: freescale: Import optee node from u-boot i.MX8 " Mathieu Dubois-Briand
2026-07-15 14:22 ` [PATCH v2 3/7] arm: dts: st: Import optee node from u-boot " Mathieu Dubois-Briand
2026-07-15 14:38 ` sashiko-bot [this message]
2026-07-15 14:22 ` [PATCH v2 4/7] arm: dts: st: stm32mp157c-ed1: Add bootph-pre-ram tag on optee reserved memory Mathieu Dubois-Briand
2026-07-15 14:22 ` [PATCH v2 5/7] arm64: dts: hisilicon: hi3798cv200-poplar: Import optee node from u-boot device tree Mathieu Dubois-Briand
2026-07-15 14:22 ` [PATCH v2 6/7] arm64: dts: nuvoton: npcm845-evb: " Mathieu Dubois-Briand
2026-07-15 14:22 ` [PATCH v2 7/7] arm64: dts: freescale: imx93-frdm: Add OP-TEE device tree node Mathieu Dubois-Briand
2026-07-15 15:01 ` [PATCH v2 0/7] Import optee node from u-boot device trees Marco Felsch
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=20260715143822.7D5A91F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=mathieu.dubois-briand@bootlin.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox