Commit Graph

1282 Commits

Author SHA1 Message Date
jiangtao16 c47621e37a sched/wqueue: Fix coverity, MISRA C-2012 Rule 10.1, 10.3, 11.1, 11.3, 11.4(Type conversion).
Signed-off-by: jiangtao16 <jiangtao16@xiaomi.com>
2026-04-21 01:28:19 +08:00
wangshaoxin ff8354a899 rpmsgdev: fixed tasking build issue
Signed-off-by: wangshaoxin <wangshaoxin@xiaomi.com>
2026-04-21 01:25:23 +08:00
rongyichang dd6a01dbea drivers/misc: move poll work to struct rpmsgdev_device_s
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:22:33 +08:00
rongyichang 53203c61c8 drivers/rpmsgdev: support rpmsgdev block read mode
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:22:18 +08:00
Xiang Xiao fe87e2a6af drivers/rpmsgdev: Should create work queue in rpmsgdev_export_with_prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-21 01:22:16 +08:00
Xiang Xiao 86e0892253 drivers/rpmsgdev: Remove the fragmentation support
since most char driver doesn't support the partial raed/write

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-21 01:22:15 +08:00
yezhonghui 0a21bfb689 fix export null issue when rpmsgdev init
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2026-04-21 01:18:43 +08:00
yezhonghui ac33ba63f7 fix rpmsg dev server name too long issue
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2026-04-21 01:18:40 +08:00
rongyichang deebd0f4d4 drivers/rpmsg: add slash check for sepical rpmsg dev
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:15:27 +08:00
liaoao 5efde03e19 rpmsgdev_server: use a separate workqueue to process poll
it will block other works of the list of hpwork when it waits to get buffer for too long. so use a separate workqueue for rpmsgdev.

Signed-off-by: liaoao <liaoao@xiaomi.com>
2026-04-21 01:15:24 +08:00
yezhonghui 9e1c5ad3a3 rpmsgdev destroy distinguish active and passive
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2026-04-21 01:15:04 +08:00
Alin Jerpelea 75a2b5a5f7 drivers: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-21 01:13:35 +08:00
rongyichang 60a13a0385 drivers/misc: fix rpmsg dev poll assert crash
when client read and poll wait buffer from server side and server side may
poll notify more than one times, then rpmsgdev in client side will call
"rpmsgdev_poll_setup(priv, 0, false);" twice which will cause crash in
vela rpmsgdev_server.c

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:13:19 +08:00
openvela-robot 97534cf708 add lin status changes the format of the reported frame and add the macros that lin needs
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2026-04-21 01:10:37 +08:00
openvela-robot 492cec3ec5 nuttx/sim: Fix MacOs build error with argument unused during compilation: '-no-pie'
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:10:31 +08:00
openvela-robot 1f0a222301 sim/m64:Fix ld error with .rodata can not be used when making a PIE object.
/usr/bin/ld: nuttx.rel: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:10:25 +08:00
openvela-robot 80196e894b nuttx: Change the judgment of GCCVER version to greater equal.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:10:19 +08:00
openvela-robot 6c85ce6822 vsprintf:fix bug when print int64 0x8000000000000000
stdio/lib_libvsprintf.c:1018:17: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long long int'; cast to an unsigned type to negate this value to itself
    #0 0x3326a86 in vsprintf_internal stdio/lib_libvsprintf.c:1018
    #1 0x332926b in lib_vsprintf stdio/lib_libvsprintf.c:1363
    #2 0x3777978 in vfprintf stdio/lib_vfprintf.c:52
    #3 0x671b3a0 in printf stdio/lib_printf.c:44
    #4 0x37abc0c in hello_main /data/project/code/vela-pt/apps/examples/hello/hello_main.c:38
    #5 0x33201d3 in nxtask_startup sched/task_startup.c:70
    #6 0x3208ecb in nxtask_start task/task_start.c:134
    #7 0x3357a49 in pre_start sim/sim_initialstate.c:52

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:10:13 +08:00
openvela-robot 78d736af82 arm/toolchain.defs: sync the whole-archive config with community
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-21 01:10:07 +08:00
openvela-robot 47daa79e0b nuttx/x86_64:Add _sinit and _einit initialization.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:10:02 +08:00
openvela-robot 5d60745acb strptime.c:len is not defined.
Bring all code that uses the variable len under the CONFIG_LIBC_LOCALE

Signed-off-by: chenjiahua1 <chenjiahua1@xiaomi.com>
2026-04-21 01:09:56 +08:00
openvela-robot 679535b72f coredump: add architecture-specific registers dump, including NVIC and MPU
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2026-04-21 01:09:50 +08:00
openvela-robot 1dbe459e5f Increase the chance for _assert to work early in the boot 2026-04-21 01:09:43 +08:00
openvela-robot db1bde8907 Doc: Migrate Versioning and Task Names
Migrate
https://cwiki.apache.org/confluence/display/NUTTX/Versioning+and+Task+Names
to the official wiki

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2026-04-21 01:09:38 +08:00
openvela-robot ac763890d3 mm/mempool: Merge two memory requests
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2026-04-21 01:09:31 +08:00
openvela-robot 7e009970ce drivers/segger: inline note_sysview_get_timestamp
Avoid another layer of function call to get time.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:09:12 +08:00
openvela-robot 154f6f9208 cmake(sync):sync cmake Toolchain change from github
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-04-21 01:09:02 +08:00
openvela-robot 36139bb0b5 arch/intel64: optimise context switch
We save interrupted TCB state on tcb->xcp.regs not interrupt stack now
which allows us to remove x86_64_savestate() from up_switch_context()
and other places.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-21 01:08:56 +08:00
openvela-robot 199768d644 note: sync minor differences in community code
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-21 01:08:50 +08:00
openvela-robot 29a809813f Revert "libc/atomic: decoupling atomic and spinlock to avoid recursion"
This reverts commit c37b0de28c96615cb1d5f0251903d89639223444.
2026-04-21 01:08:44 +08:00
openvela-robot 7f4881e106 get g_tcbinfo just use elf memory
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-21 01:08:38 +08:00
openvela-robot 2767a5fedd cmake: add newly added sources to cmake
These newly added files are missing from cmake.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:08:33 +08:00
openvela-robot ebd9346620 sched/signal: exit sig action when tcb group is null
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-04-21 01:08:26 +08:00
openvela-robot 5be1dc755f Doc: Migrate changing the system clock configuration
Migrate the Changing the System Clock Configuration documentation from
the Confluence wiki to the official documentation

Signed-off-by: Ludovic Vanasse <ludovicvanasse@gmail.com>
2026-04-21 01:08:20 +08:00
openvela-robot 88759aa806 rpmsg/rpmsg_virtio: minor fix about rpmsg_virtio
1. code style, add FAR to pointer;
2. code style, add default branch in switch case statement;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:08:13 +08:00
wangjianyu3 92bb6533cc misc/rpmsgdev: The private data should be freed only when endpoint is released
A use-after-free problem occurs when there are multiple remotes in the list `g_rpmsg` and the matching remote is not the last item in the list.

Log
  # Export the device "/dev/LOCAL_DEV" to remote "REMOTE_CPU"
  ap> testdev -d 2 -c "REMOTE_CPU" -l "/dev/LOCAL_DEV"
  [ap] kasan_report: kasan detected a read access error, address at 0x3c3d4740,size is 4, return address: 0x2c33620f
  [ap] kasan_show_memory: Shadow bytes around the buggy address:
  [ap] kasan_show_memory:   0x3c3d46f0: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
  [ap] kasan_show_memory:   0x3c3d4700: aa aa aa aa cc cc cc cc cc cc cc cc cc cc cc cc
  [ap] kasan_show_memory:   0x3c3d4710: 40 47 3d 3c ed 61 33 2c 00 00 00 00 00 00 00 00
  [ap] kasan_show_memory:   0x3c3d4720: 00 00 00 00 00 00 00 00 00 00 00 00 cc cc cc cc
  [ap] kasan_show_memory:   0x3c3d4730: 55 55 55 55 38 00 00 00 02 2c 00 00 cc cc cc cc
  [ap] kasan_show_memory:   0x3c3d4740:[00 00 00 00]66 e0 42 3c cc cc cc cc cc cc cc cc
  [ap] kasan_show_memory:   0x3c3d4750: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
  [ap] kasan_show_memory:   0x3c3d4760: aa aa aa aa 38 00 00 00 01 2c 00 00 cc cc cc cc
  [ap] kasan_show_memory:   0x3c3d4770: 50 57 44 3d 2f 00 cc cc cc cc cc cc cc cc cc cc
  [ap] kasan_show_memory:   0x3c3d4780: cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc
  [ap] dump_assert_info: Current Version: NuttX ****** ***** *** 12.3.0 **********-***** *** ** 2024 **:**:** arm
  [ap] dump_assert_info: Assertion failed panic: at file: kasan/hook.c:187 task: testdev process: testdev 0x2ca20495

  $ addr2line -fe nuttx/nuttx 0x2c33620f
  rpmsgdev_server_created
  /workspace/nuttx/drivers/misc/rpmsgdev_server.c:529
  # Line 529 => strcmp()

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-21 01:08:09 +08:00
openvela-robot 9174e751c2 systick:when isr_handle is NULL will be crash.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2026-04-21 01:07:59 +08:00
openvela-robot 0f462a120f cmake: fix the typo in comments
fix the typo in comments and sync with community

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-21 01:07:53 +08:00
openvela-robot 980658916b build.yml:disable CMake Ninja for Msys2
CI in the msys2 environment, the CMake ninja generator
will have a problem with parameters being too long

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-04-21 01:07:47 +08:00
openvela-robot 227d0f1390 tools/gdb/gdbinit.py:add hint
Signed-off-by: yangao1 <yangao1@xiaomi.com>
2026-04-21 01:07:41 +08:00
openvela-robot 63a654ed6a board/qemu-armv7a: use fdt_virtio_mmio_devices_register() to register mmio devices
Use common implementation to register mmio device

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:07:35 +08:00
openvela-robot d1e9e4fa1c Revert "mq: change mqueue msg mail to dynamic array"
This reverts commit 55f6f5e0af41e96980429c91d45521f7aa553b75.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-21 01:07:29 +08:00
openvela-robot e1ce558054 mps3-an547:add mps3-an547 cmake build
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-21 01:07:23 +08:00
openvela-robot 1ba19fa876 netdb: fix may add duplicate DNS servers
struct sockaddr_in
{
  sa_family_t     sin_family;
  in_port_t       sin_port;
  struct in_addr  sin_addr;
  uint8_t         sin_zero[8];
};

sin_zero is probably a random number.

struct sockaddr_in6
{
  sa_family_t     sin6_family;
  in_port_t       sin6_port;
  uint32_t        sin6_flowinfo;
  struct in6_addr sin6_addr;
  uint32_t        sin6_scope_id;
};

sin6_flowinfo and sin6_scope_id is probably a random number.

Random numbers cause the same server configuration check failed,
so let's initialize it.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:07:17 +08:00
openvela-robot 497c522397 arch: set current regs firstly in undefinedinsn
Need to save the regs firstly in case syslog triggers another crash.
Otherwise we may loose the register contents for the first exception.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:07:11 +08:00
openvela-robot 429974b1f9 sim: fix crash caused by function recursion
114 up_interrupt_context () at /home/zhhyu/source/vela/dev/nuttx/include/arch/irq.h:163
115 stack_monitor_enter (this_fn=0x400145dc <up_current_regs>, call_site=0x4002d5c7 <__cyg_profile_func_enter+120>, arg=0x0) at instrument/stack_monitor.c:63
116 0x000000004002d5c7 in __cyg_profile_func_enter (this_fn=0x400145dc <up_current_regs>, call_site=0x4002d5c7 <__cyg_profile_func_enter+120>) at misc/lib_instrument.c:68
117 0x00000000400156c7 in up_current_regs () at instrument/stack_monitor.c:62
118 up_interrupt_context () at /home/zhhyu/source/vela/dev/nuttx/include/arch/irq.h:163
119 stack_monitor_enter (this_fn=0x400145dc <up_current_regs>, call_site=0x4002d5c7 <__cyg_profile_func_enter+120>, arg=0x0) at instrument/stack_monitor.c:63
120 0x000000004002d5c7 in __cyg_profile_func_enter (this_fn=0x400145dc <up_current_regs>, call_site=0x4002d5c7 <__cyg_profile_func_enter+120>) at misc/lib_instrument.c:68
121 0x00000000400156c7 in up_current_regs () at instrument/stack_monitor.c:62

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:07:05 +08:00
openvela-robot 98a02ad0af add lin error flags to lin.h
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2026-04-21 01:06:56 +08:00
openvela-robot cc56ff55e6 iss-hifi: adapt to new backtrace function
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2026-04-21 01:06:51 +08:00
openvela-robot 16ad5d9d38 nuttx/arch: Enabling ARCH_MATH_H is required when compiling sim with the 13.2 version of the toolchain.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:06:45 +08:00
openvela-robot c479014e6c sigaction: sync with community
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-21 01:06:39 +08:00