在 2022/1/2 上午3:46, Richard Henderson 写道:
On 12/31/21 9:55 PM, Weiwei Li wrote:
This shouldn't be necessary because it should never have been set.
Yes, I think so. However, I have a question about MSTATUS_MIE and
MSTATUS_MPRV, will they be set before cpu reset?
Yes, via warm reset.
Thanks.
On 12/31/21 9:55 PM, Weiwei Li wrote:
This shouldn't be necessary because it should never have been set.
Yes, I think so. However, I have a question about MSTATUS_MIE and MSTATUS_MPRV, will they
be set before cpu reset?
Yes, via warm reset.
I would think it would be more correct to have a
Thanks for your comments.
在 2022/1/1 上午3:56, Richard Henderson 写道:
On 12/30/21 7:23 PM, Weiwei Li wrote:
@@ -363,6 +363,10 @@ static void riscv_cpu_reset(DeviceState *dev)
env->misa_mxl = env->misa_mxl_max;
env->priv = PRV_M;
env->mstatus &= ~(MSTATUS_MIE | MSTATUS_MPRV);
+
On 12/30/21 7:23 PM, Weiwei Li wrote:
@@ -363,6 +363,10 @@ static void riscv_cpu_reset(DeviceState *dev)
env->misa_mxl = env->misa_mxl_max;
env->priv = PRV_M;
env->mstatus &= ~(MSTATUS_MIE | MSTATUS_MPRV);
+/* hardwire mstatus.FS to zero when enable zfinx */
+if
From: liweiwei
Co-authored-by: ardxwe
Signed-off-by: Weiwei Li
Signed-off-by: Junqiang Wang
---
target/riscv/cpu.c| 4
target/riscv/cpu_helper.c | 6 +-
target/riscv/csr.c| 24 +++-
target/riscv/translate.c | 5 +
4 files changed, 33