qemu-discuss
[Top][All Lists]
Advanced

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

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


From: Mikhail R. Gadelha
Subject: How to increase memory in a RISCV32 image? Stuck with 988MB
Date: Mon, 17 Apr 2023 14:21:31 -0300

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 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

I see that the kernel prints:

[    0.000000] Memory limited to 1024MB

so maybe it's a kernel limitation rather than qemu?

--

Mikhail Ramalho.

reply via email to

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