> 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...
No, the framebuffer is always reserved at the top of the
first 1GB, so on 2GB and 4GB units there are two separate
regions.
> - 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.
That's strange, getramsize works on my 2GB pi4:
getramsize 0 1046478848
The same values are in atags (you need 'device_tree=' in config.txt
to make the firmware pass atags instead of devicetree).