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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>