Commit Graph

4608 Commits

Author SHA1 Message Date
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
张衍 0e3c4bd26b [BSP/Phytium]适配最新裸机驱动 2024-07-22 02:33:39 +00:00
wdfk-prog a837f2b8e9 [compoents][hwtimer]Add a user control interface 2024-07-19 11:51:39 +08:00
wdfk-prog bceb6635b0 [compoents][pm]The device is registered and uninstalled by linked list 2024-07-19 11:51:39 +08:00
Bernard Xiong 937f0dbf5a
Merge pull request #9208 from zmshahaha/errno
[components][lwp]fix exec and mount error code
2024-07-18 20:32:06 +08:00
Shell 7138f340b2 [libcpu/arm64] feat: Trimming General Context
This patch focuses on the ARM64 general context handling code.
The modifications are aimed at enhancing performance by simplifying
context save/restore operations.

Changes include:
- Adjusted stack alignment in `arch_set_thread_context` function.
- Updated `lwp_gcc.S` to reset frame pointer and link register.
- Refined `rt_hw_backtrace_frame_unwind` to handle user space address checks.
- Added `GET_THREAD_SELF` macro in `asm-generic.h`.
- Simplified context saving/restoring in `context_gcc.h` and related files.
- Optimized `rt_hw_context_switch_interrupt` and related assembly routines.

Signed-off-by: Shell <smokewood@qq.com>
2024-07-18 17:41:48 +08:00
zhao maosheng a6b2014214 fix exec and mount error code 2024-07-18 13:25:37 +08:00
zhao maosheng 393a61b048 Fix potential return value discrepancy when writing to urandom 2024-07-18 10:05:05 +08:00
Shell f6f570df74
Merge branch 'master' into shell/rv64-tick 2024-07-17 09:39:54 +08:00
zhuzhuzhu 4ad194bb47
[fix] fix cromfs read out of mem range (#9197)
Update dfs_cromfs.c
2024-07-17 09:08:10 +08:00
Shell 1d78d11567
[smart] feat: add unmap for null mapper (#9186)
Do unmap before shrink so we don't see mapped entry on page table
insertion, which is not acceptable for riscv implementation of
architecture porting.

Changes:
- add un-mapping of pte on `_null_shrink()`

Signed-off-by: Shell <smokewood@qq.com>
2024-07-16 20:38:55 +08:00
Shell 1b581d0755
[dfs] Mark dirty on unmap on shared mapping only (#9195)
[dfs] feat: Mark dirty on unmap for shared mapping

This patch optimizes the pcache varea management by refining the
conditions under which pages are marked dirty, specifically targeting
the unmap operations in the dfs_pcache component. These changes were
necessary to enhance the efficiency of page cache management.

Changes:
- Adjusted include statements in `dfs_pcache.c` for better organization.
- Modified `dfs_aspace_unmap` function:
  - Added a check to ensure `varea` is not privately locked before marking a page as dirty.
- Updated `dfs_aspace_page_unmap` function:
  - Added a similar check for `varea` lock status before marking a page as dirty.

Signed-off-by: Shell <smokewood@qq.com>
2024-07-16 17:03:54 +08:00
rcitachi 14fb55933b
[lwp][vdso] Add VDSO functionality under the aarch64 architecture (#9176)
Add VDSO functionality under the aarch64 architecture
2024-07-15 17:58:29 +08:00
Shell 65ffe4e13e [libcpu/rv64] feat: unify tick.c
The changes unify the tick.c implementations for all risc-v64
architectures, leveraging the CPUTIME feature. This refactoring was
necessary to streamline the codebase, and ensure consistent timer
handling across different platforms.

Changes:
- Updated `Kconfig` in `bsp/cvitek/cv18xx_risc-v` to fix formatting issues.
- Updated .config for BSPs to update `CPUTIME_TIMER_FREQ`
- Updated header of for API `riscv_cputime_init`
- Initialized riscv timer on `rt_hw_tick_init`
- Refactored `tick.c` and `tick.h` in `libcpu/risc-v/t-head/c906` and `libcpu/risc-v/virt64`:
  - Replaced direct use of `rdtime` with `clock_cpu_gettime`.
  - Removed redundant timer frequency definitions.
  - Added static assertions to check the value of `CPUTIME_TIMER_FREQ`.
  - Initialized `tick_cycles` based on `CPUTIME_TIMER_FREQ`.
  - Integrated `ktime` support for tick initialization.

Signed-off-by: Shell <smokewood@qq.com>
Reviewed-on: https://github.com/RT-Thread/rt-thread/pull/9164
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
2024-07-15 12:06:39 +08:00
wdfk-prog ca4645000a [components][fal]Log warning for block partition exceeding flash length 2024-07-14 22:51:08 +08:00
zms123456 4e8b8290ab
[driver][virtio]fix virtio net rx error (#9170)
fix virtio net rx error
2024-07-13 22:16:03 +08:00
sakumisu 4122f6d8b8 fix(cherryusb): fix typo 2024-07-12 20:31:31 +08:00
wdfk-prog 6e7cf3a608 [components][SPI][spi-bit-ops]修复可能的异常操作
* 移除初始化时未进行引脚初始化就进行引脚设置可能导致的异常
* CS引脚配置判断完善
* xfer返回值优化
2024-07-12 17:48:17 +08:00
Shell beee77f372
feat: support ARCH_REMAP_KERNEL on libcpu/c906 (#9123)
feat: [libcpu/c906] support ARCH_REMAP_KERNEL

This change was necessary to enable the remapping of the kernel image to
a high virtual address region on the c906 platform.

Changes:
- Introduced new configuration options `ARCH_REMAP_KERNEL`, and
  `ARCH_USING_ASID` under the `ARCH_RISCV64` section.
- Updated MMU initialization and switching functions to incorporate
  remapping handling.
- Modified page table setup for proper memory attribute settings.
- Added support for early memory setup, kernel remapping
- Added conditional compilation for ASID support in the `rt_aspace` struct,
  since this is not enable currently for most architecture.

Signed-off-by: Shell <smokewood@qq.com>
2024-07-11 11:00:04 +08:00
wdfk-prog 15a8ebe0a0
[components][driver][can]Fix possible memory overflow caused by RX
修复RX可能导致的内存溢出情况

#8634
2024-07-09 20:22:37 +08:00
Shell 3f6960b7f5
[smart/tty] skip configure of rt_serial on tty open (#9152)
Skip configure on open since all configs are copied from the current
configuration on device. So we don't bother to set it back to device
again.

Changes:

- test and skip configuration on open() of tty device

Signed-off-by: Shell <smokewood@qq.com>
2024-07-09 13:28:24 +08:00
LaterComer 4d0b048c97
[fixed]serial_v2.c兼容DFS_V2接口 (#9153) 2024-07-09 12:10:08 +08:00
Evlers 755cde372c fix a bug that read members in non-existent functions 2024-07-05 10:51:17 +08:00
Evlers 7d7993f940 fix an issue where repeated remove of card resulted in assertions 2024-07-05 10:51:17 +08:00
zhao maosheng 95aa97714b fix initrd scan err 2024-07-04 00:34:01 +08:00
sakumisu cc853de5f3
Update cherryusb to v1.3.1 (#9122)
* fix(hpmicro): remove duplicate usb variable

* update(cherryusb): update to v1.3.1
2024-06-30 08:01:51 +08:00
Shell 90917cc75a
[format] cleanup libcpu/aarch64 (#8950)
* [dfs] fixup compiler warning

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

* [format] libcpu/arm64: separate context switching codes

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

* [format] libcpu/arm64: separate vector

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

* [format] libcpu/arm64: separate context_gcc.S

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

* [format] libcpu/arm64: moving headers to include directory

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

* style: replace tab with space

---------

Signed-off-by: Shell <smokewood@qq.com>
2024-06-28 00:23:09 +08:00
Shell 3d8c27bcc9
[ktime] quality: remove recursion on hrtimer (#9110)
[ktime] feat: remove recursion on hrtimer

Replace recursive algorithm with a loop in hrtimer
when determining next timeout event and setup hr timer.

Signed-off-by: Shell <smokewood@qq.com>
2024-06-28 00:22:06 +08:00
wdfk-prog 28c7522e26 [drivers][serial V1]poll tx 增加异常退出机制 2024-06-27 00:11:18 +08:00
Rui 3b1d4e9222
fix Compilation error in "driver.c", "completion_up.c", "syslog.c" and "dlmodule.c". (#9093) 2024-06-26 23:25:23 +08:00
yiyi bc3afab2c9
[bsp][stm32]Optimize ADCs and fix some bugs 2024-06-26 20:26:52 +08:00
zms123456 b785ef9ed7
[libcpu][aarch64]memory setup using memblock (#9092)
* memory setup using memblock

* map pages later
2024-06-26 14:36:49 +08:00
heyuanjie87 a5a89c439f
[rv]修正signal退出后用户态sp少8的问题 (#9080) 2024-06-24 21:36:32 +08:00
wdfk-prog 5b64870507 [components][msh]msh命令失败添加打印日志 2024-06-24 10:56:48 +08:00
wdfk-prog f61c7085f7 [components][ringbuffer]修复编译错误 2024-06-24 10:55:16 +08:00
zms123456 22b5e5fd7b
[components][ktime]support period ktime timeout and multiple ktimer_hrtimer (#8972)
* support period time

* enable multiple ktimer

* mv set delay_cnt to hrtimer_start

* add ktime debug info

* change current_irq_begin to local var

* fix bug: setting current timer and setting timeout in driver aren't atomicly

* create->init

* refactoring ktime
2024-06-23 22:08:54 +08:00
Shell 5c1e5d2fca
[finsh] add msh command to bind thread to specific core (#9085)
[finsh] add msh command bind

Signed-off-by: Shell <smokewood@qq.com>
2024-06-23 22:02:56 +08:00
Shell fa2d80679e
[smart] add mprotect config (#9082)
Signed-off-by: Shell <smokewood@qq.com>
2024-06-22 13:30:55 +08:00
heyuanjie87 06ad67d549
[rv]信号处理进入用户态前恢复gp (#9072)
* [rv/virt/stackframe.h]添加GP寄存器保存偏移量宏

* 【rv/c906/stackframe.h]定义GP寄存器存储偏移量

* [rv]信号处理切换到用户态前恢复gp
2024-06-21 09:09:41 +08:00
latercomer d58c29d23e 除了bsp之外的Kconfig使用rsource替代source 2024-06-20 14:40:42 +08:00