Re: [PATCH v3 0/2] hw/arm/raspi4b: fix guest RAM capped at ~1 GiB regardless of machine size

Peter Maydell <[email protected]>
Newsgroups org.nongnu.qemu-arm,org.nongnu.qemu-devel
Message-ID <CAFEAcA_duyqT1F2m64jg10Xy+4QVikZfUbacvZ50v=isrcCKZg@mail.gmail.com>
On Tue, 11 Aug 2026 at 15:35, Marcelo Manzo <[email protected]> wrote:
>
> While working on unrelated raspi4b issues, I noticed the guest never
> seemed to have as much RAM as I'd given it and tracked it down to
> hw/arm/raspi4b.c's raspi4_modify_dtb(): it decides whether to add a
> second memory node above the 1 GiB peripheral hole by checking
> info->ram_size, but that field is the boot loader's RAM budget for
> where it's allowed to place the kernel/initrd/dtb image, itself always
> capped to at most UPPER_RAM_BASE - vcram_size by
> raspi_base_machine_init(). Since that capped value can never exceed
> UPPER_RAM_BASE by construction, the condition was never true for any
> raspi4b configuration -- the second node was never added, and the
> guest never saw more than ~1 GiB of RAM regardless of the machine's
> nominal size. board_ram_size(info->board_id), computed one line above
> in the same function, is the value that was actually needed.
>
> Patch 1 fixes it (one line); patch 2 adds a regression test.
>



Applied to target-arm.next, thanks.

-- PMM
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.