diff options
-rw-r--r-- | target/riscv/pmp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target/riscv/pmp.c b/target/riscv/pmp.c index a08cd95..bcb4baa 100644 --- a/target/riscv/pmp.c +++ b/target/riscv/pmp.c @@ -45,6 +45,10 @@ static inline uint8_t pmp_get_a_field(uint8_t cfg) */ static inline int pmp_is_locked(CPURISCVState *env, uint32_t pmp_index) { + /* mseccfg.RLB is set */ + if (MSECCFG_RLB_ISSET(env)) { + return 0; + } if (env->pmp_state.pmp[pmp_index].cfg_reg & PMP_LOCK) { return 1; |