summaryrefslogtreecommitdiff
path: root/libcpu/aarch64
AgeCommit message (Collapse)Author
2026-08-16[bsp/raspberry-pi] update DM supportGuEe-GUI
- reorganize common Raspberry Pi drivers under the device framework - add the Raspberry Pi 5 BSP, configuration and documentation - add BCM2712 and DesignWare AXI DMA controller support - distinguish BCM2712 DMA32 and DMA40 channels by channel mask - restore DesignWare AXI DMA enable bits after controller reset - support a shared AXI maximum burst length across DMA channels Signed-off-by: GuEe-GUI <[email protected]>
2026-08-14[dm][dma] Update DMA (#11678)GUI
* [dm][dma] update DMA interface Extend DMA mapping to honor OFW dma-ranges even when no reserved memory pool is present, and add PCI host-bridge DMA-region translation for PCI devices. Prefer 32-bit-addressable allocations for translated devices, improve pool allocation fallbacks and synchronization, and establish a linear mapping for installed DMA pools when possible. Signed-off-by: GuEe-GUI <[email protected]> * [dm][dma] fixup PL330 work flow Fix PL330 channel allocation so device-tree cells select peripheral request lines rather than execution channels. Generate proper peripheral DMA microcode using DMAWFP, DMALDP, DMASTP, and DMAFLUSHP, encode burst lengths correctly, honor transfer direction and non-secure attributes, and allocate microcode from DMA-coherent memory. Signed-off-by: GuEe-GUI <[email protected]> * style: format code with clang-format * style: format complete changed files with clang-format * drivers: dma: fix diagnostic format types * style: format DMA changes for current master --------- Signed-off-by: GuEe-GUI <[email protected]>
2026-06-26Fix:Always use vmalle1is for kernel aspace; only use aside1is for user ↵run.mao
aspace with non-global PTE.
2026-06-23[libcpu][aarch64] support DVFS idleGuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2026-06-08[bsp][zynqmp-a53-dfzu2eg] enable full dmGuEe-GUI
This is a builtin fdt example BSP Signed-off-by: GuEe-GUI <[email protected]>
2026-01-31[components][clock_time] Refactor time subsystem around clock_time (#11111)Bernard Xiong
* [components][clock_time] Refactor time subsystem around clock_time Introduce the clock_time core with clock source/event separation, high-resolution scheduling, and boot-time helpers, plus clock_timer adapters for timer peripherals. Remove legacy ktime/cputime/hwtimer implementations and migrate arch and BSP time paths to the new subsystem while keeping POSIX time integration functional. Update drivers, Kconfig/SConscript wiring, documentation, and tests; add clock_time overview docs and align naming to clock_boottime/clock_hrtimer/clock_timer. * [components][clock_time] Use BSP-provided clock timer frequency on riscv64 * [risc-v] Use runtime clock timer frequency for tick and delays * [bsp] Add clock timer frequency hooks for riscv64 boards * [bsp] Update Renesas RA driver doc clock_timer link * [bsp] Sync zynqmp-r5-axu4ev rtconfig after config refresh * [bsp][rk3500] Update rk3500 clock configuration * [bsp][hpmicro] Add rt_hw_us_delay hook and update board delays * [bsp][stm32l496-st-nucleo] enable clock_time for hwtimer sample in ci * [bsp][hpmicro] Fix rtconfig include scope for hpm6750evk Move rtconfig.h include outside the ENET_MULTIPLE_PORT guard for hpm6750evk and hpm6750evk2 so configuration macros are available regardless of ENET settings. * [bsp][raspi3] select clock time for systimer * [bsp][hpm5300evk] Trim trailing blank line * [bsp][hpm5301evklite] Trim trailing blank line * [bsp][hpm5e00evk] Trim trailing blank line * [bsp][hpm6200evk] Trim trailing blank line * [bsp][hpm6300evk] Trim trailing blank line * [bsp][hpm6750evk] Trim trailing blank line * [bsp][hpm6750evk2] Trim trailing blank line * [bsp][hpm6750evkmini] Trim trailing blank line * [bsp][hpm6800evk] Trim trailing blank line * [bsp][hpm6e00evk] Trim trailing blank line * [bsp][nxp] switch lpc178x to gcc and remove mcx timer source * [bsp][stm32] fix the CONFIG_RT_USING_CLOCK_TIME issue. * [docs][clock_time] add clock time documentation * [docs][clock_time] Update clock time subsystem documentation - Update device driver index to use correct page reference - Clarify upper layer responsibilities in architecture overview - Update README to describe POSIX/libc, Soft RTC, and device driver usage - Refine architecture diagram with improved layout and color scheme - Remove obsolete clock_timer.md file * [kernel][utest] Trim trailing space * [clock_time] Fix hrtimer wrap handling * [clock_time] fix the static rt_inline issue * [clock_time] fix the rt_clock_hrtimer_control result issue
2026-01-13[libcpu][aarch64] Replace x8 with a callee-saved registerTang Qingmei
2025-12-19[libcpu][aarch64] Update for DMGuEe-GUI
1. PSCI port to system power. 2. Support builtin fdt. 3. Update system aspace size. 4. Support DMA memory probe. 5. Fixup not backtrace in Serror for device bus fault. Signed-off-by: GuEe-GUI <[email protected]>
2025-11-16Reorganize Group names in build system for clarity and IDE integration #10923Copilot
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-10[CPU/AARCH64] 增加 libcpu/aarch64 KERNEL_ASPACE_START 配置 #10757zhangyan
针对不同的 Aarch64 BSP 针对 KERNEL_VADDR_START 宏定义进行区分
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-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: 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-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-11[AARCH64] Update kernel's boot link for ARM64GuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2024-12-13feat: arm64: mmu: auto-sensing of best paging strideShell
Improves the memory mapping process by dynamically selecting the optimal paging stride (4K or 2M) based on virtual address alignment and mapping size. This eliminates the need for upfront stride determination, enhancing flexibility and maintainability in memory management. Changes: - Replaced fixed stride selection logic with a dynamic decision loop. - Removed `npages` calculation and replaced with `remaining_sz` to track unprocessed memory size. - Added assertions to ensure `size` is properly aligned to the smallest page size. - Adjusted loop to dynamically determine and apply the appropriate stride (4K or 2M) for each mapping iteration. - Updated virtual and physical address increments to use the dynamically selected stride. Signed-off-by: Shell <[email protected]>
2024-12-13[FIXUP] __rt_clz loss in aarch64GuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2024-11-24feat: Kconfig: moving the arm64 specified configs to sub-menuShell
Just for better readability. Signed-off-by: Shell <[email protected]>
2024-11-24feat: arm64 ASID supportShell
Support for ARM64 ASID to enhance virtual memory management efficiency by reducing the need for TLB flushes during address space switches. These changes improve performance especially for multi-process systems. Changes: - Added `ARCH_USING_ASID` configuration in `libcpu/aarch64/Kconfig`. - Defined ASID-related constants in `mmu.h`. - Updated `TLBI_ARG` macro to include ASID manipulation. - Implemented ASID allocation mechanism with spinlock synchronization. - Enhanced TLB invalidation to support ASID-specific operations. - Modified `rt_hw_aspace_switch` to use ASIDs when switching address spaces. - Adjusted debug logging and function documentation to reflect ASID usage. - Refactored AArch64 MMU and TLB handling for ASID integration. Signed-off-by: Shell <[email protected]>
2024-11-18[DM/FIXUP] remove some redundant INIT_EXPORTGuEe-GUI
Signed-off-by: GuEe-GUI <[email protected]>
2024-11-17[libcpu] fix No memory higher than 1 GB is mappedzhujiale
2024-11-17[libcpu] fix No memory higher than 1 GB is mappedzhujiale
2024-11-03:truck: renaming: move `smp` to `smp_call`Shell
2024-11-03feat: smp_call: added signaling call_reqShell
This patch introduces `rt_smp_call_request` API to handle queued requests across cores with user provided data buffer, which provides a way to request IPI through a non-blocking pattern. It also resolved several issues in the old implementation: - Multiple requests from different cores can not be queued in the work object of the target core. - Data racing on `rt_smp_work` of same core. If multiple requests came in turns, or if the call is used by the target cpu, while a new request is coming, the value will be overwrite. - Memory vulnerability. The rt_smp_event is allocated on stack, though the caller may not wait until the call is done. - API naming problem. Actually we don't provide a way to issue an IPI to ANY core in mask. What the API do is aligned to MANY pattern. - FUNC_IPI registering to PIC. Changes: - Declared and configured the new `RT_SMP_CALL_IPI` to support functional IPIs for task requests across cores. - Replaced the single `rt_smp_work` array with `call_req_cores` to manage per-core call requests safely. - Added `_call_req_take` and `_call_req_release` functions for atomic handling of request lifetimes, preventing data race conditions. - Replaced single event handling with a queue-based approach (`call_queue`) for efficient multi-request processing per core. - Introduced `rt_smp_call_ipi_handler` to process queued requests, reducing IPI contention by only sending new requests when needed. - Implemented `_smp_call_remote_request` to handle remote requests with specific flags, enabling more flexible core-to-core task signaling. - Refined `rt_smp_call_req_init` to initialize and track requests with atomic usage flags, mitigating potential memory vulnerabilities. Signed-off-by: Shell <[email protected]>
2024-11-03feat: Added rt_interrupt_context* family for nested interrupt handlingShell
These changes introduce the rt_interrupt_context family, providing a mechanism for managing nested interrupts. The context management ensures proper storage and retrieval of interrupt states, improving reliability in nested interrupt scenarios by enabling context tracking across different interrupt levels. This enhancement is essential for platforms where nested interrupt handling is crucial, such as in real- time or multi-threaded applications. Changes: - Defined rt_interrupt_context structure with context and node fields in `rtdef.h` to support nested interrupts. - Added rt_slist_pop function in `rtservice.h` for simplified node removal in singly linked lists. - Declared rt_interrupt_context_push, rt_interrupt_context_pop, and rt_interrupt_context_get functions in `rtthread.h` to manage the interrupt/exception stack. - Modified AArch64 CPU support in `cpuport.h` to include rt_hw_show_register for debugging registers. - Refactored `_rt_hw_trap_irq` in `trap.c` for context-aware IRQ handling, with stack push/pop logic to handle nested contexts. - Implemented interrupt context push, pop, and retrieval logic in `irq.c` to manage context at the CPU level. Signed-off-by: Shell <[email protected]>
2024-10-11feat: arm64: update thread self on sp-switchShell
This patch improves the atomicity of context switching by ensuring that the stack pointer (sp) and thread self updates occur simultaneously. This enhancement is crucial for maintaining thread safety and preventing potential inconsistencies during context switches. Changes: - Modified `cpuport.h` to use `ARM64_THREAD_REG` for thread self access. - Added an `update_tidr` macro in `context_gcc.S` to streamline thread ID updates. - Adjusted `rt_hw_context_switch_to` and `rt_hw_context_switch` to call `update_tidr`, ensuring atomic updates during context switches. - Cleaned up `scheduler_mp.c` by removing redundant thread self assignments. Signed-off-by: Shell <[email protected]>
2024-09-24smpzhujiale
2024-09-24SMPzhujiale
2024-09-24smp_ipizhujiale
2024-09-19feat: smart: user space context optimizationShell
This patch optimizes the user-space context handling in the ARM64 architecture, specifically improving how the context is saved and restored during system calls and interrupts. The changes make the code more efficient and easier to maintain, while ensuring proper preservation of user context during system transitions. Changes: - Introduced a parameter for context saving to improve flexibility. - Replaced hardcoded stack pointer operations with frame-relative references for better readability and code reuse. - Simplified context restoration, removing redundant operations like loading/storing floating-point registers. Signed-off-by: Shell <[email protected]>
2024-09-06[DM] Extended drivers MISC interfaceGuEe-GUI
1. RT_FIELD_PREP: prepare a bitfield element. 2. RT_FIELD_GET: extract a bitfield element. 3. rt_offsetof: member offset of a struct 4. rt_upper_32_bits: high 32 bits of value. 5. rt_lower_32_bits: lower 32 bits of value. 6. rt_upper_16_bits: high 16 bits of value. 7. rt_lower_16_bits: lower 16 bits of value. 8. rt_max_t: fix type of max(...). 9. rt_ilog2: integer logarithm base 2. Signed-off-by: GuEe-GUI <[email protected]>
2024-09-03[libcpu/aarch64]修改atomic实现zhangyan
2024-08-27[BSP][Phytium] add support for mainbranch cherryusb (xhci host + pusb2 ↵zhugengyu
device/host)
2024-08-27feat: arm64: generic implementation of vector irq (#9336)Shell
feat: overall implementation of vector irq This patch generalize the irq handling on up/mp system by adding the `rt_hw_irq_exit()` & `rt_hw_vector_irq_sched()` API. Changes: - Added `rt_hw_irq_exit()` and `rt_hw_vector_irq_sched()` APIs for unified IRQ management. - Refactored assembly code for both UP and MP systems to use the new IRQ handling flow. - Removed redundant code and optimized exception handling paths. Signed-off-by: Shell <[email protected]>
2024-07-25Merge pull request #9228 from messigogogo/masterBernard Xiong
[BSP/Phytium]适配最新驱动
2024-07-25Merge pull request #9236 from polarvid/shell/arm64-headerBernard Xiong
quality: include the essential only to avoid recursion
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-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-16[libcpu][setup]fix fdt_ptr error (#9138)zms123456
fix fdt_ptr error