Commit Graph

4749 Commits

Author SHA1 Message Date
GuEe-GUI 4a3fa385cb [DM/FEATURE] Support import SoC Pinctrl config
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-21 12:44:55 +08:00
GuEe-GUI b0a5bfe66b [DM/FIXUP] Fixup pinctrl depend auto
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-21 12:44:55 +08:00
GuEe-GUI 0d2c84d89f [DM/FEATURE] make SoC Kconfig import easy
Open Kconfig will not fail if using osource,
This way can make SoC Kconfig to DM easy.

Link: ecb89b1370

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 23:52:34 +08:00
GuEe-GUI 86ba3b666f [DM/FIXUP] Fixup MSI first IRQ read offset
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 16:34:10 +08:00
GuEe-GUI 34cf382c8b [DM/FIXUP] Fixup PCI MSI global irq map
Don't use `irq` as a var when clear MSI global
irq map, the irq which alloc before will rewrite.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 16:34:10 +08:00
GuEe-GUI 33785ca68a [DEVICE/SDIO] port to the block
1. remove gpt.
2. remove block device custom.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 16:11:10 +08:00
GuEe-GUI c424cb8186 [DM/FEATURE] Support simple block layer
1. Disk and blk device management.
2. Support partitions probe auto.
3. Support DFS and user mode fops, ioctl.
4. Add a cmd for blk info.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 16:11:10 +08:00
GuEe-GUI 10cac76d3b [DM/FEATURE] Support MFD syscon
MFD (Multifunction device) with System Controller Register Read/Write.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 15:53:23 +08:00
GuEe-GUI f5aca55a26 [DM/FEATURE] Support import SoC CLK config
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 11:08:28 +08:00
GuEe-GUI b6dff44054 [DM/FIXUP] Fixup CLK
1. Default return OK when input NULL (if is not necessary in device).
2. Support object parse in OFW.
3. Support CLK depends fix auto.
4. Fixup rt_clk_array_prepare_enable and rt_clk_array_disable_unprepare.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-20 11:08:28 +08:00
zhuzhuzhu bdf4da8ee1
[components][driver]add phy and mdio bus
old phy bus is too simple add phy_bus is not adapt rt_bus framework,so writer a stronger phy bus framework.

here is my commit message:
add mdio bus and phy bus to kernel,the phy bus use rt_bus framewok ,driver writer can write phy_driver first .when mac driver need to use phy they can register phy_device and pjhy_devie will serach for driver which match by uid and mask,if no driver match with the device that you register,phy_bus will return the genphy to you device,the genphy driver is the general driver for phy,so you can use it but it can not support the capcity of chip it may be cause performance is not up to peak
2024-11-19 21:34:03 -05:00
ligr b023c15256 [components/libc/posix]add comments for rwlock APIs. 2024-11-19 18:26:16 -05:00
ligr c1c7959bdb [components/libc/posix]add comments for condition variable APIs. 2024-11-19 18:26:16 -05:00
ligr 07c8b571ce [components/libc/posix]add comments for mutex APIs. 2024-11-18 19:21:02 -05:00
GuEe-GUI 6185250c86 [DM/FEATURE] Support clock subprobe in OFW
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-18 15:03:23 +08:00
GuEe-GUI cefe6d6380 [DM/FEATURE] Support driver depends fix auto
We need a API to fix the driver load auto when
a second driver get it in probe process that
we can not be careful of the driver-to-driver's
depends in different SoC.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-18 15:03:23 +08:00
GuEe-GUI b6f67285e9 [DM/FIXUP] remove OFW switch macros
The drivers will support OFW and name probe both.
We should make build OK when OFW is disable.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-18 15:03:23 +08:00
GuEe-GUI 3b22dbd049 [DM/FEATURE] DM Device IDA management
Drivers can manage their own IDs without having to concern
themselves with the register/unregister in system

Link: https://github.com/RT-Thread/rt-thread/issues/9534

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-18 14:23:25 +08:00
zhuzhuzhu 45aba1bcd7 add head 2024-11-18 13:53:25 +08:00
zhujiale 48fca91817 add ofw api to of net,driver writer can use this api get phy modes or get mac address 2024-11-18 13:53:25 +08:00
zhujiale 6e78474998 pci 2024-11-18 13:53:25 +08:00
Meco Man 09f47c55a9 [utest] format code and remove duplicate header file 2024-11-18 09:58:55 +08:00
rcitachi d9c16efe8f Modify the position of libc_rent definition 2024-11-17 11:59:37 -05:00
ligr 5e8602c6e0 [components/libc/posix][pthreads]add comments for thread APIs of pthread. 2024-11-16 11:52:57 -05:00
ligr ac1df96ec9 [net][sal]add comments for BSD socket APIs. 2024-11-15 21:04:27 -05:00
wdfk-prog 4c18fa7e21 fix:[CAN][STM32]open时立刻启动can_start,还未完成其他配置,可能导致异常 2024-11-13 22:56:17 -05:00
Shell e763e51e49 feat: devfs: handling unit size in POSIX RW request
POSIX.1 says:
>  read() attempts to read up to count bytes from file descriptor fd
>  into the buffer starting at buf.

On the other hand, for rt_device_read, the `@size` is defined as the
number of unit (block size for blk device, otherwise one byte).

Changes:
- Transferred unit size from POSIX R/W(in bytes) to rt_device_R/W during
  request of file R/W operations.

Signed-off-by: Shell <smokewood@qq.com>
2024-11-13 22:56:07 -05:00
ligr f0934630c4 [libc] add comments for libdl APIs. 2024-11-13 07:58:34 +08:00
Shell 20263be180
fixup: smart: uninitialized buffer on mount(2) (#9636)
The `struct stat` object used inside mount(2) is uninitialized, which
can lead to undefined behavior during running

Changes:
- Set zero to buffer before calling to stat()

Signed-off-by: Shell <smokewood@qq.com>
2024-11-12 21:11:50 +08:00
kurisaw 2241f4676b [libcpu][component] fixed the r52 kernel gcc context switch assembly 2024-11-06 16:09:52 +08:00
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