Commit Graph

55396 Commits

Author SHA1 Message Date
fangzhenwei 51623d1751 rpmsgfs: add tty fd ioctl(TCGETS/TCSETS) support
rpmsgfs client ioctl support TCDRN/TCFLSH/TCGETS/TCSETS

Signed-off-by: fangzhenwei <fangzhenwei@xiaomi.com>
2024-10-08 09:00:12 +08:00
Bowen Wang 9b736c1c27 rpmsgfs_server: add error log for rpmsgfs server ept callback
Because the rpmsg_virtio will assert when endpoint callback return
error, so add more error log to the rpmsgfs server to help to locate
the root cause.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 09:00:12 +08:00
ligd 057e608bb8 rpmsgfs: remove memcpy in rpmsgfs open/close
improve the rpmsgfs performance

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 09:00:12 +08:00
ligd 07b27cd199 sched: swap setting for g_npidhash
in case of crash in kmm_zalloc, and crash dump use
nxsched_foreach()

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:59:39 +08:00
ligd aff700f8ca timer: set g_timer.lower after TIMER_START()
in case of up_perf_gettime() get non-start value

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:59:39 +08:00
zhangwenjian 869271f5b8 drivers/note: suport rpmsg transfer channel for note,some note api
need to adapte for rpmsg.

We can transfer note content through rpmsg

Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-08 08:58:43 +08:00
xuxingliang 33a8760a14 arch/sim: fix uart could lose log
Need to loop to write untill all data written or error happened

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-08 08:57:28 +08:00
Xiang Xiao 904bb7a6ea arch/sim: dataheap should disable exec permission
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-08 08:57:28 +08:00
yinshengkai bdcc325e1f sim/gcov: Fix conflicts between fprofile-orderate and __asan_default_options
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-08 08:57:28 +08:00
yinshengkai acca2430a9 Revert "arch/sim: suppress libasan checks"
This reverts commit 53ddc3ef7f

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:57:28 +08:00
ligd a3568af105 sim: fix context-switch when do wdog callback()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:57:28 +08:00
ligd ba3a55b445 cache: do cache_invalidate_all before enable dcache
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-08 08:15:41 +08:00
Bowen Wang e8467a9bd5 fdt_virtio_mmio: bug fix, should not return when ret == -ENODEV
-ENODEV is a normal error code for function virtio_register_mmio_device()
because the virtio device is not must be in the mmio register address

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 08:15:00 +08:00
Bowen Wang e83c7aba1c devicetree/fdt_virtio_mmio: implement the fdt_virtio_mmio_devices_register()
So the borad level do not need implement the
register_virtio_devices_from_fdt() again and again.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-08 08:15:00 +08:00
Michal Lenc dc6f406e7f documentation/inotify: add newly supported events
IN_CLOSE_WRITE and IN_CLOSE_NOWRITE are now supported and IN_MODIFY
can be used for truncate as well.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-10-08 08:14:19 +08:00
Michal Lenc 531dbaf561 fs_close: provide inotify call for close
Close operation on file should lead to IN_CLOSE_WRITE or
IN_CLOSE_NOWRITE notifications. This commits adds the notification
support. Notifying on close is a little bit trickier as a lower layer
may not have the full file path after successful close and inode release.
Calling notification before close is not a solution since close might
not end successfully.

The solution is to obtain and buffer the path before calling close
and then pass the buffered path to the notify_close. This required the
change in notify_close function arguments: filep is no longer
required, path and oflags are passed instead.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-10-08 08:14:19 +08:00
Michal Lenc 939c10ea34 fs_truncate: provide inotify call for truncate
IN_MODIFY event should occur on file modification, which includes
truncate. This is consistent with the inotify usage on Linux.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-10-08 08:14:19 +08:00
raiden00pl c1c5d8d611 arch/arm/stm32{|f7}/socketcan: fix debugassert for extid frames
fix debugassert for extid frames, we have to remove
CAN_EFF_FLAG bit from the expression
2024-10-08 08:14:07 +08:00
Philippe Leduc d186c1cedb Enable C++ toolchain and cxxtest app on xmc4800-relax:nsh config 2024-10-08 08:13:42 +08:00
Philippe Leduc 80e578c9aa Fix ctypes.h locale macro 2024-10-08 08:13:42 +08:00
hujun5 31a3cea64a arch: rename xxxx_pause.c to xxxx_smpcall.c
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 08:13:22 +08:00
hujun5 d8cb7759b6 arch: remove up_cpu_pause up_cpu_resume up_cpu_paused up_cpu_pausereq
reason:
  To remove the "sync pause" and decouple the critical section from the dependency on enabling interrupts,
  after that we need to further implement "schedlock + spinlock".
changelist
  1 Modify the implementation of critical sections to no longer involve enabling interrupts or handling synchronous pause events.
  2 GIC_SMP_CPUCALL attach to pause handler to remove arch interface up_cpu_paused_restore up_cpu_paused_save
  3 Completely remove up_cpu_pause, up_cpu_resume, up_cpu_paused, and up_cpu_pausereq
  4 change up_cpu_pause_async to up_send_cpu_sgi

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 08:13:22 +08:00
hujun5 fc22fb8f53 xtensa: Replace the implementation of up_cpu_pause
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-10-08 08:13:22 +08:00
Almir Okato 2d2f4055c4 riscv/esp32c6: fix rtc text section and wifi ram placement
Signed-off-by: Almir Okato <almir.okato@espressif.com>
2024-10-07 22:39:20 +08:00
Xiang Xiao f838987e44 fs/romfs: Call block_operations::close when romfs_bind fail
to avoid the resource leak

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-07 21:10:07 +08:00
Bowen Wang 79be76a22c serial/uart_rpmsg: should init the lock before call rpmsg_register_callback
To avoid init the lock after this lock has been used.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-07 20:42:44 +08:00
Bowen Wang 262ccbb068 drivers/uart_rpmsg: add recv lock when received the data from peer
The recv buffer is used both in user thread and rpmsg ept->callback
thread, so add recv lock to protect the recv buffer.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-07 20:42:44 +08:00
yintao a1dc6dc7fc driver/uart_rpmsg: clear transmit buffer when remote exception occurred
Make uart rpmsg work normally when restart the remote core

Signed-off-by: yintao <yintao@xiaomi.com>
2024-10-07 20:42:44 +08:00
ligd b3727f67be esp32: fix esp32 wifi bug caused scan failed
tools/configure.sh esp32c3-generic:wifi
wapi scan wlan0
has no return result after couple times

rootcause:
mq_timedsend() return failed because the time valid check error.
the ts_nsec is bigger than 1000000000.
esp_update_time() hasn't consider of the ns > 1s after the adding
calculation

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 20:21:45 +08:00
zhangyuan29 82eca2607a mq: change mqueue msg mail to dynamic array
Change mqueue_msg_s to a dynamic array so that
mqueue msg can be malloc based on the msg size
of the current data when applied dynamically.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-07 20:20:13 +08:00
simbit18 7db9b47465 Cmake: Improved setconfig support for setting multiple parameters
Improved setconfig support for setting multiple parameters for the .config

Added Cmake and Ninja version info

Modified savedefconfig now behaves with the same logic as the tools/refresh.sh script used for the update stage (make build) on GitHub.
2024-10-07 18:45:22 +08:00
Lup Yuen Lee 69f58de304 CI: Apply the Refactored Build Rules based on Arch Labels
This PR continues to enhance the CI Workflow, to skip the unnecessary NuttX Builds. The PR will update the CI Build Workflow `build.yml`, to call the Refactored Build Rules in `arch.yml` (which is a Reusable Workflow).

The original rules were migrated from `build.yml` to `arch.yml`:
- We target only the Simple PRs: One Arch Label + One Size Label (e.g. "Arch: risc-v, Size: XS")
- For "Arch: risc-v": Build `risc-v-01`, `risc-v-02`
- For "Arch: xtensa": Build `xtensa-01`, `xtensa-02`
- The above rules apply when the PR is Created or Modified
- When the PR is Merged: All targets shall be built

This PR applies the New and Updated Rules defined in `arch.yml`:
- For "Arch: arm": Build `arm-01`, `arm-02`, ...
- For "Arch: arm64": Build `other`
- For "Arch: simulator": Build `sim-01`, `sim-02`
- For "Arch: x86_64": Build `other`
- For Simple PRs (One Arch Label + One Size Label): Skip the macOS and Windows builds (`macos`, `macos/sim-*`, `msys2`) since these builds are costly and slow
- Except for "Arch: Simulator", which will enable the macOS Builds for `sim-01` and `sim-02`
- If GitHub CLI Fails: Build all targets

The code is explained here: https://github.com/apache/nuttx/issues/13775
2024-10-07 18:40:07 +08:00
ligd 5ff332f936 math: remove is_power_of_2() keep IS_POWER_OF_2()
Caused it may conflict with other platfrom

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 18:39:27 +08:00
SPRESENSE 9bfc426321 arch: cxd56xx: Add SD card 4-bit capability
The mmcsd driver has been updated to require SDIO_CAPS_4BIT to be
explicitly specified for SD card 4-bit support.
2024-10-07 17:35:19 +08:00
Neo Xu 0ba4d2c857 Documentation: add segger sysview heap trace example
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang 18d5ae20f5 drivers/segger: add heap data plot
Add heap current used to note.
Plot it in segger sysview data plot.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
Neo Xu b3cc564910 drivers/segger: upgrade segger to v356
From V3.5.6 on, data plot is supported.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang 3bfb40f299 drivers/segger: add heap note support
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang ee11d6ca0a drivers/noteram: fix compile error
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang eac6a8597f sched/note: add note when mm add new region
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
xuxingliang 0663ac1483 sched/note: specify note event for heap instrumentation
1. Add NOTE_HEAP_ prefix for heap note event.
2. Use note type as heap instrumentation parameter.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
yinshengkai 8fecd0385b mm: fix memory statistics error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
yinshengkai 79eab8783f note: add memory tracing event support
Record all memory allocation and release, save to ram, used to analyze memory allocation rate and memory usage
Its absolute value is not trustworthy because the memory will be allocated in thread A and released in thread B

 netinit-5   [0]   0.105984392: tracing_mark_write: C|5|Heap Usage|96|free: heap: 0x606000000020 size:24, address: 0x603000000370
 netinit-5   [0]   0.105996874: tracing_mark_write: C|5|Heap Usage|24|free: heap: 0x606000000020 size:72, address: 0x6070000008e0
nsh_main-4   [0]   3.825169408: tracing_mark_write: C|4|Heap Usage|2177665|free: heap: 0x606000000020 size:424, address: 0x614000000840
nsh_main-4   [0]   3.825228525: tracing_mark_write: C|4|Heap Usage|14977|free: heap: 0x606000000020 size:2162688, address: 0x7f80a639f800
nsh_main-4   [0]   3.825298789: tracing_mark_write: C|4|Heap Usage|15189|malloc: heap: 0x606000000020 size:20, address: 0x6030000003a0

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
lijianjun 9762ddee6e add mm_uninitialize empty implementation for sim
Signed-off-by: lijianjun <lijianjun@xiaomi.com>
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-07 17:34:59 +08:00
buxiasen b444bf2e6a goldfish: fix sched api update missed godlfish_cpuboot
add cmake support

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-07 17:33:14 +08:00
buxiasen 5bf7d0e4a7 goldfish: boot add missing header when CONFIG_SCHED_INSTRUMENTATION
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
wangmingrong1 3e66cc30d0 arch/qemu: up_perf_init depends on CONFIG_ARCH_PERF_EVENTS
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
hujun5 0ed47c5f7e qemu: fix smp boot not enter idle
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
Bowen Wang a952e9ca78 arm/qemu_boot: fix the rpmsg syslog init warning
chip/qemu_boot.c:84:3: warning: implicit declaration of function 'syslog_rpmsg_init_early' [-Wimplicit-function-declaration]
   84 |   syslog_rpmsg_init_early(g_syslog_rpmsg_buf, sizeof(g_syslog_rpmsg_buf));
      |   ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00
Bowen Wang 9e76bc610f arm/qemu_boot: add rpmsg syslog support for qemu armv7a
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 17:33:14 +08:00