diff options
author | Alistair Francis <alistair.francis@wdc.com> | 2021-04-19 16:16:25 +1000 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2021-05-11 20:02:06 +1000 |
commit | 94c6ba83c1a1e45558bd32421b85233053a1c6f3 (patch) | |
tree | a6c52823f9505937855564b37b9411521de7347a /target/riscv/cpu_bits.h | |
parent | 0924a423baa227fa8fb363232c20a997cb6f617b (diff) | |
download | qemu-94c6ba83c1a1e45558bd32421b85233053a1c6f3.zip qemu-94c6ba83c1a1e45558bd32421b85233053a1c6f3.tar.gz qemu-94c6ba83c1a1e45558bd32421b85233053a1c6f3.tar.bz2 |
target/riscv: Fix the PMP is locked check when using TOR
The RISC-V spec says:
if PMP entry i is locked and pmpicfg.A is set to TOR, writes to
pmpaddri-1 are ignored.
The current QEMU code ignores accesses to pmpaddri-1 and pmpcfgi-1 which
is incorrect.
Update the pmp_is_locked() function to not check the supporting fields
and instead enforce the lock functionality in the pmpaddr write operation.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-id: 2831241458163f445a89bd59c59990247265b0c6.1618812899.git.alistair.francis@wdc.com
Diffstat (limited to 'target/riscv/cpu_bits.h')
0 files changed, 0 insertions, 0 deletions