Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v6 10/11] arm64: dts: ti: k3-am62p-ti-ipc-firmware: Split r5f memory region
Date: Tue, 09 Jun 2026 19:19:54 +0000	[thread overview]
Message-ID: <20260609191955.52C9E1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260609-topic-am62a-ioddr-dt-v6-19-v6-10-16afba97fbe0@baylibre.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Splitting the contiguous firmware memory region into multiple smaller regions breaks remoteproc ELF loading for segments that span the new boundaries, breaking backward compatibility with existing monolithic firmware binaries.
--

commit 522e3f4f09d9348a57a19d9294fab533fe5163e5
Author: Markus Schneider-Pargmann (TI) <msp@baylibre.com>

arm64: dts: ti: k3-am62p-ti-ipc-firmware: Split r5f memory region

This commit splits the large firmware memory region into more specific parts.
This allows bootloader software like U-Boot to know where specific data,
such as the LPM metadata region, is located.

> diff --git a/arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi
> index f776511095642..8f7409da83392 100644
> --- a/arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-am62p-ti-ipc-firmware.dtsi
> @@ -24,9 +24,33 @@ wkup_r5fss0_core0_dma_memory_region: memory@9c800000 {
>  		no-map;
>  	};
>  
> -	wkup_r5fss0_core0_memory_region: memory@9c900000 {
> +	wkup_r5fss0_core0_ipc_region: memory@9c900000 {
>  		compatible = "shared-dma-pool";
> -		reg = <0x00 0x9c900000 0x00 0x01d08000>;
> +		reg = <0x00 0x9c900000 0x00 0x100000>;
> +		no-map;
> +	};
> +
> +	wkup_r5fss0_core0_lpm_fs_stub_region: memory@9ca00000 {

[Severity: High]
Will splitting this contiguous region break backward compatibility for
existing monolithic firmware binaries?

The TI K3 remoteproc driver appears to strictly verify that each ELF
PT_LOAD segment fits entirely within a single device tree memory region:

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;
        }
        ...
}

Because the driver maps the newly split regions individually into its rmem
array and does not coalesce contiguous memory blocks, won't any existing
ELF firmware binary containing a segment that physically spans across these
newly introduced boundaries fail this strict bounds check and abort loading?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260609-topic-am62a-ioddr-dt-v6-19-v6-0-16afba97fbe0@baylibre.com?part=10

  reply	other threads:[~2026-06-09 19:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 18:56 [PATCH v6 00/11] arm64: dts: ti: k3-am62a7-sk: Split r5f memory region Markus Schneider-Pargmann (TI)
2026-06-09 18:56 ` [PATCH v6 01/11] arm64: dts: ti: k3-am62a-phycore-som: Fix wkup R5F memory region size Markus Schneider-Pargmann (TI)
2026-06-09 18:56 ` [PATCH v6 02/11] arm64: dts: ti: k3-am62d2-evm: " Markus Schneider-Pargmann (TI)
2026-06-09 18:56 ` [PATCH v6 03/11] arm64: dts: ti: k3-am62a7-sk: " Markus Schneider-Pargmann (TI)
2026-06-09 18:56 ` [PATCH v6 04/11] arm64: dts: ti: k3-am62p-verdin: " Markus Schneider-Pargmann (TI)
2026-06-09 19:11   ` sashiko-bot
2026-06-09 18:56 ` [PATCH v6 05/11] arm64: dts: ti: k3-am62p5-sk: " Markus Schneider-Pargmann (TI)
2026-06-09 18:56 ` [PATCH v6 06/11] arm64: dts: ti: var-som-am62p: " Markus Schneider-Pargmann (TI)
2026-06-09 19:02   ` sashiko-bot
2026-06-09 18:56 ` [PATCH v6 07/11] arm64: dts: ti: k3-am62a-ti-ipc-firmware: Move wkup reserved memory Markus Schneider-Pargmann (TI)
2026-06-09 18:56 ` [PATCH v6 08/11] arm64: dts: ti: k3-am62p-ti-ipc-firmware: " Markus Schneider-Pargmann (TI)
2026-06-09 18:56 ` [PATCH v6 09/11] arm64: dts: ti: k3-am62a-ti-ipc-firmware: Split r5f memory region Markus Schneider-Pargmann (TI)
2026-06-09 19:15   ` sashiko-bot
2026-06-09 18:56 ` [PATCH v6 10/11] arm64: dts: ti: k3-am62p-ti-ipc-firmware: " Markus Schneider-Pargmann (TI)
2026-06-09 19:19   ` sashiko-bot [this message]
2026-06-09 18:56 ` [PATCH v6 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=20260609191955.52C9E1F00898@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