From: sashiko-bot@kernel.org
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v7 09/11] arm64: dts: ti: k3-am62a-ti-ipc-firmware: Split r5f memory region
Date: Wed, 01 Jul 2026 13:18:59 +0000 [thread overview]
Message-ID: <20260701131859.A47481F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260701-topic-am62a-ioddr-dt-v6-19-v7-9-e9db8b16821a@baylibre.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Missing `bootph-pre-ram` properties on newly split firmware memory regions will leave dangling phandles in U-Boot SPL and risks memory corruption.
- [High] Arbitrarily subdividing the firmware carveout breaks `rproc_da_to_va` translation for existing firmware ELF segments that span the new boundaries.
--
commit 235186e608d68e805ecd28c0d36c56c91fb3c688
Author: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
arm64: dts: ti: k3-am62a-ti-ipc-firmware: Split r5f memory region
Split the firmware memory region in more specific parts so it is better
described where to find which information. Specifically the LPM metadata
region is important as bootloader software like U-Boot has to know where
that data is to be able to read that data.
> diff --git a/arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi
> index 682b1c9f3071d..fe10d3e75ceee 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62a-ti-ipc-firmware.dtsi
[ ... ]
> - wkup_r5fss0_core0_memory_region: memory@9c900000 {
> + wkup_r5fss0_core0_ipc_region: memory@9c900000 {
> compatible = "shared-dma-pool";
> - reg = <0x00 0x9c900000 0x00 0x01d00000>;
> + reg = <0x00 0x9c900000 0x00 0x100000>;
> + no-map;
> + };
[Severity: High]
Does subdividing this contiguous region break backwards compatibility for
existing firmware binaries?
Looking at drivers/remoteproc/ti_k3_common.c:k3_rproc_da_to_va():
if (da >= dev_addr && ((da + len) <= (dev_addr + size))) {
offset = da - dev_addr;
va = kproc->rmem[i].cpu_addr + offset;
return (__force void *)va;
}
The translation logic requires a firmware ELF segment to fit entirely within a
single parsed device tree memory region.
If an older monolithic firmware binary has a segment that spans across these
new boundaries (for example, from lpm_metadata into lpm_rest), won't this
check fail and return NULL?
[ ... ]
> @@ -78,8 +102,14 @@ &wkup_r5fss0 {
> &wkup_r5fss0_core0 {
> mboxes = <&mailbox0_cluster0>, <&mbox_r5_0>;
> memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
> - <&wkup_r5fss0_core0_memory_region>;
> - memory-region-names = "dma", "firmware";
> + <&wkup_r5fss0_core0_ipc_region>,
> + <&wkup_r5fss0_core0_lpm_fs_stub_region>,
> + <&wkup_r5fss0_core0_lpm_metadata_region>,
> + <&wkup_r5fss0_core0_lpm_rest_region>,
> + <&wkup_r5fss0_core0_dm_region>;
> + memory-region-names = "dma", "ipc", "lpm-stub",
> + "lpm-metadata", "lpm-context",
> + "dm-firmware";
> bootph-pre-ram;
> status = "okay";
> };
[Severity: High]
Will this cause issues during the U-Boot SPL build?
Since this node retains the bootph-pre-ram property, but newly added regions
like wkup_r5fss0_core0_dm_region and wkup_r5fss0_core0_ipc_region do not have
it, won't fdtgrep strip out the new regions?
If they are stripped, the memory-region array here will contain dangling
phandles, which could cause U-Boot's remoteproc driver to fail probing.
Additionally, because the stripped regions lose their no-map status in the
SPL device tree, is there a risk the SPL allocator might overwrite and corrupt
the Device Manager firmware or IPC data?
I've also checked later commits in this series (e.g., commit e36960554d0b),
and it appears the bootph-pre-ram property remains absent for these other
memory regions.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260701-topic-am62a-ioddr-dt-v6-19-v7-0-e9db8b16821a@baylibre.com?part=9
next prev parent reply other threads:[~2026-07-01 13:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 12:39 [PATCH v7 00/11] arm64: dts: ti: k3-am62a7-sk: Split r5f memory region Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 01/11] arm64: dts: ti: k3-am62a-phycore-som: Fix wkup R5F memory region size Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 02/11] arm64: dts: ti: k3-am62d2-evm: " Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 03/11] arm64: dts: ti: k3-am62a7-sk: " Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 04/11] arm64: dts: ti: k3-am62p-verdin: " Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 05/11] arm64: dts: ti: k3-am62p5-sk: " Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 06/11] arm64: dts: ti: var-som-am62p: " Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 07/11] arm64: dts: ti: k3-am62a-ti-ipc-firmware: Move wkup reserved memory Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 08/11] arm64: dts: ti: k3-am62p-ti-ipc-firmware: " Markus Schneider-Pargmann (TI)
2026-07-01 12:39 ` [PATCH v7 09/11] arm64: dts: ti: k3-am62a-ti-ipc-firmware: Split r5f memory region Markus Schneider-Pargmann (TI)
2026-07-01 13:18 ` sashiko-bot [this message]
2026-07-01 12:39 ` [PATCH v7 10/11] arm64: dts: ti: k3-am62p-ti-ipc-firmware: " Markus Schneider-Pargmann (TI)
2026-07-01 13:30 ` sashiko-bot
2026-07-01 12:39 ` [PATCH v7 11/11] arm64: dts: ti: k3-am62p-ti-ipc-firmware: Add r5f nodes to pre-ram bootphase Markus Schneider-Pargmann (TI)
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=20260701131859.A47481F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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