Skip to content

arm: dts: mediatek: mt6589-lenovo-blade: move ramoops into 1 MiB of DRAM - #87

Merged
akku1139 merged 1 commit into
blade/v7.1from
mt6589-blade-ramoops-dram
Oct 31, 2026
Merged

akku1139 merged 1 commit into
blade/v7.1from
mt6589-blade-ramoops-dram

Conversation

@trudenboy

Copy link
Copy Markdown

The SoC dtsi puts ramoops in 7 KiB of on-chip SRAM with 1 KiB records. That cannot hold one oops: our panics all ended with pstore: backend (ramoops) writing error (-28), with only the first lines of the trace stored.

This moves ramoops, for the blade boards, into 1 MiB of DRAM right below LK's framebuffer:

  • 0xbf500000, next to framebuffer_reserved;
  • 32 KiB dump records and 256 KiB of console;
  • ECC, so a damaged record is reported as damaged.

The SoC node is deleted in mt6589-lenovo-blade.dtsi, so other MT6589 boards keep theirs.

Tested: Lenovo B8000-H (MT8389), our kernel with the same node. After a forced panic and the watchdog reboot, /sys/fs/pstore held the whole oops. Where each record lives and when to clear it: docs/crash-evidence.md (Russian).

Not checked: the B8000-F and B6000. Their LK may use this range differently. The node sits in the shared blade dtsi only because framebuffer_reserved is there too.

In daily use on our tree (blade/v7.1 @ 7dd2454 + our patches) since October; rebased and build-tested on current blade/v7.1, not yet booted on this base.

Assisted-by: Claude:claude-opus-5-5

@akku1139

Copy link
Copy Markdown
Member

looks good

The SoC dtsi puts ramoops in 7 KiB of on-chip SRAM with 1 KiB records.
That cannot hold a single oops: every panic ended with
"pstore: backend (ramoops) writing error (-28)", and the record kept only
the first lines of the trace.

Reserve 1 MiB of DRAM right below LK's framebuffer instead (0xbf500000,
next to framebuffer_reserved): 32 KiB dump records, 256 KiB of console,
and ECC to tell a damaged record. LK and the kernel leave this memory
alone across a warm reset.

Tested on the Lenovo B8000-H (MT8389): after a forced panic and the
watchdog reboot, /sys/fs/pstore held the whole oops. Not checked on
the B8000-F or B6000, whose LK may use this range differently.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Mikhail Nevskiy <trudenboy0@gmail.com>
@akku1139
akku1139 force-pushed the mt6589-blade-ramoops-dram branch from 6531e35 to b26835a Compare October 31, 2026 11:16
@akku1139
akku1139 merged commit 5e43992 into blade/v7.1 Oct 31, 2026
2 of 3 checks passed
@akku1139
akku1139 deleted the mt6589-blade-ramoops-dram branch October 31, 2026 11:17
@akku1139

Copy link
Copy Markdown
Member
[    0.021647] ramoops: error in header, 5
[    0.021772] ramoops: error in header, 7
[    0.021884] ramoops: error in header, 6
[    0.022001] ramoops: error in header, 7
[    0.022125] ramoops: error in header, 8
[    0.022236] ramoops: error in header, 6
[    0.022353] ramoops: error in header, 7
[    0.022447] ramoops: uncorrectable error in header
[    0.022566] ramoops: error in header, 6
[    0.022686] ramoops: error in header, 7
[    0.022785] ramoops: error in header, 4
[    0.022902] ramoops: error in header, 7
[    0.023000] ramoops: uncorrectable error in header
[    0.023119] ramoops: error in header, 6
[    0.023243] ramoops: error in header, 8
[    0.023328] ramoops: uncorrectable error in header
[    0.023449] ramoops: error in header, 6
[    0.023572] ramoops: error in header, 8
[    0.023656] ramoops: error in header, 2
[    0.023780] ramoops: error in header, 8
[    0.023865] ramoops: uncorrectable error in header
[    0.023989] ramoops: error in header, 7
[    0.024088] ramoops: error in header, 4
[    0.024199] ramoops: error in header, 6
[    0.024324] ramoops: error in header, 8
[    0.068878] pstore: Using crash dump compression: deflate
[    0.068905] printk: legacy console [ramoops-1] enabled
[    0.080379] pstore: Registered ramoops as persistent store backend
[    0.080479] ramoops: using 0x100000@0xbf500000, ecc: 16

fmm

@trudenboy

Copy link
Copy Markdown
Author

The ramoops: error in header / uncorrectable error in header lines are expected on the first boot over uninitialized DRAM, not a regression from this change.

pstore scans every record slot at probe and checks the ECC of whatever was in DRAM before; a slot that has never held a record reads as garbage and is reported as uncorrectable. The messages stop once the region has valid records. error in header, N names the slot, and the final pstore: Registered ramoops as persistent store backend shows the backend came up anyway.

Checked on the B8000-H with the same node (1 MiB @ 0xbf500000, 32 KiB records, ECC 16): after a forced panic /sys/fs/pstore/dmesg-ramoops-0 holds the whole 48 KB oops including the panic line, ECC: No errors detected, and there is no pstore: backend (ramoops) writing error (-28). So the node is doing its job; the first-boot noise could only be quieted in pstore itself, which is outside this DTS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants