All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Ford <aford173@gmail.com>
To: linux-renesas-soc@vger.kernel.org
Cc: geert+renesas@glider.be, aford@beaconembedded.com,
	Adam Ford <aford173@gmail.com>
Subject: [PATCH] arm64: dts: renesas: beacon: Fix memory corruption from TF-A
Date: Fri, 24 Sep 2021 12:19:05 -0500	[thread overview]
Message-ID: <20210924171905.347115-1-aford173@gmail.com> (raw)

Trusted Firmware allocates a chunk of memory for a lossy compressor
which makes the memory unavailable to Linux and any attempts to read/write
from Linux result in memory corruption or a crash.  Fix this by reserving
the section of memory marked as unavailable by TF-A.

Fixes: a1d8a344f1ca ("arm64: dts: renesas: Introduce r8a774a1-beacon-rzg2m-kit")
Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
index 090dc9c4f57b..e01cb30e03e8 100644
--- a/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
+++ b/arch/arm64/boot/dts/renesas/beacon-renesom-som.dtsi
@@ -13,6 +13,17 @@ memory@48000000 {
 		reg = <0x0 0x48000000 0x0 0x78000000>;
 	};
 
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		lossy_decompress: lossy-decompress@54000000 {
+			reg = <0 0x54000000 0 0x03000000>; /* Reserved by TF-A */
+			no-map;
+		};
+	};
+
 	osc_32k: osc_32k {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
-- 
2.25.1


             reply	other threads:[~2021-09-24 17:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 17:19 Adam Ford [this message]
2021-10-05 14:30 ` [PATCH] arm64: dts: renesas: beacon: Fix memory corruption from TF-A Geert Uytterhoeven
2021-10-09 11:13   ` Adam Ford
2021-10-11  7:40     ` Geert Uytterhoeven

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=20210924171905.347115-1-aford173@gmail.com \
    --to=aford173@gmail.com \
    --cc=aford@beaconembedded.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-renesas-soc@vger.kernel.org \
    /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 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.