projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a101b64
)
target/riscv: Require either I or E base extension
author
Alistair Francis
<alistair.francis@wdc.com>
Tue, 18 Jun 2019 01:31:16 +0000
(18:31 -0700)
committer
Palmer Dabbelt
<palmer@sifive.com>
Tue, 25 Jun 2019 10:05:41 +0000
(
03:05
-0700)
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
target/riscv/cpu.c
patch
|
blob
|
history
diff --git
a/target/riscv/cpu.c
b/target/riscv/cpu.c
index ba1325f43533397b04902b7495c53f37dd2413b2..1689ffecf85f5d83c985aa48dfdc02601a983a50 100644
(file)
--- a/
target/riscv/cpu.c
+++ b/
target/riscv/cpu.c
@@
-373,6
+373,12
@@
static void riscv_cpu_realize(DeviceState *dev, Error **errp)
return;
}
+ if (!cpu->cfg.ext_i && !cpu->cfg.ext_e) {
+ error_setg(errp,
+ "Either I or E extension must be set");
+ return;
+ }
+
if (cpu->cfg.ext_g && !(cpu->cfg.ext_i & cpu->cfg.ext_m &
cpu->cfg.ext_a & cpu->cfg.ext_f &
cpu->cfg.ext_d)) {