Commit Graph

16149 Commits

Author SHA1 Message Date
Shell 5f947863b4
[dfsv2] fixup out-of-memory access (#8973)
This change addresses a potential out-of-memory access issue in the
devfs filesystem component. The issue arises when the `rt_malloc`
function allocates memory for a path string without accounting for
the null terminator, leading to undefined behavior.

As the manual documented:

> DESCRIPTION
>   The strlen() function calculates the length of the string pointed to
>   by s, excluding the terminating null byte ('\0').

To fix this, the memory allocation size was increased by one byte
to ensure space for the null terminator. This prevents potential
out-of-memory access and ensures proper string termination.

Signed-off-by: Shell <smokewood@qq.com>
2024-05-21 19:45:08 +08:00
zms123456 6101f1fd29
[components][driver]add isr statistics (#8955)
add isr statistics
2024-05-21 09:01:42 +08:00
Astrozen ce913b95c7
[tools/cmake] fix the issue of the missing link flags added in Sconscript (#8957) 2024-05-21 08:58:26 +08:00
Shell e82c53559b
[utest] add device find (#8959)
* [utest] add device find

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

* fixup: add test

* fixup: ptr aliasing

* quality: meaning parameter

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-21 08:56:35 +08:00
蒙蒙plus 2f559906d6 feat(bsp): hc32L196增加IAR_8.40支持
Signed-off-by: 蒙蒙plus <chengmeng_2@outlook.com>
2024-05-17 18:38:05 -04:00
Shell f2d6325b43
[smart] select console device dynamically (#8949)
* [smart] select console device dynamically

- Fixed compiler warning on terminal subsystem for
  `components/lwp/terminal/terminal.h`
- Updated default console setup to dynamically select an appropriate tty
  device based on the configured console device name.

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

* fixup: remove useless codes

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-17 13:19:00 +08:00
JamieTx 3d30b56c86 [HC32] Fixed a bug about erase flash. 2024-05-16 19:15:38 -04:00
sheltonyu 194fd6df05 [bsp/at32] 1.fixed f402 uart7/8 pierph clock source error, 2.fixed compiling error of drv_usart_v2.c with no dma 2024-05-16 19:15:17 -04:00
Shell e25fc8b511
[libcpu/arm64] add C11 atomic ticket spinlock (#8882)
* [libcpu/arm64] add C11 atomic ticket spinlock

Replace the former implementation of flag-based spinlock which is unfair

Besides, C11 atomic implementation is more readable (it's C anyway),
and maintainable. Cause toolchain can use their builtin optimization and
tune for different micro-architectures. For example armv8.5 introduces a
better instruction. The compiler can help with that when it knows your
target platform in support of it.

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

* fixup: RT_CPUS_NR

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-16 15:45:12 +08:00
xiao-mang e46333496f
fix specified network card not taking effect with msh's ping error (#8937)
* fix specified network card not taking effect with msh's ping error

* fix specified network card not taking effect with msh's ping error
2024-05-16 15:43:50 +08:00
zms123456 ed002bb84a
[drivers][serial]fix error in getting serial_tty settings (#8953)
fix error in getting serial_tty settings
2024-05-16 15:36:16 +08:00
flyingcys ec8ff90a4a
[bsp/cvitek]update gpio driver (#8946)
update gpio driver
2024-05-13 18:20:57 -04:00
liYangYang 78bdf67ab2
[drivers][ofw] fix ofw_alias_scan() bug (#8908)
* fix ofw_alias_scan() bug

* fix tag_len
2024-05-13 20:56:32 +08:00
atwww b421b4e1f4
修复C++11 thread_local对象析构函数与实际内存释放动作顺序相反问题 2024-05-11 13:50:02 -04:00
Yang Xijing f55187f830 [include/rtthread.h] rt_thread_close函数声明应当与RT_USING_HEAP无关 2024-05-11 13:42:27 -04:00
Meco Man 634f50572e
[tools] fix env toolchain path parse issue (#8936) 2024-05-11 16:06:23 +08:00
zms123456 151a96cb88
[components][drivers]fix compiler error in serial dm (#8927)
fix compiler error in serial dm
2024-05-11 11:16:26 +08:00
xiao-mang b3277fa704
fix eth error (#8929)
* fix eth error

* fix eth error

* fix eth error

* fix eth error

* fix eth error
2024-05-11 11:10:53 +08:00
Shell 989cc61f48
[hrtimer] fixup use-after-free (#8928)
Signed-off-by: Shell <smokewood@qq.com>
2024-05-11 08:53:42 +08:00
zhao maosheng 5dba9a4214 remove intr disable 2024-05-10 14:39:53 +08:00
zhao maosheng e2214cc899 add percpu interrupt info 2024-05-10 14:39:53 +08:00
Shell 017b2a5a44
[smart] fixup arm64 aspace switch (#8925)
* [smart] fixup arm64 aspace switch

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

* fixup: arm add arch_kernel_mmu_table_get

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-10 09:17:19 +08:00
Rbb666 5712ff1a32 [renesas][hmi-board]update lvgl config and doc. 2024-05-09 14:44:58 +08:00
LZero 1cac9e92b5 Stm32F411 Blackpill CubeMX delete SPI_NSS 2024-05-09 00:37:10 -04:00
geniusgogo 79b3d5ec1e fix_serial_baudrate_set 2024-05-09 00:35:46 -04:00
geniusgogo f770f543a6 fix RT_DEBUGING_ASSERT 2024-05-09 00:33:32 -04:00
sp-cai 95f0b029b0 [BSP][HC32F460]清理已不再使用的文件
PWM 配置文件 pwm_tmra_config.h 已合并到 pwm_tmr_config.h 了。
2024-05-08 18:09:17 -04:00
WaterFishJ 5f077a6df0 [bsp][at32]修复at32_transmit返回类型错误 2024-05-08 18:08:59 -04:00
liYangYang dbf8a26e6c
[libcpu][aarch64] Fixed the rt_hw_secondary_cpu_bsp_start() bug (#8898)
* fix rt_hw_secondary_cpu_bsp_start() bug

* timer init

* comment
2024-05-08 19:48:17 +08:00
Bernard Xiong 73153ac06a
[tools] fix the issue of cc detection failure in Windows (#8914) 2024-05-08 10:50:45 +08:00
Meco Man 0871140759 [kernel][timer] remove wordy logs 2024-05-07 21:50:52 -04:00
Rbb666 a723014e32
[renesas][hmi-board]Support lvgl-9.x 2024-05-07 21:43:52 -04:00
wdfk-prog 7879986e38
[timer] The rt_timer_check and _soft_timer_check functions are merged (#8884) 2024-05-08 09:27:38 +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
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 6977cf9101
[src] add rt_hw_cpu_id() wrapper API (#8894)
* [src] add rt_hw_cpu_id() wrapper API

rt_hw_cpu_id() is an unsafe API which should not be used by most codes
directly. It's error-prone because it must be used in proper context,
otherwise it can lead to errors and unpredictable behavior.

This patch adds a wrapper API for rt_hw_cpu_id() to address this risk.
It includes the context-checking functionality and provides a safer
alternative for obtaining CPU IDs, ensuring that it is used correctly
within the appropriate context.

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

* fixup UMP

* update API & comment

* ci: cpp_check

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-05-08 09:22:09 +08:00
geniusgogo 02e0334ac3 fix_serial_baudrate_set
Signed-off-by: geniusgogo <xpxyr@sina.com>
2024-05-07 19:03:14 -04:00
luhuadong 1e9ed637d8 docs: fix source code catalog Name item 2024-05-07 19:02:02 -04:00
QTbin 7245dbd54f 修改scons的脚本文件,使其适配更多芯片的工程生成 2024-05-07 02:03:28 -04:00
Meco Man 84f8d209c4 [stm32l4] export env 2024-05-07 13:27:15 +08:00
zms123456 9112dffec8
[src][Kconfig]make RT_ASSERT independent of RT_USING_DEUBG 2024-05-06 20:40:30 -04:00
Meco Man 12ad1703df [bsp][stm32l4] remove local HAL 2024-05-06 21:42:10 +08:00
Meco Man ac45676830 [stm32l4] select PKG_USING_STM32L4_HAL_DRIVER 2024-05-06 21:42:10 +08:00
Meco Man b29b29b205 [stm32l4] remove HAL 2024-05-06 21:42:10 +08:00
Meco Man 0db3cfacda [stm32l4] remove STM32L4xx_HAL/CMSIS 2024-05-06 21:42:10 +08:00
xiao-mang 89164b19a8
fix art-pi smart boot from emmc (#8904)
* fix art-pi smart boot from emmc

* fix art-pi smart boot from emmc

* fix art-pi smart boot from emmc
2024-05-06 13:31:17 +08:00
Meco Man a7a8c59ea9 [stm32l475pandora] format Kconfig 2024-05-05 22:18:34 -04:00
Meco Man 68e92985c7 [stm32] 调整CMSIS-Core软件包宏 2024-05-05 22:18:34 -04:00
Meco Man 341ce50067 [stm32] format Kconfig 2024-05-05 22:18:34 -04:00
Meco Man f7762ebc90 [ci] disable tools check temporarily 2024-05-05 22:18:34 -04:00