diff --git a/arch/risc-v/Kconfig b/arch/risc-v/Kconfig index 3778cf71148..3e4195f5dbc 100644 --- a/arch/risc-v/Kconfig +++ b/arch/risc-v/Kconfig @@ -55,7 +55,6 @@ config ARCH_CHIP_ESP32C3 select ARCH_RV32 select ARCH_RV_ISA_M select ARCH_RV_ISA_C - select RV32IM_HW_MULDIV select ARCH_VECNOTIRQ select ARCH_HAVE_RESET select LIBC_ARCH_ATOMIC @@ -207,9 +206,6 @@ source "arch/risc-v/src/common/Kconfig" if ARCH_RV32 source "arch/risc-v/src/rv32im/Kconfig" endif -if ARCH_RV64 -source "arch/risc-v/src/rv64gc/Kconfig" -endif if ARCH_CHIP_FE310 source "arch/risc-v/src/fe310/Kconfig" endif diff --git a/arch/risc-v/include/arch.h b/arch/risc-v/include/arch.h index 05a09a3bfab..b7e04d4ebf8 100644 --- a/arch/risc-v/include/arch.h +++ b/arch/risc-v/include/arch.h @@ -82,18 +82,6 @@ uint32_t up_gethartid(void); * Public Function Prototypes ****************************************************************************/ -#ifdef CONFIG_RV32IM_HW_MULDIV -uint32_t up_hard_mul(uint32_t a, uint32_t b); -uint32_t up_hard_mulh(uint32_t a, uint32_t b); -uint32_t up_hard_mulhsu(uint32_t a, uint32_t b); -uint32_t up_hard_mulhu(uint32_t a, uint32_t b); -uint32_t up_hard_div(uint32_t a, uint32_t b); -uint32_t up_hard_rem(uint32_t a, uint32_t b); -uint32_t up_hard_divu(uint32_t a, uint32_t b); -uint32_t up_hard_remu(uint32_t a, uint32_t b); -uint32_t time_hard_mul(uint32_t a, uint32_t b, uint32_t *t); -#endif - #ifdef __cplusplus #define EXTERN extern "C" extern "C" diff --git a/arch/risc-v/src/common/Toolchain.defs b/arch/risc-v/src/common/Toolchain.defs index 4946ef3e560..11f10b15efa 100644 --- a/arch/risc-v/src/common/Toolchain.defs +++ b/arch/risc-v/src/common/Toolchain.defs @@ -117,11 +117,6 @@ ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG) ARCHCPUFLAGS += -mabi=$(ARCHABITYPE) endif - ifeq ($(CONFIG_RV32IM_HW_MULDIV),y) - ARCHCPUFLAGS += -mdiv - else - ARCHCPUFLAGS += -mno-div - endif endif # Default toolchain diff --git a/arch/risc-v/src/rv32im/Kconfig b/arch/risc-v/src/rv32im/Kconfig index 0233852a417..950f878fa52 100644 --- a/arch/risc-v/src/rv32im/Kconfig +++ b/arch/risc-v/src/rv32im/Kconfig @@ -5,38 +5,6 @@ comment "RV32IM Configuration Options" -choice - prompt "Toolchain Selection" - default RV32IM_TOOLCHAIN_GNU_RVGW if TOOLCHAIN_WINDOWS - default RV32IM_TOOLCHAIN_GNU_RVGL if !TOOLCHAIN_WINDOWS - -config RV32IM_TOOLCHAIN_GNU_RVGL - bool "Generic GNU RVG toolchain under Linux (or other POSIX environment)" - select ARCH_TOOLCHAIN_GNU - ---help--- - This option should work for any modern GNU toolchain (GCC 5.2 or newer) - configured for riscv32-unknown-elf. - -config RV32IM_TOOLCHAIN_GNU_RVGW - bool "Generic GNU RVG toolchain under Windows" - depends on TOOLCHAIN_WINDOWS - select CYGWIN_WINTOOL if WINDOWS_CYGWIN - select ARCH_TOOLCHAIN_GNU - ---help--- - This option should work for any modern GNU toolchain (GCC 5.2 or newer) - configured for riscv32-unknown-elf. - -endchoice - -config RV32IM_HW_MULDIV - bool "Supports Hardware MUL and DIV" - default n - ---help--- - Specifies if the architecture supports hardware multiply and - hardware division instructions. Selecting this will cause the - generated code to natively use mul / div instructions for any - math operations. - config RV32IM_SYSTEM_CSRRS_SUPPORT bool "Supports RV core feature identification via CSRRS opcode" default n diff --git a/arch/risc-v/src/rv64gc/Kconfig b/arch/risc-v/src/rv64gc/Kconfig deleted file mode 100644 index 7781d2f0b9a..00000000000 --- a/arch/risc-v/src/rv64gc/Kconfig +++ /dev/null @@ -1,29 +0,0 @@ -# -# For a description of the syntax of this configuration file, -# see the file kconfig-language.txt in the NuttX tools repository. -# - -comment "RV64GC Configuration Options" - -choice - prompt "Toolchain Selection" - default RV64GC_TOOLCHAIN_GNU_RVGW if TOOLCHAIN_WINDOWS - default RV64GC_TOOLCHAIN_GNU_RVGL if !TOOLCHAIN_WINDOWS - -config RV64GC_TOOLCHAIN_GNU_RVGL - bool "Generic GNU RVG toolchain under Linux (or other POSIX environment)" - select ARCH_TOOLCHAIN_GNU - ---help--- - This option should work for any modern GNU toolchain (GCC 5.2 or newer) - configured for riscv64-unknown-elf. - -config RV64GC_TOOLCHAIN_GNU_RVGW - bool "Generic GNU RVG toolchain under Windows" - depends on TOOLCHAIN_WINDOWS - select CYGWIN_WINTOOL if WINDOWS_CYGWIN - select ARCH_TOOLCHAIN_GNU - ---help--- - This option should work for any modern GNU toolchain (GCC 5.2 or newer) - configured for riscv64-unknown-elf. - -endchoice diff --git a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig index 839186bbb32..16810fe3e51 100644 --- a/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/knsh/defconfig @@ -62,4 +62,5 @@ CONFIG_SYS_RESERVED=9 CONFIG_TASK_NAME_SIZE=20 CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y +CONFIG_TESTING_OSTEST_FPUSIZE=264 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig index 193335211f5..8cbacfd62e1 100644 --- a/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/nsh/defconfig @@ -56,4 +56,5 @@ CONFIG_SYSTEM_NSH=y CONFIG_TASK_NAME_SIZE=20 CONFIG_TESTING_GETPRIME=y CONFIG_TESTING_OSTEST=y +CONFIG_TESTING_OSTEST_FPUSIZE=264 CONFIG_UART0_SERIAL_CONSOLE=y diff --git a/boards/risc-v/qemu-rv32/rv32-virt/configs/nsh/defconfig b/boards/risc-v/qemu-rv32/rv32-virt/configs/nsh/defconfig index d4cc560908c..e5ab68bde52 100644 --- a/boards/risc-v/qemu-rv32/rv32-virt/configs/nsh/defconfig +++ b/boards/risc-v/qemu-rv32/rv32-virt/configs/nsh/defconfig @@ -56,7 +56,6 @@ CONFIG_PREALLOC_TIMERS=0 CONFIG_RAM_SIZE=33554432 CONFIG_RAM_START=0x80000000 CONFIG_RR_INTERVAL=200 -CONFIG_RV32IM_HW_MULDIV=y CONFIG_SCHED_WAITPID=y CONFIG_SERIAL_UART_ARCH_MMIO=y CONFIG_STACK_COLORATION=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig index be7ed1d9ab4..cafd83f45cf 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig @@ -56,7 +56,6 @@ CONFIG_RAM_SIZE=196608 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 -CONFIG_RV32IM_HW_MULDIV=y CONFIG_RV32M1_LPUART0=y CONFIG_SCHED_WAITPID=y CONFIG_STACK_COLORATION=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig index cde383673a0..4ca6eecc6ee 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig @@ -44,7 +44,6 @@ CONFIG_RAM_SIZE=196608 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 -CONFIG_RV32IM_HW_MULDIV=y CONFIG_RV32M1_ITCM=y CONFIG_RV32M1_LPUART0=y CONFIG_SCHED_WAITPID=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig index 92fc4fd4745..4466de14762 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig @@ -44,7 +44,6 @@ CONFIG_RAM_SIZE=196608 CONFIG_RAM_START=0x20000000 CONFIG_RAW_BINARY=y CONFIG_RR_INTERVAL=200 -CONFIG_RV32IM_HW_MULDIV=y CONFIG_RV32M1_LPUART0=y CONFIG_SCHED_WAITPID=y CONFIG_STACK_COLORATION=y