Commit Graph

4719 Commits

Author SHA1 Message Date
yangpeng f98f772a84 [components/net/at]修复大数据量传输socket断开后可能丢数据的问题 2024-11-05 22:36:33 -05:00
liuchao bdf5a1fb09 [components][finsh]在RT_USING_POSIX_STDIO时,使用get_console获取当前console描述符 2024-11-04 22:02:59 -05:00
kurisaw ee052245d3 Specification submission 2024-11-05 09:43:57 +08:00
kurisaw 13a6c5201d [net][lwip] lwip hook functions are provided to provide greater flexibility for unknown Ethernet protocols 2024-11-05 09:43:57 +08:00
yangpeng a939e8e4ea [components/net/at]修复at socket信号量释放异常 2024-11-04 17:52:59 -05:00
Shell a573ea06b7 🚚 renaming: move `smp` to `smp_call` 2024-11-03 10:08:45 +08:00
Shell 2f6d98bfcb feat: smp_call: added signaling call_req
This patch introduces `rt_smp_call_request` API to handle queued
requests across cores with user provided data buffer, which provides a
way to request IPI through a non-blocking pattern.

It also resolved several issues in the old implementation:
- Multiple requests from different cores can not be queued in the work
  object of the target core.
- Data racing on `rt_smp_work` of same core. If multiple requests came
  in turns, or if the call is used by the target cpu, while a new
  request is coming, the value will be overwrite.
- Memory vulnerability. The rt_smp_event is allocated on stack, though
  the caller may not wait until the call is done.
- API naming problem. Actually we don't provide a way to issue an IPI to
  ANY core in mask. What the API do is aligned to MANY pattern.
- FUNC_IPI registering to PIC.

Changes:
- Declared and configured the new `RT_SMP_CALL_IPI` to support
  functional IPIs for task requests across cores.
- Replaced the single `rt_smp_work` array with `call_req_cores` to
  manage per-core call requests safely.
- Added `_call_req_take` and `_call_req_release` functions for atomic
  handling of request lifetimes, preventing data race conditions.
- Replaced single event handling with a queue-based approach
  (`call_queue`) for efficient multi-request processing per core.
- Introduced `rt_smp_call_ipi_handler` to process queued requests,
  reducing IPI contention by only sending new requests when needed.
- Implemented `_smp_call_remote_request` to handle remote requests
  with specific flags, enabling more flexible core-to-core task
  signaling.
- Refined `rt_smp_call_req_init` to initialize and track requests
  with atomic usage flags, mitigating potential memory vulnerabilities.

Signed-off-by: Shell <smokewood@qq.com>
2024-11-03 10:08:45 +08:00
rcitachi 7c27319521
[libc] modify function names to resolve naming conflicts 2024-11-01 18:44:16 -04:00
Kai 5e34298f99 add missing extern "C" in header to support cpp 2024-10-24 20:22:48 +08:00
Shell cfe1768815 fixup: smart: sys_mount: UAF vulnerability
This patch addresses a use-after-free (UAF) vulnerability in the
sys_mount. The issue occurred due to improper handling of memory
deallocation, which could lead to crashes or undefined behavior on user
request of mounting.

Changes made:
- Moved the `rt_free(copy_source)` function call to occur after the necessary
  operations are completed, preventing premature deallocation of memory.

Signed-off-by: Shell <smokewood@qq.com>
2024-10-21 17:15:52 +08:00
sakumisu 4c206caf8b
update(cherryusb): update to v1.4.1 2024-10-19 12:23:21 -04:00
zms123456 9a010bb71b
[components][sal]add netdev ifindex feature 2024-10-11 00:10:21 -04:00
zms123456 344ea87347
[components][smp]remove redundant memset & unlock in smp 2024-10-11 00:09:28 -04:00
zms123456 906d1caea6
[component][sal]add netgetdev api 2024-10-10 22:40:24 -04:00
yangpeng c9a1245977 [components][dfs][dfs_v1]cat输出实际读取的长度 2024-10-10 17:44:32 -04:00
Yuqiang Wang 9b31631df1
[drivers][spi] Fixed an issue that caused spi bus deadlock in the spi configuration 2024-10-09 21:32:17 -04:00
CYFS 2b281ff0cb
[doxygen][rsoc]add pwm touch can i2c spi driver example for doxygen 2024-10-08 17:57:52 -04:00
sulfurandcu 85bd74640e [Bug] [ymodem] last frame's data_sz issue, fixed. 2024-10-07 23:13:41 -04:00
Meco Man 36f8f266e9 feat:[drivers][spi] rt_spi_configure 添加互斥保护 2024-10-06 00:02:53 -04:00
wdfk-prog 99503d3ff6 feat:[drivers][spi] rt_spi_bus_configure 添加 -RT_EBUSY 返回值,并增加说明注释 2024-10-06 00:02:53 -04:00
CYFS3 9bcb904a0b [doxygen]add pin driver example for doxygen 2024-10-05 23:33:58 -04:00
zhuzhuzhu ef426851ea
[feat] add pci api,the pci/pcie driver
add pci api,the pci/pcie driver writer can use this to get resource of current device with flag,there are three flag :
1. PCI_BUS_REGION_F_MEM it mean memory space
2. PCI_BUS_REGION_F_IO it mean io space
3. PCI_BUS_REGION_F_PREFETCH it mean prefetchable memory
2024-10-05 02:30:52 -04:00
wdfk-prog f28b84aa1f [components][i2c] 修改为debug等级打印 2024-10-04 18:02:36 -04:00
wdfk-prog ff6d5b13f0
[components][ulog] ULOG_OUTPUT_LEVEL未定义时,level_output_info产生警告 2024-10-03 19:19:24 -04:00
milo bad2745dd3 fix rtc alarm thread parameters issue 2024-09-29 20:49:35 -04:00
hydevcode 66d54ea8c0
[bsp][nxp][rsoc] Fix compilation issues with bsp of nxp/lxp series 2024-09-29 20:47:39 -04:00
milo e6a3b30993
[dev] make RTC alarm internal thread's attributes configurable 2024-09-29 13:16:18 -04:00
CYFS 6fb31d486d
[doxygen][rsoc]add dac driver example for doxygen (#9483) 2024-09-29 08:59:17 +08:00
CYFS 684bcc8d16 [doxygen]add rtc devices example for doxygen 2024-09-26 18:07:40 -04:00
CYFS d55931493a [doxygen]add dac driver example for doxygen 2024-09-25 21:04:19 -04:00
CYFS f4a92e5e86
[doxygen][rsoc] add adc driver example for doxygen (#9465)
* [doxygen] add adc driver example for doxygen

* add data structures
2024-09-25 22:19:53 +08:00
CYFS b4d30064cc
[components] change variable name
为什么提交这份PR (why to submit this PR)
#9397

你的解决方案是什么 (what is your solution)
将 line 758的dir改为link_dir
2024-09-24 20:04:57 -04:00
zhujiale d037952988 smp 2024-09-24 09:56:30 +08:00
zhujiale d8956e415e smp 2024-09-24 09:56:30 +08:00
zhujiale aafc0ae0f8 smp 2024-09-24 09:56:30 +08:00
zhujiale b206d440c7 smp 2024-09-24 09:56:30 +08:00
zhujiale 6783d8fdec smp 2024-09-24 09:56:30 +08:00
zhujiale 4953a92528 smp 2024-09-24 09:56:30 +08:00
zhujiale 8ce405f739 smp 2024-09-24 09:56:30 +08:00
zhujiale d468b93657 smp 2024-09-24 09:56:30 +08:00
zhujiale 244cf61af6 SMP 2024-09-24 09:56:30 +08:00
zhujiale 5f83c51347 SMP 2024-09-24 09:56:30 +08:00
zhujiale 45bc5a721f smp_call 2024-09-24 09:56:30 +08:00
zhujiale d1865d0d93 smp_call 2024-09-24 09:56:30 +08:00
zhujiale 79445b6773 smp_ipi 2024-09-24 09:56:30 +08:00
zhujiale 512dae84be smp_ipi 2024-09-24 09:56:30 +08:00
Shell 9a27de92ae feat: smart: user space context optimization
This patch optimizes the user-space context handling in the ARM64
architecture, specifically improving how the context is saved and
restored during system calls and interrupts. The changes make the
code more efficient and easier to maintain, while ensuring proper
preservation of user context during system transitions.

Changes:
- Introduced a parameter for context saving to improve flexibility.
- Replaced hardcoded stack pointer operations with frame-relative
  references for better readability and code reuse.
- Simplified context restoration, removing redundant operations like
  loading/storing floating-point registers.

Signed-off-by: Shell <smokewood@qq.com>
2024-09-19 23:02:39 -04:00
Shell 210cd71128 fixup: pty: possible memory leaking on close()
The ref_count of the vnode is NOT bound to the resource reference counts
of the ptm device created by opening `dev/ptmx`, so the conditional
release of resource may end up by memory leaking if the multiple user
have open the `dev/ptmx`.

Changes:

- Removed conditional branch on recycling resource

Signed-off-by: Shell <smokewood@qq.com>
2024-09-19 23:02:25 -04:00
GuEe-GUI 87906499a3 [DM/FDT] Fixup memory address reserved and translate in early
1.Fixup `fdt_reserved_memory_reg` loop time.
2.Fixup `rt_fdt_translate_address` cells value reader.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-09-19 21:16:56 +08:00
zhao maosheng 992e79a0f8 optimize sal_bind 2024-09-19 21:15:52 +08:00