target/riscv: Relax debug check for pm write

Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-id: 20220120122050.41546-10-zhiwei_liu@c-sky.com
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
LIU Zhiwei 2022-01-20 20:20:36 +08:00 committed by Alistair Francis
parent 1191be09a9
commit 47bdec821b

View File

@ -1556,6 +1556,9 @@ static bool check_pm_current_disabled(CPURISCVState *env, int csrno)
int csr_priv = get_field(csrno, 0x300);
int pm_current;
if (env->debugger) {
return false;
}
/*
* If priv lvls differ that means we're accessing csr from higher priv lvl,
* so allow the access