From nobody Mon May 25 06:43:06 2026 Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97761223708; Sun, 17 May 2026 16:32:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.161 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779035574; cv=none; b=o0RVPDJS3h9XrueeEdfbSLOdEDRgO3o9Hq9x4BgsYWQZ2FCV44OR9pPyHlyTxUDcGKgzHWTkJap2dk0SrL62q/4KTM5lTAO6Qxtclqp1X1H19Df59Z9ZfcYtBrmgfku0fxd+EcIVhbkiLttiPE4hS5fnogsjarj0J/trps2eNwU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779035574; c=relaxed/simple; bh=5/2IM9AzVnmRWwF810UKTvZASqGP2E/71qnkahOXQW4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=l4qkpo6Zl2Vz2BsKVa8VftMbW4zR4/8OB7oIIcIxosrEa3PQB3fuZ9z1N/Hn7Rx/aOtnjoGTaW9tRnvhYJLlBFG6grGdGgVyMN0uewEWqTxxUtzQfcieecieZrxcImuzB8Z+ztZqE5RX2tMmzl/YY0oR2P/CznI0GMfsB/dPpH8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=s6umqwZJ; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=m6Ubl4F4; arc=none smtp.client-ip=80.241.56.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="s6umqwZJ"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="m6Ubl4F4" Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4gJRLN58Xtz9ss2; Sun, 17 May 2026 18:32:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1779035564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=eImlYbdZ7QoBtV/tqV5M9hyci2tjWpC0XXN0ko+thxo=; b=s6umqwZJng3J4dI6QSNHOrxKJfT1KGYJmJ6a6x5f1WEThx5Wn0YQ0uvNOgyZU5tR81qA8h 0vLjcb52aF5HNmkOf6AGFkY19XPw78GfpQKwvlmau7M8jp1e15kVp0hrHbmwsBfM0Qbcf1 YErEOx5Kx82jqEJQkM5tbPBOqnRbhsnJMqkyGRzqJm4/mus715kAtUODZaBiBeV7Kf6pXW r4NnyKfbxZQ1E9Ql8/gsFj4TcdOo49fHOFl8HmfYyU8H7/8lhUIOwLninIwKvG1Gxt9/3P IVkJOgviydT+Qm/0iBkTCxY9Qk+DZzZ3Pg7uWJ5hXNWctpeFftIOL3i2PiYBYg== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1779035563; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=eImlYbdZ7QoBtV/tqV5M9hyci2tjWpC0XXN0ko+thxo=; b=m6Ubl4F48CQtkITSUYblVVCCYh/6nwJalleR0An7QKBiFq19VsZYojgGM/yyYw8wHaXpGc frmaX2lFYzdGW4IdaFCXQ1rT2VXTFWN+ihwEi+JRWzzgd3IXBbPGdwg1qgBOLWkYVkYYwc NPLCY8Io+toIKPIQmvZV+kLejD07aJCn4ewgPefm+pO8VYloUrvIr1MPD6F1QGo8t9jOU4 AnZr1Qen0T+52bRttR/FQc9snXIktETZCe7xPppJwoWOLtFzZCH7y1Dx91mUjyMUYtXasm IL31vOUOYQJMe1O2VgYjPHtpKYWgyJWXn+4UVa8prveN9fML5HBB4wl19qtpjg== To: linux-arm-kernel@lists.infradead.org Cc: Marek Vasut , Conor Dooley , Geert Uytterhoeven , Krzysztof Kozlowski , Magnus Damm , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH] arm64: dts: renesas: r8a78000: Describe all reserved memory Date: Sun, 17 May 2026 18:31:25 +0200 Message-ID: <20260517163212.18016-1-marek.vasut+renesas@mailbox.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MBO-RS-META: rygdoqgc59rsenjakdm5yyot5cw3gfdf X-MBO-RS-ID: f474707d4ad9f75ab11 Content-Type: text/plain; charset="utf-8" Fully describe all available DRAM in the DT, and describe regions which are not accessible because they are used by firmware in reserved-memory node. Replace first memory bank memory@60600000 with memory@40000000 and a 518 MiB long reserved-memory no-map subnode. This memory region is used by other cores in the system. Reserve 32 kiB of memory at 0x8c100000 for parameters shared by IPL, SCP, TFA BL31 and TEE. Reserve 512 kiB of memory at 0x8c200000 for TFA BL31. The upcoming upstream TFA 2.15 BL31 uses memory from 0x8c200000..0x8c242fff, the round up to 512 kiB is slight future proofing. Reserve 32 MiB of memory at 0x8c400000 for OPTEE-OS, which is the entire OPTEE-OS TZ protected DRAM area. Neither the TFA BL31 nor OPTEE-OS do modify the DT passed to Linux in any way with any new reserved-memory {} node to reserve memory areas used by the TFA BL31 or OPTEE-OS to prevent the next stage from using those areas, which lets Linux use all of the available DRAM as it is described in the DT that was passed in by U-Boot, including the areas that are newly utilized by TFA BL31 or OPTEE-OS. In case of high DRAM utilization, unless the memory used by TFA BL31 or OPTEE-OS is properly reserved, Linux may use and corrupt the memory used by TFA BL31 or OPTEE-OS, which would lead to the system becoming unresponsive. Fixes: ad142a4ef710 ("arm64: dts: renesas: r8a78000: Add initial Ironhide b= oard support") Signed-off-by: Marek Vasut --- Cc: Conor Dooley Cc: Geert Uytterhoeven Cc: Krzysztof Kozlowski Cc: Magnus Damm Cc: Rob Herring Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org --- .../boot/dts/renesas/r8a78000-ironhide.dts | 35 +++++++++++++++++-- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/renesas/r8a78000-ironhide.dts b/arch/arm64= /boot/dts/renesas/r8a78000-ironhide.dts index a721734fbd5d0..99f4cfb53e0f8 100644 --- a/arch/arm64/boot/dts/renesas/r8a78000-ironhide.dts +++ b/arch/arm64/boot/dts/renesas/r8a78000-ironhide.dts @@ -20,10 +20,9 @@ chosen { stdout-path =3D "serial0:1843200n8"; }; =20 - memory@60600000 { + memory@40000000 { device_type =3D "memory"; - /* first 518MiB is reserved for other purposes. */ - reg =3D <0x0 0x60600000 0x0 0x5fa00000>; + reg =3D <0x0 0x40000000 0x0 0x80000000>; }; =20 memory@1080000000 { @@ -65,6 +64,36 @@ memory@1e00000000 { device_type =3D "memory"; reg =3D <0x1e 0x00000000 0x1 0x00000000>; }; + + reserved-memory { + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + + /* First 518 MiB is reserved for other purposes. */ + firmware@40000000 { + reg =3D <0x0 0x40000000 0x0 0x20600000>; + no-map; + }; + + /* Parameters set by IPL. */ + parameters@8c100000 { + reg =3D <0x0 0x8c100000 0x0 0x00008000>; + no-map; + }; + + /* TFA BL31. */ + tfa-bl31@8c200000 { + reg =3D <0x0 0x8c200000 0x0 0x00080000>; + no-map; + }; + + /* TEE TZ DRAM. */ + tee@8c400000 { + reg =3D <0x0 0x8c400000 0x0 0x02000000>; + no-map; + }; + }; }; =20 &extal_clk { --=20 2.53.0