]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/riscv/pmp.c: respect mseccfg.RLB for pmpaddrX changes
authorLeon Schuermann <leons@opentitan.org>
Tue, 29 Aug 2023 21:50:46 +0000 (17:50 -0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 21 Sep 2023 16:35:19 +0000 (19:35 +0300)
commit7385e00665b66ab9d7180421b1a69c4e4899c6de
treeede9dd45eeeecf536e68fcc23d4ec0d9cc690d27
parent1d4fb5815c87e6ec48abcc3066378ba383788f4a
target/riscv/pmp.c: respect mseccfg.RLB for pmpaddrX changes

When the rule-lock bypass (RLB) bit is set in the mseccfg CSR, the PMP
configuration lock bits must not apply. While this behavior is
implemented for the pmpcfgX CSRs, this bit is not respected for
changes to the pmpaddrX CSRs. This patch ensures that pmpaddrX CSR
writes work even on locked regions when the global rule-lock bypass is
enabled.

Signed-off-by: Leon Schuermann <leons@opentitan.org>
Reviewed-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-ID: <20230829215046.1430463-1-leon@is.currently.online>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
(cherry picked from commit 4e3adce1244e1ca30ec05874c3eca14911dc0825)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/riscv/pmp.c