nuttx/arch/risc-v/include
Yanfeng Liu 75d0c2946d risc-v: Initial support for CanMV-k230 board and K230 chip
The code is mainly derived from the NuttX qemu-rv/rv-virt codebase.

Major changes:

- boards/Kconfig:       add new BOARD_K230_CANMV
- arch/risc-v/Kconfig:  add new CHIP_K230 chip and ARCH_RV_MMIO_BITS
- arch/risc-v/src/common/riscv_mtimer.c: use ARCH_RV_MMIO_BITS to
                        select MMIO access width

New additions:

- arch/risc-v/include/k230/: k230 SoC definitions
- arch/risc-v/src/k230/:     k230 SoC sources
- boards/risc-v/k230/canmv230/:  CanMV-K230 board sources and configs
- Documentation/platforms/risc-v/k230/: simple doc

Note that only FLAT build works for canmv230 now.

This PR has changes in RiscV common layer thus may affect other RiscV ports
It changes the mtime/mtimecmp access control from using config ARCH_RV64 to
newly intorduced config ARCH_RV_MMIO_BITS.

Original design uses ARCH_RV64 to select 64bit MMIO in riscv_mtimer.c, this
can't cope with the situation with K230 --- it has ARCH_RV64 but only can do
32bit MMIO. So a new ARCH_RV_MMIO_BITS config has been introduced. Its value
depicts the MMIO width in bits. The MMIO_BITS defaults to 32/64 for RV32/
RV64 respectively. This allows the macro to replace current use of ARCH_RV64
in riscv_mtimer.c.

The new MMIO_BITS config is a derived one, and for RiscV chips with
equal CPU and MMIO widths there is no need to explicitly set it as the
default rule will do that. Only chips with different CPU and MMIO widths
need set it in Kconfig.

So by design this change should be safe but RiscV ports should be checked.

"ostest" verification has been done for:

- canmv230/nsh
- rv-vivt/nsh
- rv-virt/nsh64

configuration generation and manual check of derived RV_MMIO_BITS has been
done for:

- star64/nsh
- arty_a7/nsh
- bl602evb/nsh

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2023-12-17 01:10:57 -08:00
..
bl602 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
bl808 arch/riscv: Add support for Bouffalo Lab BL808 SoC (T-Head C906) 2023-12-12 08:50:03 -08:00
c906 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
esp32c3 arch/risc-v/esp32c3: Add RTC interrupt support 2023-02-08 10:42:19 +08:00
esp32c6 Remove the tail spaces from all files except Documentation 2023-02-26 13:24:24 -08:00
espressif arch/risc-v/espressif: Add full GPIO support 2023-06-24 13:11:45 +08:00
fe310 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
hpm6750 add hpmicro chip: hpm6750 2023-02-09 14:17:49 +08:00
jh7110 arch/risc-v: Add support for StarFive JH7110 SoC 2023-08-03 22:55:55 -07:00
k210 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
k230 risc-v: Initial support for CanMV-k230 board and K230 chip 2023-12-17 01:10:57 -08:00
litex Update kconfig2html.c 2023-12-14 20:02:52 -08:00
mpfs risc-v/mpfs: add athena irq defines 2023-02-15 00:21:03 +08:00
qemu-rv arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
rv32m1 arch: Remove the inclusion of arch/irq.h from chip/irq.h 2022-07-04 13:03:47 +03:00
.gitignore
arch.h risc-v/addrenv: Improve the commenting on struct arch_addrenv_s 2023-11-02 21:52:23 +08:00
barriers.h riscv/barrier: Define more granular memory barriers 2023-06-14 16:14:57 -03:00
csr.h arch/riscv: Align the macro definition in csr.h 2022-04-02 14:08:37 +03:00
elf.h riscv/arch_elf.c: Handle PCREL_HI20/LO12_I/S relocations correctly 2023-12-12 17:32:36 -08:00
inttypes.h arch/risc-v: Replace __LP64__ with CONFIG_ARCH_RV64 2022-01-04 23:22:43 +08:00
irq.h arch:Mark key functions to prohibit instrumentation to prevent recursive calls 2023-12-11 02:06:51 -08:00
limits.h arch: Define WCHAR_[MIN|MAX] in arch/include/limits.h 2022-06-03 22:25:49 +03:00
mode.h riscv: Dump trap val in exception handler 2022-08-30 14:55:33 +08:00
setjmp.h arch/risc-v: Save/Load float register in setjmp 2022-03-09 10:15:54 +02:00
spinlock.h arch/risc-v: Replace __LP64__ with CONFIG_ARCH_RV64 2022-01-04 23:22:43 +08:00
stdarg.h
syscall.h arch/risc-v: change up_saveusercontext to assembly code 2023-04-27 17:34:30 +08:00
types.h arch/risc-v: Replace __LP64__ with CONFIG_ARCH_RV64 2022-01-04 23:22:43 +08:00