Commit Graph

4760 Commits

Author SHA1 Message Date
PermissionDenied7335 92f26b7ad2 [drivers] fixed a minor typo in the comments of dev_serial_v2.c 2024-11-24 12:48:19 -05:00
GUI 945114fd59
[DM/FEATURE] Support NVME (#9591)
* [DM/FEATURE] Support NVME

1. Support PRP and SGL (>= NVME v1.1) transport.
2. Support MSI/MSI-X for IO queues.
3. Support NVME on PCI.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-24 13:57:37 +08:00
Meco Man 13e0671f65 [fal] using rt-thread raw API instead of std API 2024-11-24 11:34:30 +08:00
Meco Man 8e10983c9b [klibc] add rt_vsnprintf_std.c and rename RT_KLIBC_USING_VSNPRINTF_LONGLONG 2024-11-24 11:29:28 +08:00
GUI 42a41c696d
[DM/FEATURE] Support SCSI bus (#9592)
* [DM/FEATURE] Support block for SCSI
1. Support SD and CD-ROM.
2. SD will port to UFS and ATA device.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-22 16:59:37 +08:00
GUI c055261177
[DM/FEATURE] Support DMA management (#9682)
1. DMA pool management for platform.
2. DMA engine driver API.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-22 14:11:40 +08:00
ligr dd709c1cea [components/libc/posix]add comments for thread local storage APIs. 2024-11-21 21:46:47 -05:00
ligr bb0a1ea453 [components/libc/posix]fix the problem that it doesn't check if barrier still in use and dosen't destory the mutex either. 2024-11-21 19:22:44 -05:00
ligr 0bac8c4f90 [components/libc/posix]fix the errors that assigning an integer to a pointer and always return EINVAL. 2024-11-21 19:22:44 -05:00
ligr 79324c0b4c [components/libc/posix]add comments for barrier APIs. 2024-11-21 19:22:44 -05:00
GUI f797eccbf1
[DM/FEATURE] Support IIO (Industrial I/O) (#9598)
[DM/FEATURE] Support IIO (Industrial I/O)

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-21 20:44:25 +08:00
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