summaryrefslogtreecommitdiff
path: root/libcpu
AgeCommit message (Collapse)Author
2024-07-24quality: include the essential only to avoid recursionShell
The rtdef.h is a big header with multiple dependency inside, which makes it easier to introduce recursion dependency. Signed-off-by: Shell <[email protected]>
2024-07-22[BSP/Phytium]适配最新裸机驱动张衍
2024-07-18[libcpu/arm64] feat: Trimming General ContextShell
This patch focuses on the ARM64 general context handling code. The modifications are aimed at enhancing performance by simplifying context save/restore operations. Changes include: - Adjusted stack alignment in `arch_set_thread_context` function. - Updated `lwp_gcc.S` to reset frame pointer and link register. - Refined `rt_hw_backtrace_frame_unwind` to handle user space address checks. - Added `GET_THREAD_SELF` macro in `asm-generic.h`. - Simplified context saving/restoring in `context_gcc.h` and related files. - Optimized `rt_hw_context_switch_interrupt` and related assembly routines. Signed-off-by: Shell <[email protected]>
2024-07-18adapt to rv64ilp32 toolchainMuChenger
2024-07-17[libcpu] quality: call PV_OFFSET on entry for onceShell
This patch improves the efficiency and readability of the AArch64 common setup code by calculating the `PV_OFFSET` once at the start and reusing the value. This change reduces redundant calculations. Signed-off-by: Shell <[email protected]>
2024-07-17Merge branch 'master' into shell/rv64-tickShell
2024-07-16[libcpu][setup]fix fdt_ptr error (#9138)zms123456
fix fdt_ptr error
2024-07-15[lwp][vdso] Add VDSO functionality under the aarch64 architecture (#9176)rcitachi
Add VDSO functionality under the aarch64 architecture
2024-07-15Bugfix/fix weak handle trap in riscv common crash rv64 trap handling (#9189)Fan Yang
* [bsp][hpmicro] add weak handle_trap implementation - added weak handle_trap implementation Signed-off-by: Fan YANG <[email protected]> * [libcpu][risc-v][common] remove weak handle_trap function - removed weak handle_trap function from trap_common.c Signed-off-by: Fan YANG <[email protected]> --------- Signed-off-by: Fan YANG <[email protected]>
2024-07-15[libcpu/rv64] feat: unify tick.cShell
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 <[email protected]> Reviewed-on: https://github.com/RT-Thread/rt-thread/pull/9164 Reviewed-by: Chen Wang <[email protected]>
2024-07-11Correct ".cpu cortex-m4" to ".cpu cortex-m7"childerxxx
2024-07-11feat: support ARCH_REMAP_KERNEL on libcpu/c906 (#9123)Shell
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 <[email protected]>
2024-06-28[format] cleanup libcpu/aarch64 (#8950)Shell
* [dfs] fixup compiler warning Signed-off-by: Shell <[email protected]> * [format] libcpu/arm64: separate context switching codes Signed-off-by: Shell <[email protected]> * [format] libcpu/arm64: separate vector Signed-off-by: Shell <[email protected]> * [format] libcpu/arm64: separate context_gcc.S Signed-off-by: Shell <[email protected]> * [format] libcpu/arm64: moving headers to include directory Signed-off-by: Shell <[email protected]> * style: replace tab with space --------- Signed-off-by: Shell <[email protected]>
2024-06-26[libcpu][aarch64]mmu log fixup (#9078)zms123456
mmu log fixup
2024-06-26[libcpu][aarch64]memory setup using memblock (#9092)zms123456
* memory setup using memblock * map pages later
2024-06-26[libcpu/c906]与virt同步 (#9095)heyuanjie87
2024-06-24[rv]修正signal退出后用户态sp少8的问题 (#9080)heyuanjie87
2024-06-21[rv]信号处理进入用户态前恢复gp (#9072)heyuanjie87
* [rv/virt/stackframe.h]添加GP寄存器保存偏移量宏 * 【rv/c906/stackframe.h]定义GP寄存器存储偏移量 * [rv]信号处理切换到用户态前恢复gp
2024-06-18[libcpu] rv64: support for ARCH_REMAP_KERNEL (#9067)Shell
* [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 <[email protected]> * 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 <[email protected]>
2024-06-16[bsp/phytium]c++支持,gpio,qspi驱动修改 (#9059)zhangyan
* GPIO驱动与QSPI驱动适配 * C++支持 * update --------- Co-authored-by: 张衍 <[email protected]>
2024-06-13[kservice] Enhance support for backtrace service (#9037)Shell
[feat] Enhance support for backtrace service rt_backtrace_formatted_print() and rt_backtrace_to_buffer() to help debug routines. Also, following modification are included: - make rt_backtrace_frame patchable with weak attr - replace lwp backtrace with sync output Signed-off-by: Shell <[email protected]>
2024-06-11[libcpu] arm64: implement cpuid get by assembly (#9052)Shell
2024-06-07[mm] precise & readable mm fault type (#9047)Shell
* [smart] fixup: precise mm fault type Also, fixup arm64 read access fault * arm64: using meaningful macro on trap * fixup: renaming macro
2024-05-28[arm64] add hw thread self (#8942)Shell
* [libcpu] arm64: Add hardware thread_self support This patch introduces hardware-based thread self-identification for the AArch64 architecture. It optimizes thread management by using hardware registers to store and access the current thread's pointer, reducing overhead and improving overall performance. Changes include: - Added `ARCH_USING_HW_THREAD_SELF` configuration option. - Modified `rtdef.h`, `rtsched.h` to conditionally include `critical_switch_flag` based on the new config. - Updated context management in `context_gcc.S`, `cpuport.h` to support hardware-based thread self. - Enhanced `scheduler_mp.c` and `thread.c` to leverage the new hardware thread self feature. These modifications ensure better scheduling and thread handling, particularly in multi-core environments, by minimizing the software overhead associated with thread management. Signed-off-by: Shell <[email protected]> * fixup: address suggestion * fixup: rt_current_thread as global * scheduler: add cpu object for UP scheduler Also, maintain the rt_current_thread in cpu object on UP scheduler. --------- Signed-off-by: Shell <[email protected]>
2024-05-26[libcpu] discard rt_current_thread (#8976)Shell
* [libcpu] rv64: discard rt_current_thread * arm: using rt_thread_self to fetch current TCB
2024-05-16[libcpu/arm64] add C11 atomic ticket spinlock (#8882)Shell
* [libcpu/arm64] add C11 atomic ticket spinlock Replace the former implementation of flag-based spinlock which is unfair Besides, C11 atomic implementation is more readable (it's C anyway), and maintainable. Cause toolchain can use their builtin optimization and tune for different micro-architectures. For example armv8.5 introduces a better instruction. The compiler can help with that when it knows your target platform in support of it. Signed-off-by: Shell <[email protected]> * fixup: RT_CPUS_NR --------- Signed-off-by: Shell <[email protected]>
2024-05-10[smart] fixup arm64 aspace switch (#8925)Shell
* [smart] fixup arm64 aspace switch Signed-off-by: Shell <[email protected]> * fixup: arm add arch_kernel_mmu_table_get --------- Signed-off-by: Shell <[email protected]>
2024-05-08[libcpu][aarch64] Fixed the rt_hw_secondary_cpu_bsp_start() bug (#8898)liYangYang
* fix rt_hw_secondary_cpu_bsp_start() bug * timer init * comment
2024-05-08[ipc] support of lockless rt_completion (#8887)Shell
* [ipc] lockless rt_completion implementation The new rt_completion implemented by lockless algorithm can improve timer resolution for up to ~12%, compare to sem IPC. Signed-off-by: Shell <[email protected]> * fixup: error * remove useless changes --------- Signed-off-by: Shell <[email protected]>
2024-05-08[libcpu/arm64] dealing with mem region out of kernel space (#8847)Shell
* [ofw] dealing with mem region out of kernel space - Fix parameter checking in _out_of_range() that NULL is excluded for fixed mapping - Split page install with a deferred stage to avoid mapping over ARCH_EARLY_MAP_SIZE Signed-off-by: Shell <[email protected]> * fixup: restrict vstart for using of RT_NULL --------- Signed-off-by: Shell <[email protected]>
2024-04-30Fix compiling eror in hpmicro bsp (#8889)Fan Yang
- added 'DEVICE' to rtconfig.py - fixed compiling error cuased by change in interrupt_gcc.S Signed-off-by: Fan YANG <[email protected]>
2024-04-24[bsp]support cvitek sdhci drvier (#8849)flyingcys
support cvitek sdhci drvier
2024-04-18[cpu_cache] fix function replaced by macrowirano
2024-04-18[libcpu] remove .asm files in cortex-r52Meco Man
2024-04-18Delete unnecessary configurations in cortex-r52Rbb666
2024-04-16[libcpu][aarch64]fix memheap search in setup of aarch64zms123456
2024-04-10[bsp][renesas]Add cortex-r52 rzt2m adaptationRbb666
2024-04-11[bsp/phytium]中断相关修改 (#8742)zhangyan
* update smp 4
2024-04-11[bsp/rpi4] fixup startup failure (#8754)Shell
[bsp/rpi4] fixup startup issues Signed-off-by: Shell <[email protected]>
2024-04-02fix: code format of serial.c and compile error in aarch64 context_gcczhao maosheng
2024-04-01[components][drivers] fix posix tty, and add more baudrate (#8683)zms123456
* serial-tty fix * v2
2024-03-30[fixup] aarch64 UMP compiler error (#8677)Shell
Signed-off-by: Shell <[email protected]>
2024-03-29[bsp][art-pi-smart] 关闭内存对齐检查来避免数据访问异常liYangYang
2024-03-28sync smart & dfs (#8672)Shell
Signed-off-by: xqyjlj <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2024-03-28[libcpu/aarch64] improve performance of IRQ dis/en-able (#8687)Shell
Signed-off-by: Shell <[email protected]>
2024-03-21[libcpu/rv64] fixup for parameter passing on backtrace (#8655)Shell
Signed-off-by: Shell <[email protected]>
2024-03-19[bsp][cv1800b] fix a implicit-function-declaration warningLiuLingze
Signed-off-by: LiuLingze <[email protected]>
2024-03-19[bsp][cv1800b] fix a int-conversion warningLiuLingze
Signed-off-by: LiuLingze <[email protected]>
2024-03-13[bsp/phytium]Adapter aarch64/aarch32 (#8580)zhangyan
2024-03-02🎯 ↵zhangyan
[libcpu/arm/cortex-a]修改arm/cortex-a启动方式,解决cortex-a开启SMP工作异常问题 (#8517) Co-authored-by: wangzongqiang <[email protected]>