[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/6] target/riscv: hardwire mstatus.FS to zero when enable
From: |
Weiwei Li |
Subject: |
Re: [PATCH v2 2/6] target/riscv: hardwire mstatus.FS to zero when enable zfinx |
Date: |
Sun, 2 Jan 2022 13:53:52 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
在 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. I'll fix this later.
I would think it would be more correct to have a positive test for
RVF, rather than a negative test for ZFINX?
It may deviate from the original value of mstatus_mask with a
positive test for RVF.
Oh, you mean misa_ext? Hmm. Interesting point.
When F extension is not implemented, FS is either hardwired to zero
(without S-mode) or optionally zero. So this looks like an existing
bug to be fixed.
OK. There is similar logic in write_mstatus and . I'll fix it too.
I'll also update write_frm, write_fflags and write_fflags to have a
positive test for RVF .
r~