Commit Graph

60553 Commits

Author SHA1 Message Date
daichuan d2dde8a29a net/netdev: modify for hardware checksum offload
Implementation of main hardware verification and uninstallation functions

Signed-off-by: daichuan <daichuan@xiaomi.com>
2026-01-19 23:22:46 +08:00
yangao1 9903b11656 drivers/rpmsg: remove unnecessary header files, revise make.def and cmake
Already copy the rpmsg_internal.h from openamp to the nuttx/include,
so do not need add the include patch for .c files.

Signed-off-by: yangao1 <yangao1@xiaomi.com>
Signed-off-by: wangshaoxin <wangshaoxin@xiaomi.com>
2026-01-19 23:14:53 +08:00
hujun5 ee39e7a4a2 sched/group: add spinlock in group_childstatus.c
Add spinlock protection to child task pool allocation and deallocation in
group_childstatus.c. Protects g_child_pool freelist and group child list
traversal/modification operations against concurrent access in SMP systems.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-19 23:14:25 +08:00
zhangshuai39 1c2d1c579f simwifi: Fix compilation warning
Added the `<nuttx/kmalloc.h>` header file and fixed the implicit conversion issue.

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2026-01-19 12:14:18 -03:00
raiden00pl 1f8bb966c3 drivers/serial/Kconfig-16550: fix non-existent option
there is no SERIAL_DMA option, it was removed long time ago in:
0d203fd535

It should be SERIAL_TXDMA and SERIAL_RXDMA

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-01-19 16:12:25 +01:00
raiden00pl 8a5f646029 boards/qemu-intel64/jumbo: enable procfs ACPI
enable export of ACPI tables with procfs:

nsh> ls proc/acpi
/proc/acpi:
 FACP
 DSDT
 APIC
 MCFG

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-01-19 14:46:34 +01:00
raiden00pl f19b28d3d2 arch/x86_64/x86_64_acpi_procfs.c: fix build warnings
fix warnings:

CC:  intel64/intel64_schedulesigaction.c common/x86_64_acpi_procfs.c:121:3: warning: excess elements in struct initializer
  121 |   0444
      |   ^~~~
common/x86_64_acpi_procfs.c:121:3: note: (near initialization for ‘g_acpi_procfs’)
common/x86_64_acpi_procfs.c:129:3: warning: excess elements in struct initializer
  129 |   0
      |   ^
common/x86_64_acpi_procfs.c:129:3: note: (near initialization for ‘g_acpi_file_procfs’)

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-01-19 14:46:34 +01:00
liwenxiang1 681bfa6b54 arch/x64:add up_set_irq_type
Build Documentation / build-html (push) Has been cancelled
add up_set_irq_type interface

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-01-19 19:09:52 +08:00
zhangyu117 9685403038 arch/tricore: modify gpsr init process
for some chips like tc4xx there also corecs, so need init it too.

Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
2026-01-19 17:51:48 +08:00
zhangyuan29 4775d6dceb arch/tricore: support up_trigger_irq
Enable gpsr and use gpsr to support multicore irq trigger.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-01-19 17:51:48 +08:00
zhangyuan29 f44060ca9f arch/tricore: support minimal vectortalbe in tricore
The SRN number in TriCore far exceeds the PN number.
Using IRQ as the PN number would result in an overflow.
Therefore, MINIMAL_VECTORTABLE is used to ensure that
the PN number does not overflow.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-01-19 17:51:48 +08:00
zhaoxingyu1 f40dfc7234 fs: add fs dump in ROMFS/LITTLEFS
add read/write double check in ROMFS/LITTLEFS file system

Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
2026-01-19 16:40:57 +08:00
wangjinjing1 18820ef07d net/can: allow errmask to be set to CAN_ERR_FLAG;
For the LIN protocol, the error frame ID can be 0. This change is to ensure that all LIN error frames can pass the filter.

Signed-off-by: wangjinjing1 <wangjinjing1@xiaomi.com>
2026-01-19 15:13:14 +08:00
xuxin19 d39ed19213 cmake(bugfix):elf link should depends on starupobjs crt0.o
fix the correct dependency sequence to prevent
startupobjs from not being generated before ELF linking.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 df6505567c elf(bugfix):fix elf compile link error when enable LTO
fix compilation errors when enabling the LTO linker

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 b34a221121 cmake(bugfix):unify cmake application elf link rule
separate three elf link modes:
kernel elf: kernel build link all user libs and startup obj
loadable elf: `m` build dont link user libs minimize size but link
startup obj
dynlib elf:do not link user libs and startup obj

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 00e79122af cmake(enhance):cmake support DYNLIB build
add `DYNLIB` option for nuttx_add_application for dynamic loadable lib

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 a7c6f589f9 cmake(bugfix):fix sim loadable elf build support
1.add sanity check for START_OBJS
2.make laodable -e entry setting in each arch elf.cmake
3.add sim elf.cmake

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 f589a02e3e cmake(bugfix):add x86_64 arch cmake loadable mod support
supplementing the implementation of loadable construction for x86

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 63dc48e713 cmake kernel build(bugfix): remove unused section in elf link
this will reduce the size of elf

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 d676716e7a cmake(feat):separate ELF output bin and bin_debug
bin for striped elf

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 6fa3031d9b cmake(feat):define elf option and enable apps module build
1.define elf option setting function ext;
2.unify loadable elf and kernel elf build config

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 885ff780c5 cmake(bugfix):fix KERNEL mod elf target dup with lib target
Using the same name as elf may lead to duplicate errors.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 197149a297 cmake(bugfix):use apps_post to identify the stage of app completion
nuttx_post for all target done
apps_post for all apps lib done

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 70bddf61c3 cmake(bugfix):rename host tools binary dir to host_bin
we will use CMAKE_BINARY_DIR/bin for apps elf
so we need to change host tools to bin_host

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
xuxin19 b7582b8da1 cmake(feat):implements KERNEL mode in CMake build
1.add application link dependencies for all elf
2.add a global custom target to hold proptry in the toolchain file
3.add startup obj target
4.fix cpp lds error with kernel mod link elf lds

usage:
./build.sh qemu-armv7a:knsh --cmake
elf install in ${CMAKE_BINARY_DIR}/bin

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-19 14:45:37 +08:00
hujun5 a2d2a49ba9 sched/irq: align irq work queue stack buffer
Add aligned_data(STACK_ALIGNMENT) attribute to g_irq_work_stack buffer declaration
in irq_attach_wqueue.c. Ensures stack memory is properly aligned to architecture
requirements, preventing unaligned stack addresses that could cause data access
faults or performance degradation on strict alignment architectures.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-19 14:43:43 +08:00
hujun5 8bb250a4c0 arch: move STACK_ALIGNMENT to irq.h
Move STACK_ALIGNMENT macro definitions from architecture-specific internal
headers to public irq.h headers. This enables common code to directly access
STACK_ALIGNMENT without requiring internal header inclusion, improving code
organization and reducing header dependencies. Applies to all architectures:
ARM, ARM64, AVR, HC, MIPS, or1k, Renesas, RISC-V, SIM, SPARC, TriCore, x86,
x86_64, Xtensa, Z16, and Z80.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-19 14:43:43 +08:00
hujun5 79c349b779 sched/task: fix task_exit regression with critical section state
Move nxsched_switch_context() call after setting TSTATE_TASK_INACTIVE to ensure
proper IRQ count state before context switching, preventing assertion failures
in enter_critical_section() when rtcb->irqcount is incorrectly zero during termination.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-19 14:39:45 +08:00
wangmingrong1 d757fe06f1 arm64/toolchain: fix compile warnning
Configuration/Tool: qemu-armv8a/mte
5282026-01-16 13:11:30
529------------------------------------------------------------------------------------
530  Cleaning...
531  Configuring...
532  Building NuttX...
533Makefile:142: target 'arm64_hwdebug.o' given more than once in the same rule
534Makefile:142: target 'arm64_hwdebug.o' given more than once in the same rule
535Makefile:142: target 'arm64_hwdebug.o' given more than once in the same rule
536Makefile:142: target 'arm64_hwdebug.o' given more than once in the same rule
537Makefile:142: target 'arm64_hwdebug.o' given more than once in the same rule
538

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2026-01-19 14:27:02 +08:00
Bowen Wang 949b519aa5 Documents/rptun: add the new rptun framework documents
Rmove the old rptun document and add new folder to add the new
rptun frameworks documents.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 1fa6a43a40 openamp: optimize virtqueue_notification() called condition
1. call virtqueue_notification() only when buffer exist to avoid unnecessary
calls to virtqueue callback.

2. call virtqueue_notification() only when vq != NULL, because
rproc_virtio_notified() may be called when the virtqueues is not created:
virtqueue created in the virtio/vhost driver but the virtio devices
has been added to the remoteproc virtio devices list after the remoteproc
transport layer create the virtio devices.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 143c5715c0 drivers/rptun: it's not error when no carveout for virtio device
Because virtio device do not need manager the share memory heap
for now.

But later we will make the virtio device be able to manager a
standalone heap, so let this logic can be easily to extend.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Yongrong Wang 67ba360344 rptun.c: fix the problem of blocking the creation of virtio devices
If there are multiple virtio devices in rsc, it must wait for the previous
device to be created before creating the next one. In this case, if the
driver configuration of a device is not be set Y, the subsequent virtio
devices cannot be created.

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2026-01-19 14:18:27 +08:00
pangzhen1 42bf54b24c rptun: add configuring the stack of rptun as static
Support use the drivers provided stack to initialize the rptun
kthread.

Signed-off-by: pangzhen1 <pangzhen1@xiaomi.com>
2026-01-19 14:18:27 +08:00
Xiang Xiao 9767b20251 rptun: Align command value with rpmsg_virtio_lite
so we can mix rptun and rpmsg_virtio_lite in the same system.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang e369bce787 drivers/rptun: add panic and reset method for new rptun framework
Use share memory to send PANIC and RESET command to peer if the rptun
driver do not support panic() and reset ops.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang ffb18cd25a drivers/rptun: should free the image buffer if open failed
Memleak Bug fix, when file_read() failed in rptun_store_open(),
memleak occur.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang c724618705 drivers/rptun: should use KRN_HEAP to intialize the carveout heap
Previous patch is not corrected:
5518135: mm/mm_heap: add nokasan flag in mm_heap_config_s structure |
https://gerrit.pt.mioffice.cn/c/vela/nuttx/+/5518135

Because rptun do not want part of the share memory is used by the
struct mm_heap_s to:
1. Save the share memory;
2. Some platfrom can't use atomic operation at the share memory,
and struct mm_heap_s contains a mutex.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 239130c1fd mm/mm_heap: add nokasan flag in mm_heap_config_s structure
Support enable/disable the kasan when initialize the heap.
This requirement is from rptun, because rptun use share memory init
the heap and share memory is precious, so we need disable the kasan
feature for rptun's heap to save the share memory.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang e686a3ac42 mm/mm_heap: use struct mm_heap_config_s to init the memory heap
To avoid add new parameters to the mm_initialize_heap() and
mm_initialize_pool()

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
yinshengkai 32f504c8f5 fs: heapfs enables mempool by default
Because fs always need malloc the small memory for inode or filep,
so enable the mempool by default to optimize the memory
fragmentation issue.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wnag f456e0b637 drivers/rptun: move the heap out of the share memory
Because heap->lock will use atomic operation and may can't use in
share memory.

Signed-off-by: Bowen Wnag <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
anjiahao 6ed4ea63d8 mm: support mm_initialize_heap to specify a specific heap pointer
Support user pass it own heap struct to the mm_initialize_heap() to
avoid the heap struct is reserved from the heap range

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 7c484d6436 rptun/configs: refersh the sim/qemu rpmsg configs for new rptun framework
Now the sim, qemu-armv7a, qemu-armv8a can work with the new
rptun framework.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 2eaf5de3d9 drivers/vhost-rng: fix the vhost-rng compile error
1. Include the <nuttx/spinlock.h> beacause vhost-rng used spinlock
2. Remove the unused ret;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Yanfeng Liu 01b308a146 drivers/vhost: fix cmake typos
This fixes filename typos in drivers/vhost/CMakeLists.txt

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 4ded8df3d5 virtio and vhost-rpmsg: add virtio and vhost rpmsg device support
virtio and vhost rpmsg device as standalone device registered to
the virtio and vhost bus.

virtio-rpmsg and vhost-rpmsg use the common virtio_rpmsg_common.c
implementation in rpmsg dir.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 6003369ceb rptun/rptun_ivshmem: use dynamic local and remote cpu name in rsc table
the local cpuname and remote cpuname for rpmsg virtio device should
not be fixed.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 4326a8520d rptun/rptun_ivshmem: compaliable with linux remoteproc framework
1. modify the da to FW_RSC_U32_ADDR_ANY, linux support daynamic calculate
the da when da == FW_RSC_U32_ADDR_ANY;
2. modify the carveout name to vdev%dbuffer, linux remoteproc framework
use these fixed name to handle the craveout for virtio devices;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00