Commit Graph

99 Commits

Author SHA1 Message Date
zms123456 59193dfeeb
[timer]add all soft timer config (#9048)
* add all soft timer

* update wq

* add timer test

* shield LOG_D
2024-06-20 04:20:38 +08:00
Shell 65c9947225
[libcpu] rv64: support for ARCH_REMAP_KERNEL (#9067)
* [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 <smokewood@qq.com>

* 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 <smokewood@qq.com>
2024-06-18 11:15:59 +08:00
Shell e5b7f3fdd8
[kservice] Enhance support for backtrace service (#9037)
[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 <smokewood@qq.com>
2024-06-13 08:55:53 +08:00
Shell 6ca327d8ce
[smart] add CPU/thread usage tracing config (#8947)
* [smart] add CPU usage tracing config

This patch introduces following features:

- Added CPU usage tracing functionality, enabled by default, for
  applications like 'top'
- update time as smart independent

Signed-off-by: Shell <smokewood@qq.com>

* fixup: add ump idle thread

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-06-04 00:06:41 +08:00
zms123456 6101f1fd29
[components][driver]add isr statistics (#8955)
add isr statistics
2024-05-21 09:01:42 +08:00
Shell 48bd0e49f2
[ipc] support of lockless rt_completion (#8887)
* [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 <smokewood@qq.com>

* fixup: error

* remove useless changes

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-08 09:25:57 +08:00
zms123456 9112dffec8
[src][Kconfig]make RT_ASSERT independent of RT_USING_DEUBG 2024-05-06 20:40:30 -04:00
Meco Man d68e47eb25 [klibc] organize and renmae macros, and add CI check 2024-04-20 21:52:49 -04:00
Shell d1bb01621b fixup: add Kconfig option 2024-04-19 21:30:12 -04:00
Meco Man a0735dcb11 upgrade RT-Thread version to v5.2.0 2024-04-16 23:04:24 -04: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
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
Shell f6fce5f8d7 [kservice] MT-safe output support (kprintf/kputs)
Signed-off-by: Shell <smokewood@qq.com>
2024-01-16 00:59:18 +08:00
Shell e7880a9713 [kernel] support for hook list
Signed-off-by: Shell <smokewood@qq.com>
2024-01-02 19:42:46 +08:00
Meco Man 9fec43f0ea correct and format Kconfig 2023-12-03 21:25:00 +08:00
Meco Man 6cd24d437c [nano][kernel] correct nano Kconfig dependency 2023-12-01 14:43:05 +08:00
Meco Man 005828eba7 [nano] rt-thread susport nano option 2023-11-30 11:39:34 +08:00
Meco Man 589641258e [debug] rename RT_DEBUGING_INIT as RT_DEBUGING_AUTO_INIT 2023-11-10 05:24:33 -05:00
xqyjlj 3283f54c7a
🎈 perf: perf rt_hw_interrupt_disable/enable (#8042)
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: Shell <smokewood@qq.com>
2023-10-25 20:31:25 +08:00
Shell 70a8d1d465
[kservice] improve backtrace service in kernel (#8144)
Signed-off-by: Shell <smokewood@qq.com>
2023-10-21 20:14:45 +08:00
zms123456 d01dd05a0c
[kernel][dm]适配新的设备驱动模型 (#8075) 2023-10-18 20:50:30 +08:00
geniusgogo ecd29fda60
Sync dfs lwp (#8123) 2023-10-17 13:07:59 +08:00
Z8MAN8 220222a387 change version number to v5.1.0 2023-10-11 08:48:29 +08:00
guozhanxin b6a595ea62 [kernel] change RT_DEBUGING_INIT default to n 2023-10-08 11:21:00 +08:00
guozhanxin 227ea54d9d Update version number to 5.0.2 2023-10-08 11:21:00 +08:00
Man, Jianting (Meco) 244b903e5d
[debug] 整理debug宏并增加RT_DEBUGING_CONTEXT (#7805) 2023-07-22 10:36:42 +08:00
xqyjlj 5f0328ee41 feat(ktime): add RT_USING_KTIME to kconfig build 2023-07-20 09:25:18 -04:00
Meco Man 237bbfd968 [debug] remove RT_DEBUG_xxx
remove RT_DEBUG_THREAD RT_DEBUG_SCHEDULER RT_DEBUG_IPC RT_DEBUG_TIMER RT_DEBUG_IRQ RT_DEBUG_MEM RT_DEBUG_SLAB RT_DEBUG_MEMHEAP
2023-07-09 00:19:29 -04:00
Shicheng Chu e2c031643c
[include][dbg]update: no longer use RT_DEBUG_LOG in rtdebug.h (#7750) 2023-06-29 11:24:25 -04:00
zhkag e65509a58e
[src][components][include]消息队列支持优先级 (#7382) 2023-06-26 00:06:06 -04:00
Meco Man d8a3b7c68d [kernel][Kconfig] 调整Kconfig缩进 2023-06-23 17:41:01 -04:00
wangqinglin 0c29bed30f 内核Kconfig增加AMP选项, api:rt_hw_cpu_id和 RT_USING_SMP宏解耦,增加rt_hw_ipi_send对RT_USING_AMP的依赖 2023-06-11 07:08:53 +08:00
flyingcys 5a1321b20b
add rt-smart mode Kconcfig select (#7369)
Co-authored-by: chenyisong <chenyisong@tuya.com>
2023-04-25 13:36:40 +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
褚仕成 d7ef1d1b4e change version number to v5.0.1 2023-04-02 02:30:24 -04:00
褚仕成 696bd91f42 change version number to v5.1.0 2023-04-01 02:15:50 -04:00
Yaochenger de4f237482
[atomic]添加arm与risc-v下的常用原子操作函数 (#7053)
* Update Kconfig
* Update trap_gcc.S
* Update bsp/hifive1/drivers/SConscript

Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
* Update SConscript
* [atomic]提交一份arm与risc-v架构下的常用原子操作函数
* 修改变量类型
* 更新rtatomic.h与atomic_port.c
* 更新rt-thread\libcpu\arm\common\atomic_port.c
* 更新include/rtatomic.h与libcpu/arm/common/SConscript
* 更新include/rtatomic.h
* 修正格式与Kconfig
* 修正格式与文件结构

* 规范文件格式与文件重命名
* 添加测试用例与CI
* 添加函数声明
* 修改virt64/SConscript 添加atomic_riscv.c
  * 1.规范代码风格
  * 2.添加RISC-V64原子指令支持 解决在RV64下编译器将32-bit运算结果扩展为64-bit 导致判断错误
* 添加C11标准库原子操作测试

---------

Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
2023-03-23 20:06:50 +08:00
zhkag 111a5b88cb smart select POSIX timer clock 2023-03-01 00:37:20 +08:00
Meco Man ddccef3a64 modify RT_ALIGN_SIZE as 8 by default 2023-01-12 22:47:23 -05: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
Meco Man a2676b0544 [kernel] RT_NAME_MAX set the range from 1
RT_NAME_MAX为0是nano中使用,完整版中不支持const name
2022-12-26 01:35:14 -05:00
Man, Jianting (Meco) 061af7b092
[kenel] add static name for rt_object (#6422)
增加静态object 名字,用户可以根据内存实际使用情况决定使用动态还是静态。适用于资源极度受限的情况下使用。该功能在RT-Thread完整版本中不常用,主要用于RT-Thread Nano,以缩减对内存的占用。由于没有动态拼接支持,在静态名字下,空闲线程的名字在多核时将命名成相同的名字。
2022-12-20 22:36:32 -05:00
Shell e8504c7cf1
[smart/aarch64] code sync (#6750)
* [smart/aarch64] sync aarch64
2022-12-20 17:49:37 +08:00
guo 68ca9f07a6
[rt-smart] 弱化 RT_USING_LWP,使用 RT_USING_SMART 作为宏配置 (#6740)
* [dfs] sync cromfs

* [rt-smart]Weaken RT_USING_LWP, use RT_USING_SMART as macro configuration

* [format] fix some format issue.
2022-12-16 18:38:28 +08:00
guo ecf2d82159
sync branch rt-smart. (#6641)
* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
2022-12-03 12:07:44 +08:00
liangyingjian 6da7ee128b [update]更正 RT_MEMHEAP_BSET_MODE -> RT_MEMHEAP_BEST_MODE 拼写错误。 2022-11-05 10:45:09 -04:00
Man, Jianting (Meco) 7d58cf1644
change version number to v5.0.0 (#6291) 2022-08-28 23:28:30 +08:00
Man, Jianting (Meco) 41631fe712
modify version to v4.1.1 (#5847) 2022-04-20 15:31:51 +08:00
Man, Jianting (Meco) 03823b5016
[kconfig] add 64bit default value for stack size. set tick HZ as 1000 by default (#5778)
* [kconfig] add 64bit default value for stack size. set tick HZ as 1000 by default

* 用RT_KSERVICE_USING_STDLIB_MEMXXX代替RT_KSERVICE_USING_STDLIB_MEMCP/MEMSET
将RT_KSERVICE_USING_STDLIB设置为默认开启

* 优化rt_kprintf支持longlong的能力,默认在64位CPU为开启状态
RT_PRINTF_LONGLONG命名不规范,更改为RT_KPRINTF_USING_LONGLONG

* fix commit error

* fix error

* 优化 system 函数

* RT_KSERVICE_USING_STDLIB_MEMXXX->RT_KSERVICE_USING_STDLIB_MEMORY
2022-04-09 00:40:36 +08:00
Man, Jianting (Meco) 5a0fea6987
[Kconfig][libcpu] 增加ARCH_CPU_BIG_ENDIAN (#5547)
* [cpu] 增加ARCH_CPU_BIG_ENDIAN
- 之前RT_USING_BIG_ENDIAN的命名并不合理,予以替换为ARCH_CPU_BIG_ENDIAN
- 删除一处多余的ARCH_CPU_64BIT
- 整理了libcpu/Kconfig的格式

* [libcpu][Kconfig] Cortex-M4&7 select ARCH_ARM_CORTEX_FPU

* revert last commit
2022-01-25 15:00:47 +08:00