Skip to content

Pi 5: dtoverlay=ramoops merged with 12-byte reg (2+1 cells) despite /reserved-memory #size-cells=2 — kernel rejects region, ramoops never probes #7517

Description

@serialseb

Describe the bug

On a Pi 5, dtoverlay=ramoops (with or without parameters) produces a
/reserved-memory/ramoops@b000000 node whose reg is 12 bytes —
2 address cells + 1 size cell — while the bcm2712 base DTBs declare
#address-cells = <2> and #size-cells = <2> under /reserved-memory.
The kernel therefore rejects the region and ramoops never probes:

OF: reserved mem: invalid reg property size in 'ramoops@b000000' - firmware out-of-date?
ramoops b000000.ramoops: failed to locate DT /reserved-memory resource
ramoops b000000.ramoops: probe with driver ramoops failed with error -22

Observed merged node (/proc/device-tree), with
dtoverlay=ramoops,total-size=0x40000,record-size=0x10000:

/reserved-memory/#address-cells = <2>
/reserved-memory/#size-cells    = <2>
/reserved-memory/ramoops@b000000/reg = <0x0 0x0b000000 0x00040000>   ; 12 bytes

The shipped ramoops.dtbo carries reg = <0xb000000 0x10000> (1+1 cells),
so the bootloader's merge regenerated the property: the address was widened
to 2 cells but the size was left at 1 — consistent with using the DT-spec
default cell counts (2/1) instead of the values the parent node declares
(2/2). Both the Debian-packaged 6.18.34 DTB and the current rpi-update
master DTB declare 2/2, so the failure is independent of which kernel's DTB
is in /boot/firmware.

Merging the same node offline into bcm2712-rpi-5-b.dtb with fdtoverlay
(from an overlay carrying an explicit reg = <0x0 0xb000000 0x0 0x40000>)
produces a spec-valid 16-byte reg, so only the boot-time merge path
appears to be at fault.

To reproduce

  1. Pi 5, Raspberry Pi OS (trixie), bootloader pieeprom-2026-06-29.
  2. Add dtoverlay=ramoops (parameters optional) to /boot/firmware/config.txt; reboot.
  3. dmesg | grep -i ramoops shows the probe failure above;
    fdtget -t bu /proc/device-tree /reserved-memory/ramoops@b000000 reg | wc -w prints 12.

Expected behaviour

reg emitted with the parent's declared cell counts (16 bytes:
<0x0 0xb000000 0x0 0x40000>), ramoops probes, /sys/fs/pstore becomes
available.

System

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions