All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: Reserve CFE stub area
@ 2024-10-03 21:30 Sam Edwards
  2024-10-03 22:41 ` Florian Fainelli
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Edwards @ 2024-10-03 21:30 UTC (permalink / raw)
  To: Florian Fainelli, Rafał Miłecki, William Zhang,
	Anand Gore, Kursad Oney
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Broadcom internal kernel review list, devicetree,
	linux-arm-kernel, linux-kernel, Sam Edwards

The CFE bootloader places a stub program at 0x0000-0xFFFF to hold the
secondary CPUs until the boot CPU writes the release address. If Linux
overwrites this program before execution reaches smp_prepare_cpus(), the
secondary CPUs may become inaccessible.

This is only a problem with CFE, and then only until the secondary CPUs
are brought online. However, since it is such a small amount of memory,
it is easiest to reserve it unconditionally.

Therefore, add a /reserved-memory node to bcm4908.dtsi to protect this
critical memory region.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
---
 arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
index 8b924812322c..326f84f746cb 100644
--- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
@@ -68,6 +68,16 @@ l2: l2-cache0 {
 		};
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		cfe-stub@0 {
+			reg = <0 0 0 0x10000>;
+		};
+	};
+
 	axi@81000000 {
 		compatible = "simple-bus";
 		#address-cells = <1>;
-- 
2.44.2



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

end of thread, other threads:[~2024-10-04 23:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 21:30 [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: Reserve CFE stub area Sam Edwards
2024-10-03 22:41 ` Florian Fainelli
2024-10-04 18:23   ` Sam Edwards
2024-10-04 23:36     ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.