[RFC][PATCH] rpi: Fix DRAM size reporting to show total RAM
Peter Robinson
pbrobinson at gmail.com
Fri Nov 28 15:07:38 CET 2025
On Tue, 25 Nov 2025 at 12:47, Anders Roxell <anders.roxell at linaro.org> wrote:
>
> On Tue, 25 Nov 2025 at 13:20, Peter Robinson <pbrobinson at gmail.com> wrote:
> >
> > On Tue, 25 Nov 2025 at 10:25, Anders Roxell <anders.roxell at linaro.org> wrote:
> > >
> > > The VideoCore mailbox GET_ARM_MEMORY only reports the size of the
> > > first accessible memory region (~947 MiB on RPi4 with 8GB), not the
> > > total RAM. This causes U-Boot to display "DRAM: 947 MiB (total 7.9 GiB)"
> > > instead of "DRAM: 7.9 GiB".
> > >
> > > On Raspberry Pi 4 with 8GB RAM, the memory is split across multiple
> > > non-contiguous banks. The dram_init() function only sets gd->ram_size
> > > to the first bank size reported by the VideoCore firmware, while
> > > fdtdec_setup_memory_banksize() correctly populates all memory banks
> > > from the device tree.
> > >
> > > Fix this by updating gd->ram_size after dram_init_banksize() has
> > > populated all memory banks, so it reflects the actual total RAM
> > > across all banks.
> > >
> > > Signed-off-by: Anders Roxell <anders.roxell at linaro.org>
> >
> > Please add details as to why this is RFC? What comments are you actually after?
>
> I don't commit to u-boot that much, so I wasn't sure if this was the
> right thing to do.
Yup, all looked fine, I've applied it.
More information about the U-Boot
mailing list