Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: pankaj.gupta@oss.nxp.com
Cc: imx@lists.linux.dev, Frank.Li@kernel.org, robh@kernel.org,
	conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v38 7/7] arm64: dts: imx8ulp: add reserved memory for EdgeLock Enclave
Date: Wed, 19 Aug 2026 13:33:46 +0000	[thread overview]
Message-ID: <20260819133346.C93521F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260820-imx-se-if-v38-7-5df4a4cff736@nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The dynamically allocated `ele-reserved` `no-map` node lacks an `alignment` property, leading to unaligned `no-map` memory boundaries that cause driver initialization failure via `memremap()`/`ioremap()` restrictions.
--

--- Patch [7]: [PATCH v38 7/7] arm64: dts: imx8ulp: add reserved memory for EdgeLock Enclave ---
commit 823a1957195d7807067b0fe5d633790925b23c7b
Author: Pankaj Gupta <pankaj.gupta@nxp.com>

arm64: dts: imx8ulp: add reserved memory for EdgeLock Enclave

This commit reserves 1MB of DDR for the EdgeLock Enclave in a new shared
imx8ulp-firmware.dtsi file. The allocation is constrained to a specific
address window to allow dynamic placement by the kernel.

> diff --git a/arch/arm64/boot/dts/freescale/imx8ulp-firmware.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp-firmware.dtsi
> new file mode 100644
> index 0000000000000..e4bc352f68afb
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx8ulp-firmware.dtsi
[ ... ]
> @@ -0,0 +1,31 @@
[ ... ]
> +/ {
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		ele_reserved: ele-reserved {
> +			compatible = "shared-dma-pool";
> +			alloc-ranges = <0 0x80000000 0 0x30000000>;
> +			size = <0 0x100000>;
> +			no-map;
> +		};

[Severity: High]
Should this dynamically allocated no-map region include an alignment property?

Without an explicit alignment, early_init_dt_alloc_reserved_memory_arch()
defaults to SMP_CACHE_BYTES (128 bytes). If the memblock allocator places
the region at a non-page-aligned physical address, the no-map region can
split a physical page.

During driver initialization, dma_init_coherent_memory() calls memremap()
to map this reserved pool. On arm64, this invokes ioremap(), which strictly
verifies that the target PFN does not overlap linearly mapped System RAM.

Because the physical page starts before the unaligned no-map region, it
evaluates as regular mapped RAM. This triggers the architectural safety check
prohibiting the mapping of RAM as I/O memory, causing ioremap() to warn and
return NULL, preventing the driver from initializing.

> +	};
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260820-imx-se-if-v38-0-5df4a4cff736@nxp.com?part=7

      reply	other threads:[~2026-08-19 13:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 18:45 [PATCH v38 0/7] firmware: imx: driver for NXP secure-enclave pankaj.gupta
2026-08-19 18:45 ` [PATCH v38 1/7] Documentation/firmware: add imx/se to other_interfaces pankaj.gupta
2026-08-19 13:20   ` sashiko-bot
2026-08-19 18:45 ` [PATCH v38 2/7] dt-bindings: arm: fsl: add imx-se-fw binding doc pankaj.gupta
2026-08-19 18:45 ` [PATCH v38 3/7] firmware: imx: add driver for NXP EdgeLock Enclave pankaj.gupta
2026-08-19 13:30   ` sashiko-bot
2026-08-19 18:45 ` [PATCH v38 4/7] firmware: imx: device context dedicated to priv pankaj.gupta
2026-08-19 18:46 ` [PATCH v38 5/7] firmware: imx: adds miscdev pankaj.gupta
2026-08-19 13:30   ` sashiko-bot
2026-08-19 18:46 ` [PATCH v38 6/7] arm64: dts: imx8ulp: add secure enclave node pankaj.gupta
2026-08-19 13:23   ` sashiko-bot
2026-08-19 18:46 ` [PATCH v38 7/7] arm64: dts: imx8ulp: add reserved memory for EdgeLock Enclave pankaj.gupta
2026-08-19 13:33   ` 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=20260819133346.C93521F000E9@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=pankaj.gupta@oss.nxp.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