From 34422d2d912178a6d8f979031320939c0f24fc6e Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Fri, 10 Feb 2023 15:57:22 +0100 Subject: [PATCH] cpu/NaxRiscv crt0.S now enable the FPU --- litex/soc/cores/cpu/naxriscv/crt0.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/litex/soc/cores/cpu/naxriscv/crt0.S b/litex/soc/cores/cpu/naxriscv/crt0.S index 0496c84be..8078020fd 100644 --- a/litex/soc/cores/cpu/naxriscv/crt0.S +++ b/litex/soc/cores/cpu/naxriscv/crt0.S @@ -2,6 +2,11 @@ .global isr .global _start +#define MSTATUS_FS_INITIAL (1 << 13) +#define MSTATUS_FS_CLEAN (2 << 13) +#define MSTATUS_FS_DIRTY (3 << 13) +#define MSTATUS_FS_MASK (3 << 13) + _start: j crt_init nop @@ -57,6 +62,10 @@ crt_init: la sp, _fstack la a0, trap_entry csrw mtvec, a0 + +enable_fpu: + li x1, MSTATUS_FS_INITIAL + csrs mstatus, x1 data_init: la a0, _fdata