summary refs log tree commit diff stats
path: root/scripts/qapi/expr.py
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2021-04-19 16:16:25 +1000
committerAlistair Francis <alistair.francis@wdc.com>2021-05-11 20:02:06 +1000
commit94c6ba83c1a1e45558bd32421b85233053a1c6f3 (patch)
treea6c52823f9505937855564b37b9411521de7347a /scripts/qapi/expr.py
parent0924a423baa227fa8fb363232c20a997cb6f617b (diff)
downloadfocaccia-qemu-94c6ba83c1a1e45558bd32421b85233053a1c6f3.tar.gz
focaccia-qemu-94c6ba83c1a1e45558bd32421b85233053a1c6f3.zip
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 'scripts/qapi/expr.py')
0 files changed, 0 insertions, 0 deletions