summaryrefslogtreecommitdiff
path: root/libcpu
AgeCommit message (Collapse)Author
2025-10-28Remove vbus component and related codecopilot/remove-vbus-code-implementationcopilot-swe-agent[bot]
Co-authored-by: BernardXiong <[email protected]>
2025-10-23aarch64: document the CNTFRQ_EL0Yonggang Luo
Signed-off-by: Yonggang Luo <[email protected]>
2025-10-21[aarch64] Fix rt_aspace_init error when KERNEL_VADDR_START >= 0x80000000Siwei Xu
2025-10-13Remove unused rt_hw_set_gtimer_frqYonggang Luo
2025-10-11bsp/w60x: fixes cppcheck: (#10781)Yonggang Luo
[cpp_check.py 80 INFO] bsp/w60x/drivers/drv_rtc.c:58:11: error: Syntax Error: AST broken, binary operator '&=' doesn't have two operands. [internalAstError] [cpp_check.py 80 INFO] libcpu/arm/s3c24x0/rtc.c:34:12: error: Expression 'RTCCON|=RTCCON|=0x01' depends on order of evaluation of side effects [unknownEvaluationOrder]
2025-10-10Remove rarely used rt_time_tYonggang Luo
next_delay should be rt_tick_t Use time_t for RT_DEVICE_CTRL_RTC_GET_TIME
2025-10-10[CPU/AARCH64] 增加 libcpu/aarch64 KERNEL_ASPACE_START 配置 #10757zhangyan
针对不同的 Aarch64 BSP 针对 KERNEL_VADDR_START 宏定义进行区分
2025-09-28fix:Fixed compilation error for libcpu/cortex-m4. (#10756)R b b666
2025-09-03fix(risc-v, virt64, plic): use volatile rw for claim and completeHaojin Tang
2025-09-01fix(risc-v, mmu): fix type mismatch of `_query`Haojin Tang
2025-09-01fix(risc-v/virt64, cpp): add spaces to fix `Wliteral-suffix`Haojin Tang
2025-09-01fix(riscv, cpp): remove `rt_hw_cpu_id` in `cpuport.h` to fix errorHaojin Tang
2025-09-01fix: warnings generated by Kconfig.maosql
2025-08-20[libcpu][cortex-m33]Added HardFault_Handler to save floating point registersRbb666
2025-08-19[libcpu][cortex-m4]Added HardFault_Handler to save floating point registers.Rbb666
2025-08-19[libcpu ][cm3]The parameter passed to the unified rt_exception_hook is ↵R b b666
exception_stack. (#10619)
2025-07-23[lwp][rv64] restore tp register in arch_thread_signal_enter to fix user-mode ↵Yulong Wang
memory access
2025-07-16[ARCH/AARCH64] Update Hypercall APIGuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2025-07-08[aarch64]Fixup linker warning #10466GUI
2025-07-07Fixup the boot EL checkGuEe-GUI
The boot EL will save in x0, when current EL is EL3, kernel will jump to the EL2 after EL3. But the x0 value is **3**, The init for EL2 will not work. To fix it: the EL3 should jump to the EL2 init branch with not check, and when SoC boot in EL2, kernel will jump to the EL2 test branch. Link: https://club.rt-thread.org/ask/question/ec320a6765389f67.html Signed-off-by: wusongjie <[email protected]>
2025-07-04[CPU/AARCH64] Fixup MMUGuEe-GUI
1. Configure the kernel default vaddr by RAM and TEXT offset. 2. Check the p_addr 2M align when set the stride in `rt_hw_mmu_map`. Signed-off-by: GuEe-GUI <[email protected]>
2025-06-24libcpu/bsp: fix the M33 assembly syntax errors and fix the compilation error ↵kurisaw
of bsp
2025-05-30[bsp]增加超睿DP1000 bsp支持ZhangJing
2025-05-30移除无用文件,该文件未被任何BSP使用Yaochenger
2025-05-30[libcpu/common] ↵Yaochenger
修正对RV32E的支持,RV32E不支持s2寄存器,修改为s1寄存器
2025-05-28[libcpu][risc-v]:add comment for the round down of symb_pczhangjing
2025-05-28[libcpu][risc-v] fix:only map the 1GB space where the original code segment ↵zhangjing
is located
2025-04-28import rercitach
2025-04-28Fix Aarch64 architecture runtime issuesrcitach
该问题由5b3320624da5149fc21c2d3e1f321d855e3d0dfe引入,导致工具链编译时加上了 -std=gnu99,其他架构是否出问题暂时未知
2025-04-13libcpu: aarch64: Fix NORMAL_NOCACHE_MEM attr (#10180)mouch6131
Signed-off-by: Cliff Chen <[email protected]> Signed-off-by: mouch6131 <[email protected]> Co-authored-by: Cliff Chen <[email protected]>
2025-04-11libcpu: riscv: declare external symbols insideChen Wang
libcpu/risc-v/common64/mmu.c uses the external symbol "__bss_end" (this symbol generally is defined in the link script file) and depends on the extern declaration of this symbol in the bsp's "board.h". This is not a problem in implementation, but it is not a good habit. If this extern symbol is used locally, just declare it locally should be better. In this way, there will be no dependency of the kernel core on the bsp header file. And there will be no special requirements for the bsp board code, such as the need to make extern declarations for these "__bss_end" symbols in "board.h". This patch currently only explicitly externly declares "__bss_end" inside libcpu itself. The code of "#include <board.h>" is kept, because the modification involved is too large, it is necessary to clean up the bsp involved before cleaning this include code line uniformly. Signed-off-by: Chen Wang <[email protected]>
2025-04-11libcpu: cleanup undefined rt_hw_mmu_kernel_map_init (#10177)Chen Wang
* libcpu: cleanup undefined rt_hw_mmu_kernel_map_init rt_hw_mmu_kernel_map_init() is declared in header files but no definition found, cleanup the code. Signed-off-by: Chen Wang <[email protected]> * bsp: allwinner: d1: remove calling of rt_hw_mmu_kernel_map_init rt_hw_mmu_kernel_map_init is an undefined function, calling it is meaningless. Signed-off-by: Chen Wang <[email protected]> --------- Signed-off-by: Chen Wang <[email protected]>
2025-03-28[libcpu][aarch64]fix gicv3 mpidr table (#9284)zms123456
* fix gicv3 mpidr error * phytium should support rt_cpu_mpidr_table by using common_setup
2025-03-18[bsp][stm32][artpi]:fix artpi nano (#10122)CYFS
2025-03-17[fix]Fix cm33 compilation problem when block is turned onRbb666
2025-03-17[libcpu][risc-v]add code for handling exception scenarios in _unmap_area.ligr
2025-03-17[libcpu][risc-v]remove unused parameter 'size' for func _unmap_area.ligr
Signed-off-by: ligr <[email protected]>
2025-03-17解决rt_interrupt_from_thread和rt_interrupt_to_thread指针赋值错误latercomer
Signed-off-by: latercomer <[email protected]>
2025-03-17修复rt_hw_context_switch_to和rt_hw_context_switch的形参latercomer
Signed-off-by: latercomer <[email protected]>
2025-03-17解决rt_hw_context_switch_interrupt形参定义不一致latercomer
Signed-off-by: latercomer <[email protected]>
2025-03-17删除libcpu/sim/simulator中msvc编译器多余代码,为后续支持ming ↵latercomer
w64做准备 Signed-off-by: latercomer <[email protected]>
2025-03-12[libcpu][risc-v]add comments for rt_hw_mem_setup_early. (#10102)Guorui Li
2025-03-03[libcpu][riscv] add a doc for wch saving the irq stack as stack-512 (#10063)Kai
2025-03-02[libcpu][risc-v]add comments for rv64 sv39 mmu APIs. (#10053)Guorui Li
2025-02-28[bugfix][risc-v]fix the PPN length error in GET_PPN(pte). (#10020)Guorui Li
2025-02-25feat: mm: added affinity pages allocatorShell
This patch introduces a tagged pages allocator to address the existing problems of page aliasing on specific platforms and the requirement of page coloring. It implements an affinity-id aware page manager by separating the runtime page list into two types: a normal single linked-list and a multi-dimensional affinity-list. Changes: - Introduced tagged pages allocator and managing algorithm for affinity pages list - Modified components to support affinity-id list management - Updated page allocation and freeing functions to handle tagged pages - Added configuration options for page affinity block size and debugging - Modified mmap and elf loading to respect affinity settings - Enhanced page list management to support multi-dimensional affinity-list Signed-off-by: Shell <[email protected]>
2025-02-22libcpu: riscv: fixed ARCH_RISCV_VECTOR issuekenneth.liu
description: Using the vector instruction set to trigger an illegal instruction exception when ARCH_SISCV_VECTOR=y. analysis: When initializing the thread stack, the rt_cw_stack_init function did not enable VS for SSTATUS. Solution: When ARCH_SISCV_VECTOR=y, increment the initial value of sstatus by 0x600(SSTATUS_VS). Signed-off-by: Liu Gui <[email protected]>
2025-02-11[AARCH64] Update kernel's boot link for ARM64GuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2025-01-29libcpu: riscv: rv64: fixed warningsChen Wang
When building bsp/cvitek/c906_little, compiler reports: ``` .../rt-thread/libcpu/risc-v/rv64/trap.c: In function 'handle_trap': .../rt-thread/libcpu/risc-v/rv64/trap.c:106:13: warning: implicit declaration of function 'rt_hw_tick_isr'; did you mean 'rt_hw_stack_init'? [-Wimplicit-function-declaration] 106 | rt_hw_tick_isr(); | ^~~~~~~~~~~~~~ | rt_hw_stack_init .../rt-thread/libcpu/risc-v/rv64/trap.c:110:13: warning: implicit declaration of function 'rt_hw_irq_isr'; did you mean 'rt_hw_soft_irq_isr'? [-Wimplicit-function-declaration] 110 | rt_hw_irq_isr(); | ^~~~~~~~~~~~~ | rt_hw_soft_irq_isr ``` rt_hw_tick_isr()/rt_hw_irq_isr() are implemented by bsp, but libcpu/risc-v/rv64 doesn't declare them, so compiler warns. There are three BSPs using 'rv64' (libcpu/risc-v/rv64): - `bsp/cvitek/c906_little/rtconfig.py` - `bsp/juicevm/rtconfig.py` - `bsp/k210/rtconfig.py` `handle_trap` in `libcpu/risc-v/rv64` is defined as weak. BSP can use this function directly or define and overload it by itself. If bsp use this function directly, bsp need to pay attention to the fact that three functions will be called in this function: - `rt_hw_soft_irq_isr` - `rt_hw_tick_isr` - `rt_hw_irq_isr` In `libcpu/risc-v/rv64`, `rt_hw_soft_irq_isr` has a weak definition, while the other two do not. This means that if the bsp does not overload `handle_trap`, bsp must define `rt_hw_tick_isr` and `rt_hw_irq_isr` itself. This is also the practice of `bsp/cvitek/c906_little`. There is also a similar bsp `bsp/k210`, and the form of `bsp/juicevm` implements `handle_trap` by itself. It seems that `rt_hw_tick_isr` and `rt_hw_irq_isr` are not required to be implemented by all BSPs using `libcpu/risc-v/rv64`. The premise for BSP to implement them is that it does not overload `handle_trap`. So declaring `rt_hw_tick_isr` and `rt_hw_irq_isr` with extern in `libcpu/risc-v/rv64` is not proper. In addition, the `rt_hw_tick_isr/rt_hw_irq_isr` are only used by `libcpu/risc-v/rv64`, so it is not worth putting the declaration in `./include/rthw.h`. Sum up, the best solution is to add weak definition to `rt_hw_tick_isr/rt_hw_irq_isr` as existing `rt_hw_soft_irq_isr`. Signed-off-by: Chen Wang <[email protected]>
2025-01-29libcpu: riscv: common: fixed build warningsChen Wang
When building bsp/cvitek/c906_little, compiler warns: ``` .../rt-thread/libcpu/risc-v/common/trap_common.c: In function 'rt_hw_interrupt_install': .../rt-thread/libcpu/risc-v/common/trap_common.c:50:11: warning: unused variable 'user_param' [-Wunused-variable] 50 | void *user_param = param; | ^~~~~~~~~~ .../rt-thread/libcpu/risc-v/common/trap_common.c: In function 'rt_rv32_system_irq_handler': .../rt-thread/libcpu/risc-v/common/trap_common.c:77:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 77 | s_stack_frame = (rt_hw_stack_frame_t *)mscratch; | ^ ``` Fixed these warnings as per indication from gcc. Signed-off-by: Chen Wang <[email protected]>