mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-05 20:34:34 +08:00
65ffe4e13e
The changes unify the tick.c implementations for all risc-v64 architectures, leveraging the CPUTIME feature. This refactoring was necessary to streamline the codebase, and ensure consistent timer handling across different platforms. Changes: - Updated `Kconfig` in `bsp/cvitek/cv18xx_risc-v` to fix formatting issues. - Updated .config for BSPs to update `CPUTIME_TIMER_FREQ` - Updated header of for API `riscv_cputime_init` - Initialized riscv timer on `rt_hw_tick_init` - Refactored `tick.c` and `tick.h` in `libcpu/risc-v/t-head/c906` and `libcpu/risc-v/virt64`: - Replaced direct use of `rdtime` with `clock_cpu_gettime`. - Removed redundant timer frequency definitions. - Added static assertions to check the value of `CPUTIME_TIMER_FREQ`. - Initialized `tick_cycles` based on `CPUTIME_TIMER_FREQ`. - Integrated `ktime` support for tick initialization. Signed-off-by: Shell <smokewood@qq.com> Reviewed-on: https://github.com/RT-Thread/rt-thread/pull/9164 Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
62 lines
1.2 KiB
Plaintext
62 lines
1.2 KiB
Plaintext
mainmenu "RT-Thread Project Configuration"
|
|
|
|
BSP_DIR := .
|
|
|
|
RTT_DIR := ../../
|
|
|
|
PKGS_DIR := packages
|
|
|
|
source "$(RTT_DIR)/Kconfig"
|
|
osource "$PKGS_DIR/Kconfig"
|
|
rsource "driver/Kconfig"
|
|
|
|
config BOARD_QEMU_VIRT_RV64
|
|
bool
|
|
select ARCH_RISCV64
|
|
select ARCH_CONTEXT_EXTEND
|
|
select ARCH_USING_RISCV_COMMON64
|
|
select RT_USING_COMPONENTS_INIT
|
|
select RT_USING_USER_MAIN
|
|
select RT_USING_CACHE
|
|
select ARCH_MM_MMU
|
|
select ARCH_REMAP_KERNEL
|
|
select RT_USING_HW_ATOMIC
|
|
default y
|
|
|
|
config ENABLE_FPU
|
|
bool "Enable FPU"
|
|
default y
|
|
|
|
config ENABLE_VECTOR
|
|
bool "Using RISC-V Vector Extension"
|
|
default n
|
|
|
|
if ENABLE_VECTOR
|
|
choice
|
|
prompt "Vector Registers Length in Bits"
|
|
default ARCH_VECTOR_VLEN_128
|
|
|
|
config ARCH_VECTOR_VLEN_128
|
|
bool "128"
|
|
|
|
config ARCH_VECTOR_VLEN_256
|
|
bool "256"
|
|
endchoice
|
|
endif
|
|
|
|
config RT_USING_USERSPACE_32BIT_LIMIT
|
|
bool "Enable userspace 32bit limit"
|
|
default n
|
|
|
|
config RT_USING_VIRTIO_MMIO_ALIGN
|
|
bool "Open packed attribution, this may caused an error on virtio"
|
|
default n
|
|
|
|
config ARCH_USING_NEW_CTX_SWITCH
|
|
bool
|
|
default y
|
|
|
|
config __STACKSIZE__
|
|
int "stack size for interrupt"
|
|
default 4096
|