mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
arch/risc-v: Enable FPU for K210
K210 support rv64gc ISA, now we enable F/D extension for it. Note: QEMU for K210 don't support FPU now. Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
1c8e12406e
commit
be95e76910
@@ -27,6 +27,8 @@ config ARCH_CHIP_K210
|
||||
select ARCH_RV_ISA_M
|
||||
select ARCH_RV_ISA_A
|
||||
select ARCH_RV_ISA_C
|
||||
select ARCH_HAVE_FPU
|
||||
select ARCH_HAVE_DPFPU
|
||||
select ARCH_HAVE_MPU
|
||||
select ARCH_HAVE_TESTSET
|
||||
select ARCH_HAVE_MULTICPU
|
||||
|
||||
@@ -54,6 +54,11 @@ ifeq ($(CONFIG_ARCH_HAVE_VFORK),y)
|
||||
CMN_CSRCS += riscv_vfork.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||
CMN_ASRCS += riscv_fpu.S
|
||||
CMN_CSRCS += riscv_fpucmp.c
|
||||
endif
|
||||
|
||||
# Specify our C code within this directory to be included
|
||||
CHIP_CSRCS = k210_allocateheap.c k210_clockconfig.c
|
||||
CHIP_CSRCS += k210_irq.c k210_irq_dispatch.c
|
||||
|
||||
@@ -67,6 +67,10 @@ void __k210_start(uint32_t mhartid)
|
||||
const uint32_t *src;
|
||||
uint32_t *dest;
|
||||
|
||||
/* Configure FPU */
|
||||
|
||||
riscv_fpuconfig();
|
||||
|
||||
if (0 < mhartid)
|
||||
{
|
||||
goto cpu1;
|
||||
|
||||
Reference in New Issue
Block a user