RPi4B only allocates 1GB instead of 4GB

Gordon Bergling gbe at freebsd.org
Tue Aug 11 21:04:50 UTC 2020


Hi Hrant,

On Wed, Aug 12, 2020 at 12:45:59AM +0400, Hrant Dadivanyan wrote:
> Hi,
> 
> https://wiki.freebsd.org/arm/Raspberry%20Pi is quite useful for RPi4
> setup. As for memory, it was:
> real memory  = 251428864 (239 MB)
> avail memory = 221073408 (210 MB)
> until I've replaced existing u-boot with one provided in the wiki -
> https://sourceforge.net/projects/rpi4-8gbram-boot-fbsdonly/files/u-boot.bin/download
> :
> real memory  = 7700508672 (7343 MB)
> avail memory = 7487938560 (7141 MB)
> 
> Thanks to Robert Crowston and all who work on this, well done.
> 
> Thank you,
> Hrant

Thank you for pointing towards the modified u-boot files, which, indeed, solves
the memory problem on the RPi4B, since it detects now the 4GB onboard memory.

I know the FreeBSD wiki pages, but I didn't find any references for the updated
u-boot binaries you reference to. I'll speak with Robert and after his changes are
upstreamed FreeBSD will hopefully soon have live images available that have the fixes
included.

Thank you,

--Gordon

> On 2020-08-11 23:47, Gordon Bergling wrote:
> > Hi,
> > 
> > I am currently working on an issue [1] of FreeBSD regarding the memory allocation
> > on the RPi4B. I have a 4GB model running a very recent version of -CURRENT,
> > but FreeBSD only recognizes 1GB instead of the installed 4GB of memory.
> > 
> > I spent some time today looking through the general determination of physical 
> > memory in FreeBSD in sys/vm/vm_phys.c, but my initial try to simply the issue
> > by building a kernel without NUMA support wasn't that successful.
> > 
> > The next part I was thinking about was the firmware -> kernel interface, lets
> > say UEFI vs. 'plain u-boot'. But after the study of information I found on the
> > net, that is a far different story, compared to read C-sources.
> > 
> > Has anyone a RPi4 or RPi4B with memory != 1GB, who could verify that issue?
> > 
> > I found some information on a chinese website where somebody posted a dmesg
> > output of FreeBSD 13-CURRENT on an RPi4B (8 GB version) where the memory
> > allocation was correct.
> > 
> > --Gordon
> > 
> > [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247012
> > _______________________________________________
> > freebsd-arm at freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> > To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20200811/1779cef1/attachment.sig>


More information about the freebsd-arm mailing list