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>
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>
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>
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>
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>
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>
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>
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>
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>
1. Use reserved[0] filed in struct fw_rsc_vdev and the driver
master/slave to judge the device role;
2. Use struct fw_rsc_carveout in resource table to provide the
share memory to virtio driver side;
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>
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>
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>
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>
Signals in NuttX serve two primary purposes:
1. Synchronization and wake-up:
Signals can be used to block threads on specific signal sets and later
wake them up by delivering the corresponding signals to those threads.
2. Asynchronous notification:
Signals can also be used to install callback handlers for specific signals, allowing threads to
asynchronously invoke those handlers when the signals are delivered.
This change introduces the ability to partially disable signal functionality: to disable only signal functions for
Asynchronous notification, keeping functions for Synchronization and wake-up.
This enables finer-grained control over signal usage while preserving existing behavior for supported use cases.
Co-authored-by: Guo Shichao guoshichao@xiaomi.com
Signed-off-by: Chengdong Wang wangchengdong@lixiang.com
The rwcnt (read word count) field in ctucanfd_frame_fmt_s was previously
limited to 4 bits, allowing a maximum value of 15. This is insufficient
to correctly represent the frame size (excluding the FRAME_FORMAT word)
for larger CAN FD frames as required by the CTU CAN FD hardware.
Increase the rwcnt bitfield width to support a larger range and adjust
the structure layout so that ctucanfd_frame_fmt_s has a size that is a
multiple of 4 bytes, as required by the hardware interface.
This change improves correctness and robustness when handling larger
CAN FD frames without affecting existing users.
Signed-off-by: xucheng5 <xucheng5@xiaomi.com>
We have added a defconfig configuration to set the page size of the flash.
According to the CFI protocol, the flash supports a single write operation
with a data volume ranging from byte size up to the maximum number of bytes.
However, the MTD device structure requires defining a page size, which serves
as the minimum write unit of the flash. Hence, this configuration is introduced.
Any page size within the range of 1 to the maximum number of bytes is considered
valid.
Signed-off-by: jingfei <jingfei@xiaomi.com>
Write 0xffffffff to the BAR when probing resource size, so the
returned mask is computed correctly.
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
Fix compilation error in optee_va_to_pa() caused by undefined 'struct addrenv_s'
type when CONFIG_ARCH_ADDRENV is enabled. Add the missing nuttx/addrenv.h header
to provide the required type definition.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
avoid race conditions when the rpmsg thread and network card thread
access the rxqueue simultaneously.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
It's the first simple version of rpmsg-net, include:
- Transfer command with data copy (maybe optimize later), no need to ack
- Control command with ack, but only ifup/ifdown no need to ack
- Client side: Another module can call `net_rpmsg_drv_alloc` to
create netdev and register it.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
Now the rpmsg router transport also support get the signals, and
this signals value is modified by other physical rpmsg transport
(port, virtio) other routed by the rpmsg router.
Signed-off-by: yintao <yintao@xiaomi.com>