target/riscv: Allow setting ISA extensions via CPU props

This patch allows us to enable/disable the RISC-V ISA extensions from
the QEMU command line. This works with the rv32 and rv64 machines. The
idea is that in the future we can now add extensions and leave them
disabled by default until enabled by the user.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
Alistair Francis 2019-05-06 22:49:53 +00:00 committed by Palmer Dabbelt
parent 474f3938d7
commit b55d7d34f6
No known key found for this signature in database
GPG key ID: EF4CA1502CCBAB41
2 changed files with 79 additions and 2 deletions

View file

@ -211,6 +211,17 @@ typedef struct RISCVCPU {
/* Configuration Settings */
struct {
bool ext_i;
bool ext_e;
bool ext_g;
bool ext_m;
bool ext_a;
bool ext_f;
bool ext_d;
bool ext_c;
bool ext_s;
bool ext_u;
char *priv_spec;
char *user_spec;
bool mmu;