Commit Graph

35 Commits

Author SHA1 Message Date
Shell fe2b124345 feat: arm64 ASID support
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 <smokewood@qq.com>
2024-11-24 13:44:34 -05:00
zhujiale 96da7abd3e [libcpu] fix No memory higher than 1 GB is mapped 2024-11-17 21:13:07 -05:00
zms123456 ca35f6692c
[libcpu][aarch64]mmu log fixup (#9078)
mmu log fixup
2024-06-26 14:37:05 +08:00
zms123456 b785ef9ed7
[libcpu][aarch64]memory setup using memblock (#9092)
* memory setup using memblock

* map pages later
2024-06-26 14:36:49 +08:00
Shell 9ba6cec663
[libcpu/arm64] dealing with mem region out of kernel space (#8847)
* [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 <smokewood@qq.com>

* fixup: restrict vstart for using of RT_NULL

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-08 09:23:31 +08:00
Shell b14e0c08e1
[bsp/rpi4] fixup startup failure (#8754)
[bsp/rpi4] fixup startup issues

Signed-off-by: Shell <smokewood@qq.com>
2024-04-11 00:02:49 +08:00
Shell 864055bf18
[fixup] aarch64 UMP compiler error (#8677)
Signed-off-by: Shell <smokewood@qq.com>
2024-03-30 17:58:38 +08:00
Shell 83e95bdff4
sync smart & dfs (#8672)
Signed-off-by: xqyjlj <xqyjlj@126.com>
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
2024-03-28 23:42:56 +08:00
Yuqiang Wang c6bdee3c50
[ci] open ci check with function declaration warning (#8546) 2024-02-20 22:45:04 -05:00
zhao maosheng 49b17d01ac preventing erroneous optimization of rt_ioremap_early 2024-02-06 18:34:53 -05:00
Shell 3a7903b799 [kernel] Add hook for malloc services
Including the patch for memory allocation, testsuites and fixups of
static analysis.

Signed-off-by: Shell <smokewood@qq.com>
2024-01-02 19:42:46 +08:00
fangjianzhou b233e29bb6
[libcpu][aarch64] 使用设备树对内存进行初始化 (#8320) 2023-12-16 18:08:11 +08:00
Shell 07b23ecbb1
[libcpu] fix symbol of kernel entry point (#8159)
Signed-off-by: Shell <smokewood@qq.com>
2023-10-20 13:27:38 +08:00
geniusgogo ecd29fda60
Sync dfs lwp (#8123) 2023-10-17 13:07:59 +08:00
Shell d862816a51
[components/mm] add unmap page API (#7834)
Signed-off-by: Shell <smokewood@qq.com>
2023-08-16 15:38:59 +08:00
GUI d3417aa0d7
Prepare some api for DM (#7894)
Signed-off-by: GuEe-GUI <GuEe-GUI@github.com>
2023-08-02 12:48:24 +08:00
GUI 6f119d4ce9
AArch64: support public linker scripts (#7831)
Signed-off-by: GuEe-GUI <GuEe-GUI@github.com>
2023-07-25 21:31:44 +08:00
wangqinglin e0b2b8fecd
修复aarch64 smp启动失败问题 (#7760) 2023-07-01 22:46:43 +08:00
wangqinglin 76d8416e72
修复aarch64-qemu启动失败问题 (#7661) 2023-06-12 19:49:18 +08:00
wangqinglin 0cb2a5e735 删除mmu.c对board.h的引用 2023-06-11 07:09:24 +08:00
wangqinglin 216d72ef1c 修改:启动过程和__start解耦,对于RT_AMP_SLAVE 跳过cpu 非0核等待 2023-06-11 07:09:24 +08:00
Shell 470454d201
[components/mm] support for scalable memory management (#7277)
* [mm/page] multi-list page manager
[mm/page] page debugger
[libcpu/aarch64] hugepage support

* [quality] remove void-arith

* [format] remove kasan codes
2023-04-22 23:59:11 +08:00
Zxy 4ed9bc11f7
[errno code]fix that use RT_ENOSYS without - (#7084)
* [errno code]fix that use RT_ENOSYS without -

* Update bsp/airm2m/air32f103/libraries/rt_drivers/drv_hwtimer.c

---------

Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
2023-03-23 01:54:42 -04:00
Shell 0de21341f9
[fix] mm bugs (#7010)
* [fix] implementation fault on avl

* [fix] mm may free varea allocated statically

* [test] add test and benchmark for avl
2023-03-03 11:51:21 +08:00
wangxiaoyao 12f0df9279 [libcpu/aarch64] stop when no page is free 2023-02-25 20:05:59 +08:00
wangxiaoyao 1c2daeafdc [fix] typo 2023-02-21 08:48:49 +08:00
wangxiaoyao 484a0d602e [fixup] add cache maintenance ops;
fix bugs on cache maintenance when starting user app
2023-02-21 08:48:49 +08:00
Shell 2d09749086
[rt-smart] PV_OFFSET as a variable (#6904)
* [rt-smart/mem] remove pv_offset

* [rt-smart] list kernel space command

* [rt-smart] restore ioremap region

* [revert] restore kernel space isolation

* [rt-smart/pv_off] code format

* [rt-smart] add get_pvoff()

* [pvoffset] pvoff as constant for C codes

* [pvoff] pvoff as interfaces
2023-02-14 23:08:32 +08:00
Shell 7450ef6c4d
[rt-smart] kernel virtual memory management layer (#6809)
synchronize virtual memory system works.
adding kernel virtual memory management layer for page-based MMU enabled architecture
porting libcpu MMU codes
porting lwp memory related codes
2023-01-08 21:08:55 -05:00
bernard 1f092da9e0 fix compiling warning. 2022-12-26 14:24:26 +08:00
Shell e8504c7cf1
[smart/aarch64] code sync (#6750)
* [smart/aarch64] sync aarch64
2022-12-20 17:49:37 +08:00
thewon86 f5b0bfd3f4 uniform code writing-disable interrupt 2022-04-20 14:22:43 +08:00
GuEe-GUI 353f717037 [libcpu/aarch64] add smp support 2022-01-08 18:24:02 +08:00
Meco Man 6c907c3a47 [libcpu] auto formatted 2021-03-27 17:51:56 +08:00
bigmagic fb8c7829a8 add raspi4 bsp 2020-04-16 16:44:14 +08:00