From: sashiko-bot@kernel.org
To: "Richard Zhu" <hongxing.zhu@nxp.com>
Cc: conor+dt@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
devicetree@vger.kernel.org, Frank.Li@kernel.org,
imx@lists.linux.dev
Subject: Re: [PATCH v4] arm64: dts: imx95: Increase PCIe outbound address space to 4GB
Date: Thu, 14 May 2026 01:16:21 +0000 [thread overview]
Message-ID: <20260514011621.E3BD2C19425@smtp.kernel.org> (raw)
In-Reply-To: <20260513034456.1554188-1-hongxing.zhu@nxp.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Unaligned 4GB PCIe outbound memory window causes iATU wrap-around and address translation failure.
--
commit 2c9468d72c0c22f965e76ce9a1c6ea0cf04f99fa
Author: Richard Zhu <hongxing.zhu@nxp.com>
arm64: dts: imx95: Increase PCIe outbound address space to 4GB
This commit increases the PCIe outbound memory region size to 4GB to
match the actual hardware-supported memory space. It updates the ranges
for both pcie0 and pcie1.
> diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/imx95.dtsi
> index adcc0e1d3696b..d8a6a18ddfa1c 100644
> --- a/arch/arm64/boot/dts/freescale/imx95.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx95.dtsi
> @@ -1940,7 +1940,7 @@ pcie0: pcie@4c300000 {
> <0 0x4c340000 0 0x4000>;
> reg-names = "dbi", "config", "atu", "app";
> ranges = <0x81000000 0x0 0x00000000 0x0 0x6ff00000 0 0x00100000>,
> - <0x82000000 0x0 0x10000000 0x9 0x10000000 0 0x10000000>;
> + <0x83000000 0x0 0x10000000 0x9 0x00000000 1 0x00000000>;
Will this unaligned 4GB PCIe outbound memory window cause an iATU
wrap-around and address translation failure?
The child PCI base address is left at 0x10000000. With a size of 4GB (1 0x0),
the PCI address range extends from 0x10000000 to 0x10FFFFFFF, which crosses
a 32-bit boundary.
The i.MX95 uses a DesignWare PCIe controller. Its internal Address Translation
Unit (iATU) generates outbound PCI target addresses by adding the CPU-side
offset to a 32-bit lower target register.
Since this 32-bit adder does not propagate a carry bit to the upper 32-bit
address register, the 32-bit addition overflows when the CPU accesses the top
256MB of the new memory window (e.g., offsets >= 0xF0000000).
Instead of correctly crossing into the 0x100000000 PCI address space, the
hardware silently wraps around to 0x00000000. This limitation will lead to
PCI access failures or memory corruption if devices are allocated BARs in the
upper section of the window.
Should the child PCI address be 4GB-aligned (e.g., 0x0 0x00000000) to match
the CPU alignment and ensure safe address translation?
[ ... ]
> @@ -2015,7 +2015,7 @@ pcie1: pcie@4c380000 {
> <0 0x4c3c0000 0 0x4000>;
> reg-names = "dbi", "config", "atu", "app";
> ranges = <0x81000000 0 0x00000000 0x8 0x8ff00000 0 0x00100000>,
> - <0x82000000 0 0x10000000 0xa 0x10000000 0 0x10000000>;
> + <0x83000000 0 0x10000000 0xa 0x00000000 1 0x00000000>;
Does this node have the same address translation issue as pcie0?
Like pcie0, the child PCI base address is 0x10000000 and the size is 4GB,
which will also overflow the 32-bit iATU adder and wrap around.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260513034456.1554188-1-hongxing.zhu@nxp.com?part=1
prev parent reply other threads:[~2026-05-14 1:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 3:44 [PATCH v4] arm64: dts: imx95: Increase PCIe outbound address space to 4GB Richard Zhu
2026-05-14 1:16 ` sashiko-bot [this message]
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=20260514011621.E3BD2C19425@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hongxing.zhu@nxp.com \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@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