From mboxrd@z Thu Jan 1 00:00:00 1970 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-reply-to: Your message of "Wed, 21 Aug 2019 23:59:28 +0200." <3468103FF6FA1E43500C7F1B15610D60@felloff.net> References: <3468103FF6FA1E43500C7F1B15610D60@felloff.net> From: Bakul Shah MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <13258.1566425889.1@bitblocks.com> Date: Wed, 21 Aug 2019 15:18:09 -0700 Message-Id: <20190821221816.796EA1570CEA@mail.bitblocks.com> Subject: Re: [9fans] raspberry pi 4 arm64 test image Topicbox-Message-UUID: 0613dd4e-eada-11e9-9d60-3106f5b1d025 On Wed, 21 Aug 2019 23:59:28 +0200 cinap_lenrek@felloff.net wrote: cinap_lenrek@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