Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can we increase qemu_riscv32/64 RAM sizes #19063

Closed
andrewboie opened this issue Sep 11, 2019 · 6 comments
Closed

can we increase qemu_riscv32/64 RAM sizes #19063

andrewboie opened this issue Sep 11, 2019 · 6 comments
Assignees
Labels
area: QEMU QEMU Emulation area: RISCV RISCV Architecture (32-bit & 64-bit) area: Tests Issues related to a particular existing or missing test Enhancement Changes/Updates/Additions to existing features

Comments

@andrewboie
Copy link
Contributor

andrewboie commented Sep 11, 2019

Both qemu_riscv32 and qemu_riscv64 inherit from the riscv32-fe10.dtsi which provides only 16KB of RAM.

This prevents a lot of larger test cases from running on RISCV under emulation in QEMU.

Can we change this? I'd suggest a couple megabytes which would allow the largest tests to run. But anything is better than 16KB.

I tried overriding &dtim in the board-level DTS to increase RAM size but this just caused QEMU to crash.

@andrewboie andrewboie added the Enhancement Changes/Updates/Additions to existing features label Sep 11, 2019
@andrewboie andrewboie added area: RISCV RISCV Architecture (32-bit & 64-bit) area: QEMU QEMU Emulation area: Tests Issues related to a particular existing or missing test labels Sep 11, 2019
@andrewboie
Copy link
Contributor Author

@nategraff-sifive FYI

@nategraff-sifive
Copy link
Contributor

All this needs to work is a patch to QEMU to increase the amount of emulated DTIM.

@0xAl3xH
Copy link

0xAl3xH commented Nov 3, 2019

All this needs to work is a patch to QEMU to increase the amount of emulated DTIM.

How does one do this? Is there a config setting somewhere?

@nategraff-sifive
Copy link
Contributor

It just needs a patch in the Zephyr SDK sources which alters the size of the DTIM in hw/riscv/sifive_e.c in the QEMU source tree.

You'd want to edit this struct:

static const struct MemmapEntry {
    hwaddr base;
    hwaddr size;
} sifive_e_memmap[] = {
    ...
    [SIFIVE_E_DTIM] =     { 0x80000000,     0x4000 }
};

Just increase the second number to something like 0x400000

@andrewboie
Copy link
Contributor Author

There's no other way to do this other than patching the QEMU source code?

@nategraff-sifive
Copy link
Contributor

QEMU hard-codes the size of the DTIM 🤷‍♂ There might be a more elegant way but I'm not familiar enough with QEMU to know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: QEMU QEMU Emulation area: RISCV RISCV Architecture (32-bit & 64-bit) area: Tests Issues related to a particular existing or missing test Enhancement Changes/Updates/Additions to existing features
Projects
None yet
Development

No branches or pull requests

3 participants