Commit Graph

26 Commits

Author SHA1 Message Date
rcitachi 14fb55933b
[lwp][vdso] Add VDSO functionality under the aarch64 architecture (#9176)
Add VDSO functionality under the aarch64 architecture
2024-07-15 17:58:29 +08:00
Shell f17f994f8c
[arm64] add hw thread self (#8942)
* [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 <smokewood@qq.com>

* 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 <smokewood@qq.com>
2024-05-28 14:27:55 +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 71560bafb5
🎯 Sync smart & scheduler codes (#8537)
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
2024-02-23 17:49:15 +08:00
fangjianzhou 66e3faa71f
[libcpu] 修复当开启 RT_USING_SMP ,并且 RT_CPUS_NR = 1 时编译报错问题 2024-02-20 18:25:37 -05:00
Meco Man 6d4503363a [libcpu][SConscript]规范group名为libcpu 2024-02-20 08:39:05 +08:00
fangjianzhou b233e29bb6
[libcpu][aarch64] 使用设备树对内存进行初始化 (#8320) 2023-12-16 18:08:11 +08:00
fangjianzhou 249871cbbc
[libcpu][aarch64] 使用设备树对CPU进行初始化 (#8221) 2023-11-28 14:20: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
aozima 3e91307326
fixed stack setup when using SMP. (#7978) 2023-08-26 07:36:25 +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 216d72ef1c 修改:启动过程和__start解耦,对于RT_AMP_SLAVE 跳过cpu 非0核等待 2023-06-11 07:09:24 +08:00
huanghe 50a4e8c662
[bsp][phytium]适配rt-thread5.0.0 版本 (#7441)
Co-authored-by: 朱耿宇 <zhugengyu@phytium.com.cn>
2023-05-11 10:25:21 +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
Shell e8504c7cf1
[smart/aarch64] code sync (#6750)
* [smart/aarch64] sync aarch64
2022-12-20 17:49:37 +08:00
GUI f587a55bc2
[libcpu/aarch64] add gicv3 support and bsp/rockchip/rk3568 (#5722)
* [libcpu/aarch64] add smp support

* [libcpu/aarch64] rt_hw_trap_irq get irq instead of iar when using gicv2

* [libcpu/aarch64] disable irq/fiq when switch thread

* [libcpu/aarch64] add gtimer frq set and stack align

* [libcpu/aarch64] add gicv3 support and bsp/rockchip/rk3568
2022-03-29 11:08:25 +08:00
GUI 0a8dd10b0b
[libcpu/aarch64] add gtimer frq set and stack align (#5642)
* [libcpu/aarch64] add smp support

* [libcpu/aarch64] rt_hw_trap_irq get irq instead of iar when using gicv2

* [libcpu/aarch64] disable irq/fiq when switch thread

* [libcpu/aarch64] add gtimer frq set and stack align
2022-03-07 22:41:56 +08:00
GuEe-GUI 353f717037 [libcpu/aarch64] add smp support 2022-01-08 18:24:02 +08:00
GuEe-GUI efbdbc2636 fixup .bss size define in link.lds and set spsel=1 in aarch64 2021-11-30 11:14:17 +08:00
GuEe-GUI 740cd9dfb0 Merge AArch64 libcpu and add some drivers for their bsps 2021-09-26 15:01:59 +08:00