Commit Graph

4647 Commits

Author SHA1 Message Date
zms123456 f2dc4f13cb
[components][lwip]fix lwip poll macro conflict 2024-09-13 17:29:08 -04:00
heyuanjie87 6d39cdf836 [lwp] 取消脚本中限制rv的具体cpu类别
此目录中为rv64通用代码
2024-09-13 17:28:47 -04:00
zms123456 b423a6b1e3
[components][lwp]remove extra check in sys_bind 2024-09-11 18:04:05 -04:00
GuEe-GUI f9b632d52d [DM/MISC] Add error no for ptr
When the driver request a API gets RT_NULL which return value is ptr,
they could not know why get a RT_NULL.

some API return RT_NULL, is not error internal maybe, it just not
supported for this platform, but the driver still could work ok,
the API can return (RT_NULL + -RT_EEMPTY) to driver.

on the other hand, the driver can do more behaviors by error no.
When the API return the -RT_EBUSY, driver can wait for a moment and retry.
When the API return the -RT_ENOSYS, driver can try the next mode or request's name.

Signed-off-by: GuEe-GUI <wusongjie@rt-thread.com>
2024-09-11 14:34:13 +08:00
CYFS cb0b5b05ad
[components][sensor]增加电源检测类型 2024-09-10 19:54:03 -04:00
ryancw 9de975fa93 [components][sal][at] _gethostbyname_by_device 添加注释 2024-09-09 18:07:41 -04:00
ryancw e9711d5640 [components][sal][at] netdb添加at_gethostbyname_r 2024-09-09 18:07:41 -04:00
ryancw bac9812cf9 [component][at_socket] udp一个socket跟多个地址通讯bug修复、DNS加锁防止多线程错乱、实现at_gethostbyname_r、稳定性优化 2024-09-09 18:07:41 -04:00
SeliverWang 66dd03f6c2 修复audio_pipe中函数在开启POSIX IPC时与 POSIX PIPE冲突问题 2024-09-06 23:18:09 -04:00
GuEe-GUI 2168ed8e7d [DM/Feature] Basic PCI/PCIe (Peripheral Component Interconnect Express) bus
PCI/PCIe have better performance and more devices support, such as
NVMe, GPU, Powerful NIC (Like RDMA). PCI/PCIe can access control by
IOMMU that the virtualiztion and userspace driver will more safety.
PCI/PCIe device could hot plugging, no design modifications SoC required,
PCI/PCIe on Embedded SoC is popular now.
We make a simple framework to support them.

Feature Lists:
1.PCI INTx: the INT[A-D] pin IRQ for legacy PCI, work with platform PIC.
2.MSI/MSI-X: the message write IRQ for PCIe, work with platform's PIC.
3.PME: we only support the D0, D1, D2, D3HOT, D3COLD init by framework.
4.Endpoint: a simple EP framework for PCI FPGA or NTB function.
5.OFW: we only support work on OFW SoC, ACPI support in the future maybe.

Host controller:
1. Common PCI host controller on ECAM.
2. Generic PCI host controller on ECAM.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-09-06 17:45:03 -04:00
GuEe-GUI 802a6ed2ca [DM] Extended drivers MISC interface
1. RT_FIELD_PREP: prepare a bitfield element.
2. RT_FIELD_GET: extract a bitfield element.
3. rt_offsetof: member offset of a struct
4. rt_upper_32_bits: high 32 bits of value.
5. rt_lower_32_bits: lower 32 bits of value.
6. rt_upper_16_bits: high 16 bits of value.
7. rt_lower_16_bits: lower 16 bits of value.
8. rt_max_t: fix type of max(...).
9. rt_ilog2: integer logarithm base 2.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-09-06 17:45:03 -04:00
RyanCW 188b87f4d8
[components][at_socket] 添加errno设置 2024-09-05 17:54:50 -04:00
GuEe-GUI 175a2ff954 Fixup platform not free device in OFW
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-09-03 19:49:47 -04:00
GuEe-GUI 2ec69c3ce4 Fixup bus remove device option
The bus should call driver's `remove` callback not
instead of `shutdown` in rt_bus_remove_device.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-09-03 19:49:47 -04:00
Yaochenger 7469edd165 [fix][device] 修正使用rt_device_create创建设备,使用rt_device_destroy删除失败的问题 2024-09-03 18:24:45 -04:00
yandld 635e16a8d5 [libc] 修复 ctime()死机问题 2024-09-03 18:13:09 -04:00
sakumisu 2d266742e0 fix(cherryusb): fix build error 2024-09-02 21:27:47 +08:00
sakumisu 9511e4bd19 update(cherryusb): fix dfs mem leak, add check for lwip stack size, select elmfat when use msc 2024-09-02 00:37:35 -04:00
Shell 679761983d fixup: ptyfs: CI reported snprintf type issues 2024-09-01 15:12:34 -04:00
zhugengyu b9f4daa97a
[BSP][Phytium] add support for mainbranch cherryusb (xhci host + pusb2 device/host) 2024-08-27 22:06:13 -04:00
sakumisu 669a6822e7 update(cherryusb): update to v1.4.0 2024-08-27 00:48:40 -04:00
zhuzhuzhu 1be24fc7da
【修复】修复link系统调用返回值问题 2024-08-25 10:57:38 -04:00
zhuzhuzhu dc232080a0
【修复】修复rmdir系统调用返回值不符合用户预期问题 2024-08-25 10:57:15 -04:00
zhuzhuzhu d9fac09f71
【修复】 修复dup系统调用对用户态的返回值问题 2024-08-25 10:56:47 -04:00
zhuzhuzhu c4c227e367
【修复】修复symlink系统调用返回值不是预期问题 2024-08-25 10:56:03 -04:00
zx568073531 b19672ccc1 修复TLS内存申请没有初始化问题 2024-08-25 01:36:31 -04:00
SeliverWang f7f0afe03e 修复TLS申请内存后没有初始化问题 2024-08-25 01:36:31 -04:00
Shell 564ca848f4 fixup: uninitialized argument vector element
This patch addresses the potential issue of uninitialized elements in
the argument vector returned by `lwp_get_command_line_args()`. The
previous implementation could leave `argv` in an inconsistent state
if certain errors occurred, leading to possible undefined behavior.

Changes:
- Replaced `rt_malloc()` with `rt_calloc()` to ensure `argv` is properly initialized.
- Added a consistent error handling path using `goto error_exit` to handle memory allocation failures and string copy errors.
- Ensured `lwp_free_command_line_args()` is called before returning on error, preventing potential memory leaks.

Signed-off-by: Shell <smokewood@qq.com>
2024-08-24 15:46:35 -04:00
zhujiale d086039608 fix_return 2024-08-24 14:44:39 +08:00
zhujiale afa17ed343 fix_return_err 2024-08-24 14:44:39 +08:00
CXSforHPU 416ec66380
[device] add dev_ prefix for file names 2024-08-23 18:15:09 -04:00
rcitachi 9a84c13b2e
[lwp] Implementation of setpgrp and fix mmap2 problems (#9308)
* mmap2 failure handling

当传入一个非常大的地址时,offset会计算得到一个值,又因为传入的地址错误,rc会得到错误码,结合offset会得到一个很奇怪的值。

* Implementation of setpgrp

执行setpgrp会走到这一步,在执行getpgrp无法得到创建的group的值

* Modify the return method of mmap
2024-08-22 17:53:18 -04:00
zms123456 9d95ad9b8d
[lwp][tid]add error log when tid depleted, and return correct errno when clone failed (#9327)
add error log when tid depleted, and return correct errno when clone failed
2024-08-22 17:52:45 -04:00
zms123456 fd31965c3c
[components][lwp]fix mount param issue (#9333)
fix mount param issue
2024-08-22 17:52:19 -04:00
Shell c451dce820 feat: add ISR safe completion API
Since the completion is used to sync with ISR mostly, we should set the
default semantic to ISR-safe. So most user will be happy and don't see
any weird behavior in their codes.

Changes:
- Added `rt_completion_wait_noisr` and
  `rt_completion_wait_flags_noisr` functions in `completion.h`,
  `completion_comm.c`, `completion_mp.c`, and `completion_up.c`.
- The new APIs allow waiting for completions in non-ISR contexts
  while ensuring thread context safety.
- Existing documentation and comments were updated to clarify
  usage contexts and emphasize restrictions on ISR usage.

Signed-off-by: Shell <smokewood@qq.com>
2024-08-19 10:39:15 +08:00
Fan YANG 55c33d9ce2 [components][drivers][sdio][sd] Fix wrong max data rate calculation logic
- corrected the default value for max_data_rate variable

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>
2024-08-12 16:23:17 +08:00
Z8MAN8 1d646bcf56 Add RT_USING_RTC conditional compilation protection in ctimer.c
Analysis: There is still an omission in the preprocessing control of
_control_rtc in 24b0a81 ("Add RT_USING_RTC conditional
compilation protection in ctimer.c")

Solution: Add RT_USING_RTC preprocessing control to missing
_control_rtc

Signed-off-by: Shicheng Chu <1468559561@qq.com>
2024-08-12 15:56:17 +08:00
Z8MAN8 24b0a8174f Add RT_USING_RTC conditional compilation protection in ctimer.c
Analysis: RT_USING_RTC preprocessing is used in 47cd52d ("修复不
使能 RT_USING_DEVICE 时编译报错") to control the reference of
rtdevice.h, as well as the implementation and call of _control_rtc,
but there are some omissions.

Solution: Add RT_USING_RTC preprocessing control to missing
_control_rtc

Signed-off-by: Shicheng Chu <1468559561@qq.com>
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
2024-08-11 14:37:36 +08:00
zhao maosheng f543160ead fix rt_atomic_dec_and_test 2024-08-09 12:54:10 +08:00
Rbb666 8c5f24469c
[ci][bsp]fix same54&same70&ls1cdev build errors. (#9282)
[ci][bsp]fix same54&same70&ls1cdev ci build errors.
2024-08-08 14:08:59 +08:00
Rbb666 33cb0405bc [net][sal]修复开启SAL_TLS编译报错 2024-08-04 22:54:46 +08:00
马龙伟 47cd52d162
修复不使能 RT_USING_DEVICE 时编译报错 (#9145)
* 修复不使能 RT_USING_DEVICE 时编译报错

* 删除 ctime.c 中多余引用
2024-08-04 09:56:47 +08:00
Kai 24d3ed80da fix typo in dhcp server 2024-07-29 21:48:15 +08:00
Shell 820e80a7f5 fixup: compiler warning on cvitek risc-v cause by unsupport vDSO on rv64
Signed-off-by: Shell <smokewood@qq.com>
2024-07-29 20:18:19 +08:00
Shell cfa3ecfa9e bsp: cvitek/c906B: feat: add config of bootfs
To support more choice on bootfs. romfs, cromfs are now supported on
risc_v_big platform.

Changes:
- added mount operations under port
- added prototypes for cromfs init APIs

Signed-off-by: Shell <smokewood@qq.com>
Reviewed-on: https://github.com/RT-Thread/rt-thread/pull/9229
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
2024-07-29 20:16:54 +08:00
Bernard Xiong bde4817b9e
Merge pull request #9228 from messigogogo/master
[BSP/Phytium]适配最新驱动
2024-07-25 19:03:37 +08:00
kurisaw ab11bd04bf Synchronizing sensor_v1 changes 2024-07-24 23:17:38 +08:00
kurisaw 57bca1a072 [sensor_v2] Repair an error occurs when sensor v2 probes a sensor device for the first time 2024-07-24 23:17:38 +08:00
Bernard Xiong e955e411b7
Merge pull request #9212 from polarvid/shell/opt-gctx
[libcpu] trimming ARM64 general context
2024-07-24 13:32:11 +08:00
Jiading Xu 79457efc49 components: net: lwip: port: add netdev callback on link status change setting
- set netdev callback on link status change in netdev_add()

Signed-off-by: Jiading Xu <Jiading.Xu@hpmicro.com>
2024-07-24 09:52:23 +08:00