Skip to content

Commit 8ba26b0

Browse files
zongboxalistair23
authored andcommitted
target/riscv: Fix the range of pmpcfg of CSR funcion table
The range of Physical Memory Protection should be from CSR_PMPCFG0 to CSR_PMPCFG3, not to CSR_PMPADDR9. Signed-off-by: Zong Li <[email protected]> Reviewed-by: Alistair Francis <[email protected]> Reviewed-by: Bin Meng <[email protected]> Message-Id: <eae49e9252c9596e4f3bdb471772f79235141a87.1595335112.git.zong.li@sifive.com> Signed-off-by: Alistair Francis <[email protected]>
1 parent e79d27c commit 8ba26b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

target/riscv/csr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,7 @@ static riscv_csr_operations csr_ops[CSR_TABLE_SIZE] = {
13531353
[CSR_MTINST] = { hmode, read_mtinst, write_mtinst },
13541354

13551355
/* Physical Memory Protection */
1356-
[CSR_PMPCFG0 ... CSR_PMPADDR9] = { pmp, read_pmpcfg, write_pmpcfg },
1356+
[CSR_PMPCFG0 ... CSR_PMPCFG3] = { pmp, read_pmpcfg, write_pmpcfg },
13571357
[CSR_PMPADDR0 ... CSR_PMPADDR15] = { pmp, read_pmpaddr, write_pmpaddr },
13581358

13591359
/* Performance Counters */

0 commit comments

Comments
 (0)