summaryrefslogtreecommitdiff
path: root/components/mm
AgeCommit message (Collapse)Author
7 days[ARCH/RISC-V] Next RISC-V (#10320)GUI
* [libcpu][risc-v] Refactor the RISC-V architecture port Introduce an opt-in unified RISC-V common layer for RV32 and RV64 while keeping existing BSPs on the legacy implementation during migration. - use ARCH_RISCV and ARCH_CPU_64BIT for architecture and XLEN selection - unify context, trap, MMU, cache, timer, SBI, SMP and ISA handling - add PLIC, CLIC, ACLINT, APLIC and IMSIC support - map physical hart IDs to contiguous logical CPU IDs - add T-Head vendor overrides while preserving legacy ports - migrate qemu-virt64-riscv with RV32 and RV64 support - update clock_time, MM, LWP, OFW, PCI and Rust integration Existing BSPs continue using legacy_common or common64 unless they select RT_USING_RISCV_NEW_COMMON. Signed-off-by: GuEe-GUI <[email protected]> * [libcpu][risc-v] skip disabled CPU nodes in early FDT walk Rbb666 noted that rt_hw_fdt_install_early() walked every /cpus child without checking status, so disabled cores still joined hart registration and MMU capability probing. Skip nodes that are not okay/ok via rt_fdt_device_is_available() before reading reg or mmu-type. Signed-off-by: seteiro <[email protected]> * [libcpu][risc-v] Fix per-CPU page table mapping - reuse existing non-leaf page table entries when mapping per-CPU areas - reject leaf entry conflicts instead of overwriting mappings Signed-off-by: GuEe-GUI <[email protected]> --------- Signed-off-by: GuEe-GUI <[email protected]> Signed-off-by: seteiro <[email protected]> Co-authored-by: seteiro <[email protected]>
2026-08-12fix(mm): exclude no-MMU ioremap from MMU buildsRbb666
2026-08-12feat(dm): support OFW on Cortex-M targetsRbb666
Add the ARM NVIC PIC driver, no-MMU I/O mapping, built-in FDT support, and Cortex-M CPU hooks required by the native RT-Thread device model.
2026-06-12utest: move mm testcases to components/mmCYFS
Signed-off-by: CYFS <[email protected]>
2025-12-03[MM] Update MM System (#10989)GUI
* [MM] Fixup MM 1. Fixup some LOG_D args. 2. Stop installing page when `rt_aspace_map_phy` fail. * [MM] Support page MPR dynamic size For RISC-V or dynamic address space arch in the future. Signed-off-by: GuEe-GUI <[email protected]>
2025-11-16Reorganize Group names in build system for clarity and IDE integration #10923Copilot
2025-10-15utest: UTEST_MM_API_TC -> RT_UTEST_MM_APIChen Wang
Signed-off-by: Chen Wang <[email protected]>
2025-03-10[mm]修复unmap内存时遗漏刷新地址转换表的问题,避免dcache( ↵heyuanjie87
PIPT)出错
2025-02-25feat: improve Kconfig structure on MMShell
Signed-off-by: Shell <[email protected]>
2025-02-25feat: mm: page poison debugging and assertion enhancementsShell
This commit introduces a page poison debugging mechanism and additional assertions for memory management, improving system maintainability and debugging capabilities. The changes aim to detect illegal memory usage early and provide better clarity in managing page allocations. Changes: - Added `RT_DEBUGGING_PAGE_POISON` option to enable memory usage tracing. - Introduced a page poisoner for detecting illegal memory usage. - Implemented region-based memory tracking using bitmaps. - Enhanced spinlock protection for memory management operations. - Fixed several assertion checks for memory safety. - Renamed macros for consistency (`FLOOR` to `CEIL`). - Refined memory allocation and deallocation logic to include poisoning. - Updated Kconfig to add configurable `RT_PAGE_MAX_ORDER` and poison debugging. - Improved debugging outputs for page regions and memory operations. Signed-off-by: Shell <[email protected]>
2025-02-25feat: mm: install page in a discrete methodShell
This patch refactors the `rt_page_install` function by delegating specific operations to new helper functions. Besides, the contiguous page regions are now separated to segments of fixed size. The goal is to improve the overall code readability, enhance modularity, and ensure better handling of page installation logic through clearer separation of concerns. Changes: - Introduced `_get_mpr_ready_n_install` to encapsulate memory preparation and page installation logic. - Added `_update_region_list` for updating the installed page registry. - Defined `_PAGE_STRIPE` for optimized region processing. - Modified `rt_page_install` to handle regions in smaller chunks using helper functions for better maintainability. - Improved locking mechanisms with `rt_spin_lock` for thread safety. - Reduced code duplication and clarified shadow region calculations. Signed-off-by: Shell <[email protected]>
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]>
2024-12-09[componets] fix when printf 0 addr by %p will return nilzhujiale
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-26[libcpu][aarch64]memory setup using memblock (#9092)zms123456
* memory setup using memblock * map pages later
2024-06-22[smart] add mprotect config (#9082)Shell
Signed-off-by: Shell <[email protected]>
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-06-05component:mm: improve sconscript (#9028)Chen Wang
There is no next-level directory under the components/mm/ directory. Do not need to enter the next-level directory to process the SConscript file. Signed-off-by: Chen Wang <[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-03-30[fixup] aarch64 UMP compiler error (#8677)Shell
Signed-off-by: Shell <[email protected]>
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-02[fixup] check NULL pointer before access (#8573)Shell
Signed-off-by: Shell <[email protected]>
2024-02-23🎯 Sync smart & scheduler codes (#8537)Shell
Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2023-12-16[libcpu][aarch64] 使用设备树对内存进行初始化 (#8320)fangjianzhou
2023-12-05update mm. (#8334)geniusgogo
2023-11-30[mm] Bugs fix for page_install on shadow region (#8308)Shell
Signed-off-by: Shell <[email protected]>
2023-11-02[smart] fixup of lwp recycling and mm varea (#8206)Shell
Signed-off-by: shell <[email protected]> Signed-off-by: Shell <[email protected]> Co-authored-by: xqyjlj <[email protected]>
2023-10-25🎈 perf: perf rt_hw_interrupt_disable/enable (#8042)xqyjlj
Signed-off-by: Shell <[email protected]> Co-authored-by: Shell <[email protected]>
2023-10-25[quality] fixup: vulnerability in kernelShell
including out-of-bound access in dfs, and use-after-free in aspace_traversal Signed-off-by: Shell <[email protected]>
2023-10-25[smart] replace varea pgmgr and fixup of dfs mmap (#8184)Shell
Signed-off-by: shell <[email protected]> Signed-off-by: Shell <[email protected]>
2023-10-17Sync dfs lwp (#8123)geniusgogo
2023-10-14[components][mm]添加预留内存支持 (#8025)zms123456
2023-09-06[rtdef] rename RT_CTASSERT to RT_STATIC_ASSERTMeco Man
2023-08-21fix list_page (#7968)xiao-mang
2023-08-16[components/mm] add unmap page API (#7834)Shell
Signed-off-by: Shell <[email protected]>
2023-08-02Prepare some api for DM (#7894)GUI
Signed-off-by: GuEe-GUI <[email protected]>
2023-07-22[debug] 整理debug宏并增加RT_DEBUGING_CONTEXT (#7805)Man, Jianting (Meco)
2023-07-05[components/mm] improve output of list_page (#7779)Shell
2023-05-23add lstat&sysinfo....syscall. (#7555)geniusgogo
2023-04-26[libcpu/aarch64] fix cache invalidate operation (#7363)Shell
2023-04-22[components/mm] support for scalable memory management (#7277)Shell
* [mm/page] multi-list page manager [mm/page] page debugger [libcpu/aarch64] hugepage support * [quality] remove void-arith * [format] remove kasan codes
2023-04-22fix warning (#7340)xiaoniaoyou6hua
2023-03-31[fix] compilation error from rpi (#7143)v5.0.0v5.0.xShell
* [fix] compile error from rpi
2023-03-30[rt-smart] testcase & improvements for memory management (#7099)Shell
* [utest/mm] add testcase for create/init format codes of create/init in components/mm * [libcpu/aarch64] fix user stack check routine * [kservice] export API for utest * [utest/mm] testcase for aspace_map format & modify the files under components/mm related with aspace_map * [lwp/user_mm] add user_map_varea for mmap feature * [mm] rename rt_mm_fault_try_fix to rt_aspace_fault_try_fix * [utest/mm] testcase for synchronization * [mm] modify unmap api to improve throughput * [utest/mm] testcases for cache and varea map * [format] remove extra space * [utest/mm] fix testcase problem in header * [lwp] extend map_user_varea with a flag * [utest/mm] testcase for lwp_map_user_varea * [libcpu/arm/cortex-a] fix kernel space layout * [utest/mm] adjust for armv7 arch
2023-03-19[rt-smart] fix competition on aspace (#7064)Shell
* [mm] mmu operations should be wrapped by _aspace_bst_insert & _aspace_bst_remove to avoid competition on page table * [lwp] may not return null on failed
2023-03-17[rt-smart] move sys_cacheflush to lwp_syscall.c (#7048)Shell
* [syscall] move sys_cacheflush to lwp_syscall.c * [syscall] improve assertion * [format] rename to rt_ctassert * [debug] modified ct assertion on mm_page.c
2023-03-16[components][mm] add ioremap for normal memory api (#7050)张世争
2023-03-16[libcpu/risc-v] support noncached normal memory (#7051)Shell
* [libcpu/risc-v] support noncached normal memory * [mm] check before dereference in _fetch_page * [mm] add comments on ioremap * [ioremap] report more info on failed
2023-03-03[fix] mm bugs (#7010)Shell
* [fix] implementation fault on avl * [fix] mm may free varea allocated statically * [test] add test and benchmark for avl
2023-02-21[fixup] add cache maintenance ops;wangxiaoyao
fix bugs on cache maintenance when starting user app