On Wed, 21 Aug 2019 23:59:28 +0200 cinap_len...@felloff.net wrote: cinap_len...@felloff.net writes: > > The firmware on a pi4 with 2GB or 4GB RAM will only report 1GB. > > I believe you need to look at the board id (or probe for invalid > > addresses as in the teg2 kernel) to find out the real amount. > > oh dear. i dont even know the expected physical memory map... > i guess that ram is continuous block at [0-0xfc000000). but > some memory might be reserved... > > on what method does it report only 1GB? > > i know of 3 methods so far: > > - atags > - device tree /memory/reg property > - firmware property request (getramsize() in vcore.c) > > for me getramsize() returns zero for both base and limit so its > completely useless. > > i'm currently using device tree method, but the code assumes that > there is a single block entry. lets see if that lies as well with > the debug kernel.
The device tree has two entries. offset:0 lenght:0x3c400000 offset:0x40000000 length:0xbc000000