rt-thread-official/libcpu/risc-v/t-head/c906
Shell 65c9947225
[libcpu] rv64: support for ARCH_REMAP_KERNEL (#9067)
* [libcpu] support for ARCH_REMAP_KERNEL

These changes introduce support for the ARCH_REMAP_KERNEL configuration,
which isolates kernel space in high virtual address regions. This feature
is necessary to enhance memory protection and management by segregating
user and kernel spaces more effectively.

Changes:
- Updated conditional macros to check for ARCH_REMAP_KERNEL instead of
  ARCH_KERNEL_IN_HIGH_VA in board initialization files to reflect the new
  configuration option.
- Modified qemu-virt64-riscv Kconfig and SConstruct files to include and
  utilize ARCH_REMAP_KERNEL.
- Created a new linker script `link_smart.lds` for smart linking in qemu-virt64-riscv.
- Updated rtconfig.py to use a more flexible execution path setup.
- Enhanced user address space definitions in `lwp_arch.h` to support the
  new virtual address mappings.
- Adjusted kernel memory initialization and mapping logic in `c906/mmu.c`
  and `virt64/mmu.c` to account for high virtual address regions.
- Added Kconfig option to enable ARCH_REMAP_KERNEL for RISCV64 architectures.
- Enhanced memory setup functions to support new mapping scheme, including
  updates to early page table setup and address relocation logic.

These modifications ensure that the system can utilize high memory
addresses for the kernel, improving memory isolation and system stability.

Signed-off-by: Shell <smokewood@qq.com>

* fixup: CI run failed

* bsp: default config without using smart

* fixup: static checks

* restore rt_hw_mmu_kernel_map_init for D1

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-06-18 11:15:59 +08:00
..
asm sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
SConscript [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
asm-generic.h [libcpu][component][debug] add debug info for gdb (#7033) 2023-05-14 23:48:16 +08:00
backtrace.c [kernel] 将rt_thread结构体改为显式继承rt_object (#7131) 2023-04-04 09:06:27 -04:00
cache.c [rt-smart] move sys_cacheflush to lwp_syscall.c (#7048) 2023-03-17 15:11:38 +08:00
cache.h [rt-smart] move sys_cacheflush to lwp_syscall.c (#7048) 2023-03-17 15:11:38 +08:00
context_gcc.S [libcpu] discard rt_current_thread (#8976) 2024-05-26 22:00:17 +08:00
cpuport.c rt_hw_cpu_shutdown: implement default weak function 2023-08-08 22:34:25 -04:00
cpuport.h [ci] open ci check with function declaration warning (#8546) 2024-02-20 22:45:04 -05:00
encoding.h [rt-smart] kernel virtual memory management layer (#6809) 2023-01-08 21:08:55 -05:00
interrupt.c sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
interrupt_gcc.S [rt-smart] porting c906 and D1s to mm (#6848) 2023-01-16 08:24:03 +08:00
io.h [libcpu/risc-v/c906] add ioremap && default param (#7345) 2023-04-24 09:21:15 +08:00
mmu.c [libcpu] rv64: support for ARCH_REMAP_KERNEL (#9067) 2024-06-18 11:15:59 +08:00
mmu.h [ci] open ci check with function declaration warning (#8546) 2024-02-20 22:45:04 -05:00
opcode.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
plic.c [bsp]add cv1800b (#7753) 2023-06-30 00:05:55 +08:00
plic.h [libcpu/risc-v/c906] add ioremap && default param (#7345) 2023-04-24 09:21:15 +08:00
riscv.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
riscv_io.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
riscv_mmu.c [ci] open ci check with function declaration warning (#8546) 2024-02-20 22:45:04 -05:00
riscv_mmu.h [libcpu] rv64: support for ARCH_REMAP_KERNEL (#9067) 2024-06-18 11:15:59 +08:00
rt_interrupt.h [libcpu/risc-v/c906] add ioremap && default param (#7345) 2023-04-24 09:21:15 +08:00
sbi.c [rt-smart] porting c906 and D1s to mm (#6848) 2023-01-16 08:24:03 +08:00
sbi.h [rt-smart] kernel virtual memory management layer (#6809) 2023-01-08 21:08:55 -05:00
stack.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
stackframe.h [rt-smart] handling kernel from accessing unmapped user stack (#6957) 2023-02-24 14:52:16 +08:00
startup_gcc.S [rt-smart] porting c906 and D1s to mm (#6848) 2023-01-16 08:24:03 +08:00
symbol_analysis.c sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
symbol_analysis.h sync branch rt-smart. (#6641) 2022-12-03 12:07:44 +08:00
syscall_c.c [smart/syscall] fix exit(2) and add exit_group(2) (#8005) 2023-09-09 09:35:56 +08:00
tick.c [bsp]support cvitek sdhci drvier (#8849) 2024-04-24 05:40:22 +08:00
tick.h [libcpu/risc-v/c906] add ioremap && default param (#7345) 2023-04-24 09:21:15 +08:00
tlb.h [rt-smart] porting c906 and D1s to mm (#6848) 2023-01-16 08:24:03 +08:00
trap.c [mm] precise & readable mm fault type (#9047) 2024-06-07 21:34:03 +08:00