gem5-users@gem5.org

The gem5 Users mailing list

View all threads

handle syscalls in FS (bare-metal) mode for RISCV

PA
Priyanka Ankolekar
Wed, Feb 1, 2023 6:57 PM

Hello,
I am trying to run the dhrystone benchmark (from this repo:
https://github.com/riscv-software-src/riscv-tests) on RISCV bare-metal
mode using gem5 in full-system simulation model (fs_linux.py). I have
compiled the dhrystone code using riscv64-unknown-elf-gcc compiler.
When I run this, the simulation never exits because it cannot handle
the syscall coming from the dhrystone.riscv binary.

How can I make changes to the simulator so it can handle syscalls (for
example, to perform a printf or std::cout)?

I am new to this, so any help understanding this would be very useful.

Thank you.

Priyanka.

Hello, I am trying to run the dhrystone benchmark (from this repo: https://github.com/riscv-software-src/riscv-tests) on RISCV bare-metal mode using gem5 in full-system simulation model (fs_linux.py). I have compiled the dhrystone code using riscv64-unknown-elf-gcc compiler. When I run this, the simulation never exits because it cannot handle the syscall coming from the dhrystone.riscv binary. How can I make changes to the simulator so it can handle syscalls (for example, to perform a printf or std::cout)? I am new to this, so any help understanding this would be very useful. Thank you. Priyanka.
AA
Ayaz Akram
Mon, Feb 6, 2023 7:46 PM

Hi Priyanka,

If you want syscall handling you can use full-system simulation with Linux
as the OS (instead of the bare metal full system). gem5 also provides a
syscall emulation (SE) mode where you do not need to run any OS, and gem5
would emulate most of the system calls.

-Ayaz

On Wed, Feb 1, 2023 at 11:02 AM Priyanka Ankolekar via gem5-users <
gem5-users@gem5.org> wrote:

Hello,
I am trying to run the dhrystone benchmark (from this repo: https://github.com/riscv-software-src/riscv-tests) on RISCV bare-metal mode using gem5 in full-system simulation model (fs_linux.py). I have compiled the dhrystone code using riscv64-unknown-elf-gcc compiler.
When I run this, the simulation never exits because it cannot handle the syscall coming from the dhrystone.riscv binary.

How can I make changes to the simulator so it can handle syscalls (for example, to perform a printf or std::cout)?

I am new to this, so any help understanding this would be very useful.

Thank you.

Priyanka.


gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-leave@gem5.org

Hi Priyanka, If you want syscall handling you can use full-system simulation with Linux as the OS (instead of the bare metal full system). gem5 also provides a syscall emulation (SE) mode where you do not need to run any OS, and gem5 would emulate most of the system calls. -Ayaz On Wed, Feb 1, 2023 at 11:02 AM Priyanka Ankolekar via gem5-users < gem5-users@gem5.org> wrote: > Hello, > I am trying to run the dhrystone benchmark (from this repo: https://github.com/riscv-software-src/riscv-tests) on RISCV bare-metal mode using gem5 in full-system simulation model (fs_linux.py). I have compiled the dhrystone code using riscv64-unknown-elf-gcc compiler. > When I run this, the simulation never exits because it cannot handle the syscall coming from the dhrystone.riscv binary. > > How can I make changes to the simulator so it can handle syscalls (for example, to perform a printf or std::cout)? > > I am new to this, so any help understanding this would be very useful. > > Thank you. > > Priyanka. > > _______________________________________________ > gem5-users mailing list -- gem5-users@gem5.org > To unsubscribe send an email to gem5-users-leave@gem5.org >