Re: [PATCH] target/riscv/pmp: Raise exception if no PMP entry is configured

2020-12-23 Thread Atish Patra
On Tue, 2020-12-22 at 18:49 -0800, Richard Henderson wrote: > On 12/22/20 5:21 PM, Atish Patra wrote: > > +++ b/target/riscv/pmp.c > > @@ -74,7 +74,7 @@ static inline int pmp_is_locked(CPURISCVState > > *env, uint32_t pmp_index) > >  /* > >   * Count the number of active rules. > >   */ > > -static

Re: [PATCH] target/riscv/pmp: Raise exception if no PMP entry is configured

2020-12-22 Thread Richard Henderson
On 12/22/20 5:21 PM, Atish Patra wrote: > +++ b/target/riscv/pmp.c > @@ -74,7 +74,7 @@ static inline int pmp_is_locked(CPURISCVState *env, > uint32_t pmp_index) > /* > * Count the number of active rules. > */ > -static inline uint32_t pmp_get_num_rules(CPURISCVState *env) > +inline uint32_t p

[PATCH] target/riscv/pmp: Raise exception if no PMP entry is configured

2020-12-22 Thread Atish Patra
As per the privilege specification, any access from S/U mode should fail if no pmp region is configured. Signed-off-by: Atish Patra --- target/riscv/op_helper.c | 5 + target/riscv/pmp.c | 4 ++-- target/riscv/pmp.h | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --