aboutsummaryrefslogtreecommitdiff
path: root/hw/gpio/imx_gpio.c
diff options
context:
space:
mode:
authorDaniel Henrique Barboza <dbarboza@ventanamicro.com>2023-05-17 10:57:10 -0300
committerAlistair Francis <alistair.francis@wdc.com>2023-06-13 17:02:19 +1000
commitbd30559568607324f467bff66d8644fc08cb4729 (patch)
tree66104a54ef127de552f275205a89a34509f6d5cf /hw/gpio/imx_gpio.c
parentd33e39f995c377fee61281ddf44cd793e1a45625 (diff)
downloadqemu-bd30559568607324f467bff66d8644fc08cb4729.zip
qemu-bd30559568607324f467bff66d8644fc08cb4729.tar.gz
qemu-bd30559568607324f467bff66d8644fc08cb4729.tar.bz2
target/riscv/cpu.c: add priv_spec validate/disable_exts helpers
We're doing env->priv_spec validation and assignment at the start of riscv_cpu_realize(), which is fine, but then we're doing a force disable on extensions that aren't compatible with the priv version. This second step is being done too early. The disabled extensions might be re-enabled again in riscv_cpu_validate_set_extensions() by accident. A better place to put this code is at the end of riscv_cpu_validate_set_extensions() after all the validations are completed. Add a new helper, riscv_cpu_disable_priv_spec_isa_exts(), to disable the extesions after the validation is done. While we're at it, create a riscv_cpu_validate_priv_spec() helper to host all env->priv_spec related validation to unclog riscv_cpu_realize a bit. Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230517135714.211809-8-dbarboza@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'hw/gpio/imx_gpio.c')
0 files changed, 0 insertions, 0 deletions