mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-04-04 17:50:31 +00:00
riscv: init FPU in s-mode
Fixes omission of initializing the FPU during shared boot in s-mode.
This commit is contained in:
committed by
Kinsey Moore
parent
485efbd418
commit
eeee01453d
@@ -134,9 +134,14 @@ RISCV_Start_on_processor:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Init FPU */
|
/* 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
|
li t0, MSTATUS_FS
|
||||||
csrs mstatus, t0
|
csrs mstatus, t0
|
||||||
|
#endif
|
||||||
csrw fcsr, zero
|
csrw fcsr, zero
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user