target/riscv: Update the next rule addr in pmpaddr_csr_write()
commit2b3e127856b8a0a6a3a6dfa815f3165810436483
authorWeiwei Li <liweiwei@iscas.ac.cn>
Wed, 17 May 2023 09:15:15 +0000 (17 17:15 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Tue, 13 Jun 2023 07:12:27 +0000 (13 17:12 +1000)
tree1a166a13f0817146eb2b293e97a54e35632f2324
parent37e79058031b0490734f724edf4e1691f6b3601e
target/riscv: Update the next rule addr in pmpaddr_csr_write()

Currently only the rule addr of the same index of pmpaddr is updated
when pmpaddr CSR is modified. However, the rule addr of next PMP entry
may also be affected if its A field is PMP_AMATCH_TOR. So we should
also update it in this case.

Write to pmpaddr CSR will not affect the rule nums, So we needn't update
call pmp_update_rule_nums()  in pmpaddr_csr_write().

Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn>
Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230517091519.34439-9-liweiwei@iscas.ac.cn>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
target/riscv/pmp.c