mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: st: add firmware reserved memory to Engicam MicroGEA-STM32MP257
@ 2026-10-28 10:57 Dario Binacchi
  2026-11-20 11:15 ` Dario Binacchi
  2026-11-24 14:09 ` Alexandre TORGUE
  0 siblings, 2 replies; 3+ messages in thread
From: Dario Binacchi @ 2026-10-28 10:57 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: linux-amarula, michael, Dario Binacchi, Conor Dooley,
	Krzysztof Kozlowski, Maxime Coquelin, Rob Herring, devicetree,
	linux-arm-kernel, linux-kernel, linux-stm32

The first 64 MiB of the DDR are used by the secure firmware (TF-M,
Cortex-M33 firmware, BL31 and OP-TEE) and are protected by the RISAF
firewall. Without a reserved-memory node Linux allocates pages there,
and the first access triggers an IAC exception and an OP-TEE panic:

  E/TC:0   stm32_iac_itr:197 IAC exception ID: 137
  Faulty address (IADDR0): 0x80000060
  E/TC:0   Panic at core/drivers/firewall/stm32_iac.c:212 <stm32_iac_itr>

Reserve the region, as done for the stm32mp257f-ev1 board.

Fixes: c5ce8d7bcc78 ("arm64: dts: st: support Engicam MicroGEA-STM32MP257 SoM")
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

 .../boot/dts/st/stm32mp257-engicam-microgea.dtsi     | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi b/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
index 5b4287e86def..6cd64587ecdc 100644
--- a/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
@@ -19,6 +19,18 @@ memory@80000000 {
 		device_type = "memory";
 		reg = <0x0 0x80000000 0x0 0x80000000>;
 	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		fw@80000000 {
+			compatible = "shared-dma-pool";
+			reg = <0x0 0x80000000 0x0 0x4000000>;
+			no-map;
+		};
+	};
 };
 
 &scmi_regu {
---
base-commit: 65ba8f34ec886ec72b2c07ddc8cf3d815c32869d
branch: stm32mp257-engicam-microgea-fw-reserved-memory

-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: st: add firmware reserved memory to Engicam MicroGEA-STM32MP257
  2026-10-28 10:57 [PATCH] arm64: dts: st: add firmware reserved memory to Engicam MicroGEA-STM32MP257 Dario Binacchi
@ 2026-11-20 11:15 ` Dario Binacchi
  2026-11-24 14:09 ` Alexandre TORGUE
  1 sibling, 0 replies; 3+ messages in thread
From: Dario Binacchi @ 2026-11-20 11:15 UTC (permalink / raw)
  To: Alexandre Torgue
  Cc: linux-amarula, michael, Conor Dooley, Krzysztof Kozlowski,
	Maxime Coquelin, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-stm32

Hi Alexandre,

Gentle ping on this patch. Could it be queued as a fix for v7.4?
The SoM support went into v7.4-rc1.

Thanks and regards,
Dario

On Wed, Oct 28, 2026 at 11:58 AM Dario Binacchi
<dario.binacchi@amarulasolutions.com> wrote:
>
> The first 64 MiB of the DDR are used by the secure firmware (TF-M,
> Cortex-M33 firmware, BL31 and OP-TEE) and are protected by the RISAF
> firewall. Without a reserved-memory node Linux allocates pages there,
> and the first access triggers an IAC exception and an OP-TEE panic:
>
>   E/TC:0   stm32_iac_itr:197 IAC exception ID: 137
>   Faulty address (IADDR0): 0x80000060
>   E/TC:0   Panic at core/drivers/firewall/stm32_iac.c:212 <stm32_iac_itr>
>
> Reserve the region, as done for the stm32mp257f-ev1 board.
>
> Fixes: c5ce8d7bcc78 ("arm64: dts: st: support Engicam MicroGEA-STM32MP257 SoM")
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
>
> ---
>
>  .../boot/dts/st/stm32mp257-engicam-microgea.dtsi     | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi b/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
> index 5b4287e86def..6cd64587ecdc 100644
> --- a/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
> +++ b/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
> @@ -19,6 +19,18 @@ memory@80000000 {
>                 device_type = "memory";
>                 reg = <0x0 0x80000000 0x0 0x80000000>;
>         };
> +
> +       reserved-memory {
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +               ranges;
> +
> +               fw@80000000 {
> +                       compatible = "shared-dma-pool";
> +                       reg = <0x0 0x80000000 0x0 0x4000000>;
> +                       no-map;
> +               };
> +       };
>  };
>
>  &scmi_regu {
> ---
> base-commit: 65ba8f34ec886ec72b2c07ddc8cf3d815c32869d
> branch: stm32mp257-engicam-microgea-fw-reserved-memory
>
> --
> 2.43.0
>


-- 
Dario Binacchi
Senior Embedded Software Engineer
M. +39 328 0625246
dario.binacchi@amarulasolutions.com
―――――――――――――――
Amarula Solutions SRL
 Via Felice Cavallotti 25D, 41012 Carpi, MO, IT
info@amarulasolutions.com
www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: st: add firmware reserved memory to Engicam MicroGEA-STM32MP257
  2026-10-28 10:57 [PATCH] arm64: dts: st: add firmware reserved memory to Engicam MicroGEA-STM32MP257 Dario Binacchi
  2026-11-20 11:15 ` Dario Binacchi
@ 2026-11-24 14:09 ` Alexandre TORGUE
  1 sibling, 0 replies; 3+ messages in thread
From: Alexandre TORGUE @ 2026-11-24 14:09 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: linux-amarula, michael, Conor Dooley, Krzysztof Kozlowski,
	Maxime Coquelin, Rob Herring, devicetree, linux-arm-kernel,
	linux-kernel, linux-stm32

Hi Dario

On 10/28/26 11:57, Dario Binacchi wrote:
> The first 64 MiB of the DDR are used by the secure firmware (TF-M,
> Cortex-M33 firmware, BL31 and OP-TEE) and are protected by the RISAF
> firewall. Without a reserved-memory node Linux allocates pages there,
> and the first access triggers an IAC exception and an OP-TEE panic:
> 
>    E/TC:0   stm32_iac_itr:197 IAC exception ID: 137
>    Faulty address (IADDR0): 0x80000060
>    E/TC:0   Panic at core/drivers/firewall/stm32_iac.c:212 <stm32_iac_itr>
> 
> Reserve the region, as done for the stm32mp257f-ev1 board.
> 
> Fixes: c5ce8d7bcc78 ("arm64: dts: st: support Engicam MicroGEA-STM32MP257 SoM")
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
>   .../boot/dts/st/stm32mp257-engicam-microgea.dtsi     | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi b/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
> index 5b4287e86def..6cd64587ecdc 100644
> --- a/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
> +++ b/arch/arm64/boot/dts/st/stm32mp257-engicam-microgea.dtsi
> @@ -19,6 +19,18 @@ memory@80000000 {
>   		device_type = "memory";
>   		reg = <0x0 0x80000000 0x0 0x80000000>;
>   	};
> +
> +	reserved-memory {
> +		#address-cells = <2>;
> +		#size-cells = <2>;
> +		ranges;
> +
> +		fw@80000000 {
> +			compatible = "shared-dma-pool";
> +			reg = <0x0 0x80000000 0x0 0x4000000>;
> +			no-map;
> +		};
> +	};
>   };
>   
>   &scmi_regu {
> ---
> base-commit: 65ba8f34ec886ec72b2c07ddc8cf3d815c32869d
> branch: stm32mp257-engicam-microgea-fw-reserved-memory
> 

Applied on stm32-fixes.

regards
Alex

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-24 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-28 10:57 [PATCH] arm64: dts: st: add firmware reserved memory to Engicam MicroGEA-STM32MP257 Dario Binacchi
2026-11-20 11:15 ` Dario Binacchi
2026-11-24 14:09 ` Alexandre TORGUE

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®