diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2023-01-23 13:57:54 +1000 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2023-02-07 08:19:22 +1000 |
commit | 32c435a1ae9be183a309fb102d0fc38a4d2cd669 (patch) | |
tree | b74cf67196905f35531bd6e46766e64560579429 /target | |
parent | 7ae714628745e28e0f1e2d5ad0f95b27a40ff5c2 (diff) | |
download | qemu-32c435a1ae9be183a309fb102d0fc38a4d2cd669.zip qemu-32c435a1ae9be183a309fb102d0fc38a4d2cd669.tar.gz qemu-32c435a1ae9be183a309fb102d0fc38a4d2cd669.tar.bz2 |
hw/riscv: boot: Don't use CSRs if they are disabled
If the CSRs and CSR instructions are disabled because the Zicsr
extension isn't enabled then we want to make sure we don't run any CSR
instructions in the boot ROM.
This patches removes the CSR instructions from the reset-vec if the
extension isn't enabled. We replace the instruction with a NOP instead.
Note that we don't do this for the SiFive U machine, as we are modelling
the hardware in that case.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1447
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Message-Id: <20230123035754.75553-1-alistair.francis@opensource.wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target')
0 files changed, 0 insertions, 0 deletions