From: sashiko-bot@kernel.org
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/6] arm64: dts: ti: k3-j7200-ti-ipc-firmware: Reserve memory for LPM metadata
Date: Fri, 03 Jul 2026 14:53:40 +0000 [thread overview]
Message-ID: <20260703145341.0542F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260703143717.177362-3-richard.genoud@bootlin.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Critical] Adding a firewalled memory region to the K3 remoteproc's memory-region array causes Linux to inadvertently map it as Normal Write-Combining memory, leading to fatal asynchronous SErrors due to speculative reads, and exposing it to the remoteproc ELF loader.
- [High] Retaining `mcu_r5fss0_core0` in the SPL device tree without its referenced memory regions will result in dangling phandles.
--
commit 6ba9ae95cd26c22916ced48472c89d3b231e698a
Author: Richard Genoud (TI) <richard.genoud@bootlin.com>
arm64: dts: ti: k3-j7200-ti-ipc-firmware: Reserve memory for LPM metadata
Declare a carveout memory region to store LPM metadata on J7200. For
Jacinto devices, this memory region is needed for saving ATF context
and the certificate information of ATF and OPTEE and DM image.
Link: https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
> diff --git a/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
> index d65f68c7d4321..a6043970715ac 100644
> --- a/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
[ ... ]
> @@ -99,8 +105,10 @@ &mcu_r5fss0 {
> &mcu_r5fss0_core0 {
> mboxes = <&mailbox0_cluster0 &mbox_mcu_r5fss0_core0>;
> memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
> - <&mcu_r5fss0_core0_memory_region>;
> - memory-region-names = "dma", "firmware";
> + <&mcu_r5fss0_core0_memory_region>,
> + <&lpm_memory_region>;
[Severity: Critical]
Will appending this firewalled memory region to the memory-region array cause
fatal asynchronous SErrors due to speculative reads?
Looking at k3_reserved_mem_init() in drivers/remoteproc/ti_k3_common.c,
the remoteproc driver unconditionally maps all memory-region entries starting
from index 1:
drivers/remoteproc/ti_k3_common.c:k3_reserved_mem_init() {
...
kproc->rmem[i].cpu_addr = devm_ioremap_resource_wc(dev, &res);
...
}
Since the lpm_memory_region is hardware-firewalled and only accessible by
TIFS, mapping it as Write-Combining (Normal Non-Cacheable) memory permits the
ARM64 CPU to perform speculative instruction and data fetches against it.
Could these speculative accesses trigger bus errors from the interconnect,
resulting in fatal asynchronous SErrors that panic the kernel during device
probe?
> + memory-region-names = "dma", "firmware", "lpm-metadata";
> + bootph-pre-ram;
[Severity: High]
Will adding bootph-pre-ram here result in dangling phandles in the SPL
device tree?
Because bootph-pre-ram was added to mcu_r5fss0_core0 and lpm_memory_region,
but not to the existing mcu_r5fss0_core0_dma_memory_region and
mcu_r5fss0_core0_memory_region nodes, the SPL build tool (fdtgrep) will
strip the unannotated dma and firmware memory nodes.
Might this cause the U-Boot remoteproc driver to fail during parsing or
crash when attempting to resume the R5F core from retention due to the
missing references?
> status = "okay";
> };
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260703143717.177362-1-richard.genoud@bootlin.com?part=2
next prev parent reply other threads:[~2026-07-03 14:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-03 14:37 [PATCH v3 0/6] dts: ti: k3-j7: Reserve memory for LPM metadata Richard Genoud (TI)
2026-07-03 14:37 ` [PATCH v3 1/6] dt-bindings: remoteproc: k3-r5f: Add Jacinto LPM memory region Richard Genoud (TI)
2026-07-03 14:46 ` sashiko-bot
2026-07-03 14:37 ` [PATCH v3 2/6] arm64: dts: ti: k3-j7200-ti-ipc-firmware: Reserve memory for LPM metadata Richard Genoud (TI)
2026-07-03 14:53 ` sashiko-bot [this message]
2026-07-03 14:37 ` [PATCH v3 3/6] arm64: dts: ti: k3-j721s2-ti-ipc-firmware: " Richard Genoud (TI)
2026-07-03 14:48 ` sashiko-bot
2026-07-03 14:37 ` [PATCH v3 4/6] arm64: dts: ti: k3-j784s4-ti-ipc-firmware: " Richard Genoud (TI)
2026-07-03 14:54 ` sashiko-bot
2026-07-03 14:37 ` [PATCH v3 5/6] arm64: dts: ti: k3-j722s-ti-ipc-firmware: " Richard Genoud (TI)
2026-07-03 14:56 ` sashiko-bot
2026-07-03 14:37 ` [PATCH v3 6/6] arm64: dts: ti: k3-j742s2-ti-ipc-firmware: " Richard Genoud (TI)
2026-07-03 14:58 ` sashiko-bot
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=20260703145341.0542F1F000E9@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