riscv: init FPU in s-mode

Fixes omission of initializing the FPU during shared boot
in s-mode.
This commit is contained in:
Gedare Bloom
2026-03-19 08:58:58 -06:00
committed by Kinsey Moore
parent 485efbd418
commit eeee01453d

View File

@@ -134,9 +134,14 @@ RISCV_Start_on_processor:
#endif
/* Init FPU */
#if defined( __riscv_flen ) && !defined( RISCV_USE_S_MODE )
#if defined( __riscv_flen )
#if defined( RISCV_USE_S_MODE )
li t0, SSTATUS_FS
csrs sstatus, t0
#else
li t0, MSTATUS_FS
csrs mstatus, t0
#endif
csrw fcsr, zero
#endif