[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 16/18] target/riscv: Drop priv level check in mseccfg predicate()
From: |
Bin Meng |
Subject: |
[PATCH 16/18] target/riscv: Drop priv level check in mseccfg predicate() |
Date: |
Tue, 14 Feb 2023 12:12:49 +0800 |
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>
---
target/riscv/csr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index c6a7745cb2..40aae9e7b3 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -450,7 +450,7 @@ static RISCVException pmp(CPURISCVState *env, int csrno)
static RISCVException epmp(CPURISCVState *env, int csrno)
{
- if (env->priv == PRV_M && riscv_feature(env, RISCV_FEATURE_EPMP)) {
+ if (riscv_feature(env, RISCV_FEATURE_EPMP)) {
return RISCV_EXCP_NONE;
}
--
2.25.1
- [PATCH 12/18] target/riscv: Allow debugger to access user timer and counter CSRs, (continued)
- [PATCH 12/18] target/riscv: Allow debugger to access user timer and counter CSRs, Bin Meng, 2023/02/13
- [PATCH 13/18] target/riscv: Allow debugger to access seed CSR, Bin Meng, 2023/02/13
- [PATCH 14/18] target/riscv: Allow debugger to access {h, s}stateen CSRs, Bin Meng, 2023/02/13
- [PATCH 15/18] target/riscv: Allow debugger to access sstc CSRs, Bin Meng, 2023/02/13
- [PATCH 16/18] target/riscv: Drop priv level check in mseccfg predicate(),
Bin Meng <=
- [PATCH 17/18] target/riscv: Group all predicate() routines together, Bin Meng, 2023/02/13
- [PATCH 18/18] target/riscv: Move configuration check to envcfg CSRs predicate(), Bin Meng, 2023/02/14
- Re: [PATCH 18/18] target/riscv: Move configuration check to envcfg CSRs predicate(), weiwei, 2023/02/14
- Re: [PATCH 18/18] target/riscv: Move configuration check to envcfg CSRs predicate(), Bin Meng, 2023/02/14
- Re: [PATCH 18/18] target/riscv: Move configuration check to envcfg CSRs predicate(), weiwei, 2023/02/14
- Re: [PATCH 18/18] target/riscv: Move configuration check to envcfg CSRs predicate(), Palmer Dabbelt, 2023/02/16
- Re: [PATCH 18/18] target/riscv: Move configuration check to envcfg CSRs predicate(), Bin Meng, 2023/02/16
- Re: [PATCH 18/18] target/riscv: Move configuration check to envcfg CSRs predicate(), Palmer Dabbelt, 2023/02/17