qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to increase memory in a RISCV32 image? Stuck with 988MB


From: Mikhail R. Gadelha
Subject: Re: How to increase memory in a RISCV32 image? Stuck with 988MB
Date: Tue, 18 Apr 2023 08:10:42 -0300

Yeah, I mentioned in the email it doesn't even start with mem=4G... 

With lower values, e.g., mem=3G, the image starts but I'm limited to 988MB of RAM.


Em ter., 18 de abr. de 2023 às 04:42, Thomas Huth <thuth@redhat.com> escreveu:
On 17/04/2023 19.21, Mikhail R. Gadelha wrote:
> Hi qemu folks,
>
> I'm using yocto to generate a riscv32 image but qemu seems to be ignoring
> the -m argument from the command line and forcing the image to run with
> 988MB of RAM.
>
> Is there any way I can increase it to 4G?
>
> I'm using the following cmdline to start qemu:
>
> qemu-system-riscv32 -nographic -machine virt -m 4G -smp 8 -bios
> /home/mgadelha/tools/poky/build/tmp/deploy/images/qemuriscv32/fw_jump.elf
> -kernel /home/mgadelha/tools/poky/build/tmp/deploy/images/qemuriscv32/Image
> -append "root=/dev/vda rw mem=4G" -drive

That "mem=4G" part of the -append option looks suspicious ... have you
already tried to boot without that, or to decrease it to a number that fits
into 32-bit, e.g. "mem=3G" ?

  HTH,
   Thomas

> id=disk0,file=/home/mgadelha/tools/poky/build/tmp/deploy/images/qemuriscv32/core-image-full-cmdline-qemuriscv32-20230415202008.rootfs.ext4,if=none,format=raw -device virtio-net-device,netdev=usernet -netdev user,id=usernet,hostfwd=tcp::22222-:22 -device virtio-blk-device,drive=disk0 -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 -device virtio-tablet-pci -device virtio-keyboard-pci
>
> Well, it actually doesn't start if I use -m 4G, but any value lower than
> that is fine.
>
> Here's also the boot log: https://pastebin.com/b7ZEP659
> <https://pastebin.com/b7ZEP659>
>
> I see that the kernel prints:
>
> [    0.000000] Memory limited to 1024MB
>
> so maybe it's a kernel limitation rather than qemu?
>
> --
>
> Mikhail Ramalho.



--

Mikhail Ramalho.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]