Skip to contentSkip to conversation

arm64: dts: marvell: a3700: reserve ATF memory

PATCH New Arnaud Ferraris 2 participants 3 messages Jul 5, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: dts: marvell: a3700: reserve ATF memory

On Marvell Armada 3700, the ARM Trusted Firmware is loaded in RAM at address 0x04000000, and can use up to 16MiB (0x01000000).

As the ATF is responsible for handling PSCI calls (including, but not limited to, system reset management), its memory area should never be overwritten during runtime.

Declaring a range of reserved memory solves this problem.

---
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +11 -0
index 3353252..2110e7d 100644
@@ -34,6 +34,17 @@
 		};
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		arm-trusted-firmware at 4000000 {
+			no-map;
+			reg = <0x0 0x04000000 0x0 0x01000000>;
+		};
+	};
+
 	psci {
 		compatible = "arm,psci-0.2";
 		method = "smc";
Signature · 1 line
2.7.4
maintainer
#1 lore raw

PATCH 1/1 arm64: dts: marvell: a3700: reserve ATF memory

Hi Arnaud,

Quoted 8 lines · Arnaud Ferraris

On Marvell Armada 3700, the ARM Trusted Firmware is loaded in RAM at address 0x04000000, and can use up to 16MiB (0x01000000).

As the ATF is responsible for handling PSCI calls (including, but not limited to, system reset management), its memory area should never be overwritten during runtime.

Declaring a range of reserved memory solves this problem.

A similar patch[1] was applied last week in mvebu/dt64 and should be in linux-next.

But keep in mind that U-Boot is supposed to update the reg value to match your configuration.

http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/587408.html

Thanks,

Gregory

Quoted 31 lines
---
 arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +11 -0
index 3353252..2110e7d 100644
@@ -34,6 +34,17 @@
 		};
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		arm-trusted-firmware at 4000000 {
+			no-map;
+			reg = <0x0 0x04000000 0x0 0x01000000>;
+		};
+	};
+
 	psci {
 		compatible = "arm,psci-0.2";
 		method = "smc";
Signature · 1 line
2.7.4
Signature · 3 lines
Gregory Clement, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com
#2 lore raw

PATCH 1/1 arm64: dts: marvell: a3700: reserve ATF memory

Hi Gregory,

Quoted 2 lines · Gregory CLEMENT

A similar patch[1] was applied last week in mvebu/dt64 and should be in linux-next.

My bad, I forgot to check linux-next.

Thanks,

Arnaud

Quoted 40 lines

But keep in mind that U-Boot is supposed to update the reg value to match your configuration.

http://lists.infradead.org/pipermail/linux-arm-kernel/2018-June/587408.html

Thanks,

Gregory

Quoted 30 lines
---
  arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 11 +++++++++++
  1 file changed, 11 insertions(+)
arch/arm64/boot/dts/marvell/armada-37xx.dtsi +11 -0
index 3353252..2110e7d 100644
@@ -34,6 +34,17 @@
  		};
  	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		arm-trusted-firmware at 4000000 {
+			no-map;
+			reg = <0x0 0x04000000 0x0 0x01000000>;
+		};
+	};
+
  	psci {
  		compatible = "arm,psci-0.2";
  		method = "smc";
Signature · 1 line
2.7.4