From beee77f372a3dc4b2ef7cbf4d8ab70aba19dddb4 Mon Sep 17 00:00:00 2001 From: Shell Date: Thu, 11 Jul 2024 11:00:04 +0800 Subject: feat: support ARCH_REMAP_KERNEL on libcpu/c906 (#9123) feat: [libcpu/c906] support ARCH_REMAP_KERNEL This change was necessary to enable the remapping of the kernel image to a high virtual address region on the c906 platform. Changes: - Introduced new configuration options `ARCH_REMAP_KERNEL`, and `ARCH_USING_ASID` under the `ARCH_RISCV64` section. - Updated MMU initialization and switching functions to incorporate remapping handling. - Modified page table setup for proper memory attribute settings. - Added support for early memory setup, kernel remapping - Added conditional compilation for ASID support in the `rt_aspace` struct, since this is not enable currently for most architecture. Signed-off-by: Shell --- libcpu/Kconfig | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'libcpu/Kconfig') diff --git a/libcpu/Kconfig b/libcpu/Kconfig index f036ea25a7..2c07f463c5 100644 --- a/libcpu/Kconfig +++ b/libcpu/Kconfig @@ -262,13 +262,17 @@ config ARCH_RISCV64 select ARCH_CPU_64BIT bool -if ARCH_RISCV64 - config ARCH_REMAP_KERNEL - bool - depends on RT_USING_SMART - help - Remapping kernel image to high virtual address region -endif +config ARCH_REMAP_KERNEL + bool + depends on RT_USING_SMART + help + Remapping kernel image to high virtual address region + +config ARCH_USING_ASID + bool + depends on RT_USING_SMART + help + Using ASID support from architecture config ARCH_IA32 bool -- cgit v1.3.1