Commit Graph

60599 Commits

Author SHA1 Message Date
Yongrong Wang 911ab7c55b drivers/rptun and rpmsg_virtio: remove cmd initialize
don't need initialize in sim

Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2026-01-19 14:18:27 +08:00
wangzhi16 8c8e837230 arch/*_rptun.c: port all the chip's rptun driver to new rptun framework
New rptun framework need provide the carveout device to provide
the share memmory.

And need add the cpuname feature for rpmsg virtio device to let
rpmsg virtio can know remote cpuname.

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 728a61437a drivers/rptun_bmp: port rptun_bmp to the new rptun framework
rptun_bmp can work with the new rptun framework

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
wangshaoxin c962bb0f5d drivers/rptun: call rpmsg_virtio_probe() in rptun to save code size
Call rpmsg_virtio_probe() directly if device is is rpmsg virtio
and config CONFIG_DRIVERS_VIRTIO/VHOST are not enabled, so the
virtio/vhost frameworks related code do not need be compiled and
used, and can save the code size if user only want to use rpmsg
virtio device.

Signed-off-by: wangshaoxin <wangshaoxin@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Xiang Xiao d7f3e41b13 Revert "rptun/rptun_ivshmem:add restart cmd to reboot slave"
This reverts commit 4fa1c460d3.
to reducing the complexity of rptun driver.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 109a3a090c drivers/rptun: do not reserve memory for vring when vring->da is specified
When vring->da is specified, do not need reserve the memory for the vring,
so do not need increase the shmbase and leave more share memory to the
carveout.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 7ba6425933 drivers/rptun: remove rpmsg virtio deivce in rptun
Now rptun only as remoteproc and remoteproc_virtio transport layer,
because the rpmsg virtio device should be a stand alone virtio/vhost
driver in the virtio bus

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 7c840bc405 drivers/rptun: remove the power managerment code in rptun
Preparation for the rptun framework refacator

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang e20a05dce2 drivers/rptun: add rptun debug config macros and Kconfig
rptun and rptun driver can use this macro to add debug log

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 3c0a4639ca openamp: rpmsg virtio use virtio_alloc_buf to alloc share memory
So rpmsg virtio can alloc share memory from the virtio transport
layer and can work with various transport layer.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 1d66a0bc4a openamp: support include the openamp headers in nuttx
copy all the openamp headers to nuttx, make nuttx code can include
all the openamp headers to fix the compile error

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 4c06a2768d openamp: add mm_priv to struct virtio_device
now the virtio device can set it's own memory private data, and
can use this private data to store the memory manager handler

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang 0a26f09c6b openamp: make the remoteproc virtio fit more virtio devices
1. add cpuname config for the rpmsg virtio devices, so the rpmsg virtio
driver can get the local and remote cpuname from the virtio config
space, and we can distinguish the differnt channel when there are
two rpmsg virtio devices in the same resource table;
2. optimize the remoteproc virtio transport layer to make it can
work with all the virtio devices instead only work with rpmsg virtio
devices;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
Bowen Wang a98dc94f93 rpmsg/rpmsg_virtio: add rpmsg virtio common implementation
This is the virtio-rpmsg and vhost-rpmsg common implementation for
VirtIO-Rpmsg: drivers/virtio/virtio-rpmsg.c
Vhost-Rpmsg: drivers/vhost/vhost-rpmsg.c

Later we will seperate the rpmsg virtio from the rptun framework to
make the rpmsg virtio can work with all the virtio transport layer.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-01-19 14:18:27 +08:00
makejian d15081838b crypto/cryptodev: support private data in driver
Add support for storing driver-specific private data in the crypto
driver structure. This allows crypto drivers to maintain session
state and other driver-specific information.

Signed-off-by: makejian <makejian@xiaomi.com>
2026-01-19 14:17:38 +08:00
makejian 3ce3d4cb20 crypto/blake2s.h: fix tasking compile warning
Fix unexpected text after preprocessing directive compilation warning
in blake2s.h header file.

Signed-off-by: makejian <makejian@xiaomi.com>
2026-01-19 14:16:25 +08:00
makejian 043ef0dd3a crypto/cryptosoft: replace macro howmany with common macro div_round_up
Replace the non-standard howmany macro with the common div_round_up macro
for consistency and better code maintainability.

Signed-off-by: makejian <makejian@xiaomi.com>
2026-01-19 14:16:00 +08:00
makejian 38ba0abc49 arch/tricore: support cache function
Add cache operation support for TriCore architecture including:
- Instruction cache (I-Cache) enable/disable functionality
- Data cache (D-Cache) enable/disable functionality
- Cache configuration and management interfaces
- Performance events integration with cache operations

Signed-off-by: makejian <makejian@xiaomi.com>
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-01-19 14:13:27 +08:00
ouyangxiangzhen 1502e6da15 arch/intel64: Fix coverity.
This commit fixed mulitply-overflow in frequency calculation.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-19 14:12:09 +08:00
ouyangxiangzhen efa0ae5275 list: Fix the list conflicts.
This commit is workaround for the list conflicts introduced by the wqueue and wdog. By spliting the list type definition and the list implementation, we can avoid the list conflicts with user-defined lists.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-19 14:12:09 +08:00
ouyangxiangzhen 57a12556d2 list: Optimize the list structure.
Since lists are traversed sequentially in most cases, moving the next pointer before the prev pointer can optimize memory access on some architectures.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-19 14:12:09 +08:00
makejian 35886c18ab nuttx/mutex: correct documentation for nxmutex_destroy
Correct and clarify the documentation note for nxmutex_destroy function
to properly document behavior and safety considerations in OS context.

Signed-off-by: makejian <makejian@xiaomi.com>
2026-01-19 14:10:42 +08:00
liwenxiang1 e074c865bc arch/x86_64: add poweroff functionality
add poweroff feature

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-01-19 14:10:12 +08:00
liwenxiang1 c774939c9e arch/x64: add acpi procfs
add acpi procfs function

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>

arch/x64:Fix the issue of dereferencing before null check

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-01-19 14:10:12 +08:00
likun17 28661273a3 drivers/sensors: Added virtual sensor flag to prioritize reading
of driver information.

When the local core is a virtual sensor, attempt to retrieve
information from a remote core.

Signed-off-by: likun17 <likun17@xiaomi.com>
2026-01-19 12:22:46 +08:00
likun17 96647f0ed7 drivers/sensors: Fixed O_DIRECT flag triggering rpmsg cross-core.
Fixes the issue of cross-core IPC being triggered when using
O_DIRECT in non-cross-core scenarios.

Signed-off-by: likun17 <likun17@xiaomi.com>
2026-01-19 12:22:46 +08:00
dongjiuzhu1 8afca79359 drivers/sensors: add sensor_device_info when sensor_regsiter by usensor.
The logic for obtaining the info and configuring the user buffer
have been optimized.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
Signed-off-by: likun17 <likun17@xiaomi.com>
2026-01-19 12:22:46 +08:00
v-zhangxiaomeng5 cc1c033df2 libs/libxx: change libcxxmini to libminiabi
libcxxmini shall not stay the same layer of LIBCXX, move it down to ABI library layer.

Signed-off-by: v-zhangxiaomeng5 <v-zhangxiaomeng5@xiaomi.com>
2026-01-19 10:48:50 +08:00
liwenxiang1 89eddf6396 arch/x64: create qemu chip
Create QEMU chip and rename intel64 directory to qemu

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-01-19 10:46:09 +08:00
hujun5 e143acfc46 sched/irq: handle NULL ISR handler in irq_default_handler
Add null-check for ISR handler before invoking in irq_default_handler.
Fix comment documentation and initialize return value to IRQ_WAKE_THREAD.
Ensures safe handler invocation when isr parameter is NULL in threaded IRQ mode.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-19 02:02:48 +08:00
Alan Carvalho de Assis 0e5323370f drivers/usbhost_hidkbd: Fix small typo in usbhost_hidkbd.c
Build Documentation / build-html (push) Has been cancelled
There were missing quotes for key "backspace" for scancodes.
This issue was found by github user @StagiaireAbritek

He opened an PR in github to fix it:
https://github.com/apache/nuttx/pull/15917

However he decided to abandon and close the PR, but because it is
an important fix I decided submit it upstream.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-01-18 11:57:58 -05:00
hujun5 a640dd49d2 armv7-a/arm_addrenv_pgmap.c: add up_addrenv_find_page and up_addrenv_user_vaddr
Add two new address environment utility functions in arm_addrenv_pgmap.c:
- up_addrenv_find_page(): Find physical page mapped to user virtual address
  from address environment page directory (stub implementation for future use)
- up_addrenv_user_vaddr(): Check if virtual address is in user space by calling
  arm_uservaddr(). Enables common code to query user address space boundaries
  on ARMv7-A architecture.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-18 23:06:13 +08:00
hujun5 7e02f08a83 arm64: fix stack pointer initialization when CONFIG_STACK_COLORATION disabled
Add else clause to advance stack pointer (x24) by SMP_STACK_SIZE when
CONFIG_STACK_COLORATION is not defined in ARM64 boot code. Ensures each
CPU's stack is properly skipped in multi-core initialization even when
stack coloration/validation is disabled, preventing stack corruption from
overlapping CPU stacks.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-18 23:05:37 +08:00
hujun5 6f4cb9f457 sched/task: move kernel stack allocation to task initialization
Move kernel stack allocation from exec_module() (binary format execution) to
nxtask_init() (task initialization) with proper type checking. Add conditional
check to allocate kernel stack only for non-kernel tasks (ttype != TCB_FLAG_TTYPE_KERNEL).
Enables kernel stack allocation for both exec'd tasks and regular task_create()
calls in protected builds, allowing userspace to create tasks with proper kernel
stack isolation.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-18 23:05:11 +08:00
hujun5 a9d9dd2120 arch: enable ARCH_KERNEL_STACK support in protected builds
Expand ARCH_KERNEL_STACK configuration to support both BUILD_KERNEL and
BUILD_PROTECTED modes. Change Kconfig dependency from "depends on BUILD_KERNEL"
to "depends on BUILD_KERNEL || BUILD_PROTECTED". Update pthread_create.c to
remove redundant BUILD_KERNEL check when allocating kernel stacks with
CONFIG_ARCH_KERNEL_STACK enabled. Enables protected builds to use separate
kernel and user stacks for processes.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-18 23:05:11 +08:00
hujun5 835c9c0f77 binfmt: refactor loadable module cleanup mechanism
Remove deprecated group_exitinfo() function and related critical section locking
from binfmt_exec.c, moving module unload setup directly into exec_module() where
it integrates naturally with task activation, simplifying code flow and reducing
unnecessary synchronization overhead.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-01-18 08:30:15 -03:00
makejian 35537cb1a7 tricore/csrm: bringup cpucs in tricore
Add CPUCS bring-up support for TriCore secure core (CSRM) module.
Enables core6 initialization for secure core operations.

Signed-off-by: makejian <makejian@xiaomi.com>
2026-01-18 08:27:38 -03:00
wangchengdong e4ea0a59ea boards: enable CONFIG_ENABLE_ALL_SIGNAL
Enable CONFIG_ENABLE_ALL_SIGNAL to fix build errors

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 8919950326 arch/sparc: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 2a0990bd31 arch/sim: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 00c1946e35 arch/renesas: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong ec2684c885 arch/or1k: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 8df791b057 arch/misoc: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 23fa9b16b3 arch/mips: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong dfd3426aa5 arch/avr: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 9670b17ffd arch/z80: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong d04ca30169 arch/z16: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 1b8d8f7565 arch/xtensa: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 7dbd568477 arch/x86_64: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00
wangchengdong 2d6eef74b5 arch/x86: Add support to disable signals actions related data struct
Add support to disable signals actions related struct

Co-authored-by: guoshichao <guoshichao@xiaomi.com>
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2026-01-18 08:24:13 -03:00