4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-24 15:27:04 +08:00
imcu 6cbb2c3ee5 [bsp][cvitek] add cache opration functions for cache coherence
By default, the small core enables D-Cache without ensuring cache
coherence. Therefore, when using shared memory, inconsistencies can
occur in the data read by the small core and the big core.

Solution: Migrate cache-related functions from the official
duo-buildroot-sdk library to implement cache-related operations in
rthw.h. This allows you to either disable D-Cache or call the
flush_dcache_range function before reading and after writing for
synchronization.

It is recommended to use the flush_dcache_range function, as disabling
D-Cache can have a significant performance impact.

Signed-off-by: zdtyuiop4444 <ign7798540@gmail.com>
2025-01-16 09:05:52 +08:00

71 lines
1.1 KiB
Plaintext
Executable File

mainmenu "RT-Thread Project Configuration"
BSP_DIR := .
RTT_DIR := ../../..
PKGS_DIR := packages
source "$(RTT_DIR)/Kconfig"
osource "$PKGS_DIR/Kconfig"
rsource "board/Kconfig"
config BSP_USING_C906_LITTLE
bool
select ARCH_RISCV64
select ARCH_RISCV_FPU_D
select RT_USING_CACHE
select RT_USING_COMPONENTS_INIT
select RT_USING_USER_MAIN
default y
config BSP_PLIC_PHY_ADDR
hex
default 0x70000000
config IRQ_MAX_NR
int
default 61
config BSP_TIMER_CLK_FREQ
int
default 25000000
config BSP_GPIO_IRQ_BASE
int
default 41
config BSP_SYS_GPIO_IRQ_BASE
int
default 47
config SOC_TYPE_CV180X
bool
default n
config SOC_TYPE_SG2000
bool
default n
config SOC_TYPE_SG2002
bool
default n
choice
prompt "Board Type"
default BOARD_TYPE_MILKV_DUO256M
config BOARD_TYPE_MILKV_DUO
select SOC_TYPE_CV180X
bool "milkv-duo"
config BOARD_TYPE_MILKV_DUO256M
select SOC_TYPE_SG2002
bool "milkv-duo256m"
config BOARD_TYPE_MILKV_DUOS
select SOC_TYPE_SG2000
bool "milkv-duos"
endchoice