target/riscv: Drop priv level check in mseccfg predicate()
riscv_csrrw_check() already does the generic privilege level check hence there is no need to do the specific M-mode access check in the mseccfg predicate(). With this change debugger can access the mseccfg CSR anytime. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Message-ID: <20230228104035.1879882-18-bmeng@tinylab.org> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This commit is contained in:
parent
e4e1f216a1
commit
9e83a35661
@ -451,7 +451,7 @@ static RISCVException pmp(CPURISCVState *env, int csrno)
|
|||||||
|
|
||||||
static RISCVException epmp(CPURISCVState *env, int csrno)
|
static RISCVException epmp(CPURISCVState *env, int csrno)
|
||||||
{
|
{
|
||||||
if (env->priv == PRV_M && riscv_cpu_cfg(env)->epmp) {
|
if (riscv_cpu_cfg(env)->epmp) {
|
||||||
return RISCV_EXCP_NONE;
|
return RISCV_EXCP_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user