From: Martino Dell'Ambrogio <tillo@tillo•ch>
To: matthias.bgg@gmail•com, angelogioacchino.delregno@collabora•com
Cc: kees@kernel•org, tony.luck@intel•com, gpiccoli@igalia•com,
linux-mediatek@lists•infradead.org,
linux-arm-kernel@lists•infradead.org, devicetree@vger•kernel.org,
linux-kernel@vger•kernel.org,
Martino Dell'Ambrogio <tillo@tillo•ch>
Subject: [PATCH] arm64: dts: mediatek: mt7988a-bananapi-bpi-r4: add ramoops region
Date: Thu, 28 May 2026 11:28:07 +0200 [thread overview]
Message-ID: <20260528092807.1936177-1-tillo@tillo.ch> (raw)
Reserve 1 MiB of RAM just below the ARM Trusted Firmware secmon region
(0x42f00000-0x43000000) for persistent kernel log storage via pstore/ramoops,
allowing post-panic console output and oops dumps to be recovered after a
reboot. Without it, kernel crash logs on this board are lost when the SoC
warm-resets and the on-chip console buffer is reinitialised.
The record sizes (128 KiB kmsg records, 256 KiB rolling console, 64 KiB
ftrace, 64 KiB pmsg) sum to 512 KiB; the remainder of the 1 MiB carve-out
is used for the ECC parity blocks (ecc-size=16, one Reed-Solomon block per
record) which significantly improves dump readability when the panic path
truncates writes mid-record.
The carve-out sits immediately below the ATF region already declared at
0x43000000 in mt7988a.dtsi, so no other reserved-memory child is moved or
resized. BPI-R4 ships with at least 4 GiB of DRAM starting at 0x40000000,
so the region is well within installed memory on every variant.
For the carve-out to actually preserve content across a reset, the boot
loader must also avoid touching this region on warm reset; on standard
BPI-R4 boards with the stock OpenWrt U-Boot fork this already holds.
Signed-off-by: Martino Dell'Ambrogio <tillo@tillo•ch>
---
.../boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
index 0ff69da..f7d4944 100644
--- a/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtsi
@@ -80,6 +80,18 @@ sfp1: sfp1 {
};
};
+&{/reserved-memory} {
+ ramoops@42f00000 {
+ compatible = "ramoops";
+ reg = <0 0x42f00000 0 0x100000>;
+ record-size = <0x20000>;
+ console-size = <0x40000>;
+ ftrace-size = <0x10000>;
+ pmsg-size = <0x10000>;
+ ecc-size = <16>;
+ };
+};
+
&cci {
proc-supply = <&rt5190_buck3>;
};
--
2.47.3
next reply other threads:[~2026-05-28 9:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 9:28 Martino Dell'Ambrogio [this message]
2026-05-28 12:36 ` [PATCH v2] arm64: dts: mediatek: mt7986a-bananapi-bpi-r3: add ramoops region Martino Dell'Ambrogio
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=20260528092807.1936177-1-tillo@tillo.ch \
--to=tillo@tillo$(echo .)ch \
--cc=angelogioacchino.delregno@collabora$(echo .)com \
--cc=devicetree@vger$(echo .)kernel.org \
--cc=gpiccoli@igalia$(echo .)com \
--cc=kees@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mediatek@lists$(echo .)infradead.org \
--cc=matthias.bgg@gmail$(echo .)com \
--cc=tony.luck@intel$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox