[Top][All Lists]

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

Re: How to enable Zicsr extension support on qemu-riscv32?

From: Daniel Henrique Barboza
Subject: Re: How to enable Zicsr extension support on qemu-riscv32?
Date: Sun, 25 Jun 2023 20:24:18 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0


On 6/25/23 17:44, Tommy Murphy wrote:
Hi there

I've tried searching to find an answer to this question but with no success so 
far unfortunately.

The issue is discussed here: 

But the gist is that I can configure, build and use `qemu-riscv32` to run a simple bare 
metal "hello world" program fine.
But if I add a CSR read instruction to it (e.g. `asm("csrr t0, misa");`) then I 
get Illegal Instruction.

This is the case even if I use `qemu-riscv32 -cpu rv32,Zicsr=on hello.exe`.

How can I configure/invoke `qemu-riscv32` so that I can emulate CSR 

rv32 already has Zicsr support enabled by default. There might a bug

Please file a gitlab bug (https://gitlab.com/qemu-project/qemu/-/issues) and
we'll take a look. Don't forget to mention that you managed to reproduce the
SIGILL using upstream QEMU as you mentioned in the toolchain bug. Thanks,


Thanks a lot


reply via email to

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