[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH for-8.1 14/17] target/riscv/cpu.c: do not allow RVE to be set
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH for-8.1 14/17] target/riscv/cpu.c: do not allow RVE to be set |
Date: |
Wed, 8 Mar 2023 17:19:22 -0300 |
This restriction is found at the current implementation of write_misa()
in csr.c. Add it in riscv_cpu_validate_set_extensions() as well, while
also removing the checks we're doing considering that I or E can be
enabled.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
---
target/riscv/cpu.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index 49f0fd2c11..7a5d202069 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -1045,15 +1045,15 @@ static void riscv_cpu_validate_set_extensions(RISCVCPU
*cpu, Error **errp)
cpu->cfg.ext_ifencei = true;
}
- if (cpu->cfg.ext_i && cpu->cfg.ext_e) {
- error_setg(errp,
- "I and E extensions are incompatible");
+ /* We do not have RV32E support */
+ if (cpu->cfg.ext_e) {
+ error_setg(errp, "E extension (RV32E) is not supported");
return;
}
- if (!cpu->cfg.ext_i && !cpu->cfg.ext_e) {
- error_setg(errp,
- "Either I or E extension must be set");
+ /* When RV32E is supported we'll need to check for either I or E */
+ if (!cpu->cfg.ext_i) {
+ error_setg(errp, "I extension must be set");
return;
}
--
2.39.2
- [PATCH for-8.1 05/17] target/riscv/cpu.c: add riscv_cpu_validate_priv_spec(), (continued)
- [PATCH for-8.1 05/17] target/riscv/cpu.c: add riscv_cpu_validate_priv_spec(), Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 06/17] target/riscv: move realize() validations to riscv_cpu_validate_set_extensions(), Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 07/17] target/riscv/cpu.c: remove cfg setup from riscv_cpu_init(), Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 08/17] target/riscv/cpu.c: avoid set_misa() in validate_set_extensions(), Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 09/17] target/riscv/cpu.c: set cpu config in set_misa(), Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 10/17] target/riscv/cpu.c: redesign register_cpu_props(), Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 11/17] target/riscv/cpu.c: move riscv_cpu_validate_v() up, Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 12/17] target/riscv: put env->misa_ext <-> cpu->cfg code into helpers, Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 13/17] target/riscv/cpu.c: split riscv_cpu_validate_priv_spec(), Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 14/17] target/riscv/cpu.c: do not allow RVE to be set,
Daniel Henrique Barboza <=
- [PATCH for-8.1 15/17] target/riscv: add RVG, Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 16/17] target/riscv: do not allow RVG in write_misa(), Daniel Henrique Barboza, 2023/03/08
- [PATCH for-8.1 17/17] target/riscv: rework write_misa(), Daniel Henrique Barboza, 2023/03/08
- Re: [PATCH for-8.1 00/17] centralize CPU extensions logic, Daniel Henrique Barboza, 2023/03/09