[PATCH 1/1] target/riscv: enable floating point unit
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Wed Sep 18 08:49:26 PDT 2024
On 18.09.24 15:56, Andrew Jones wrote:
> Thanks Heinrich, I had also forgotten that distinction. So the last
> question is whether or not we want to reset mstatus.FS to 1 instead of 3,
> as is done in this patch.
>
> Thanks,
> drew
If the FD flag set to 3 (Dirty) indicates that "the corresponding state
has potentially been modified since the last context save". Upon context
switches the value of the floating point registers has to be saved.
The value 1 (Initial) implies that saving the registers on a context
change is not needed.
3 (Dirty) is the safest choice. This is why OpenSBI is also using it.
For reference:
3.1.6.6. Extension Context Status in mstatus Register
The RISC-V Instruction Set Manual: Volume II - Privileged Architecture
Version 2024-04-11
Best regards
Heinrich
More information about the linux-riscv
mailing list