Using RPMsg between Linux and RTOS w/o the presence of Linux remoteproc #657
Replies: 6 comments 5 replies
-
Also in #275 (reply in thread), what is for sure is that without further works, RPMsg can't be used in Linux kernelspace as it relies on remoteproc to parse the resource table and create the VirtIO device accordingly, which enables the creation of But I'm not sure the feasibility for it in Linux userspace. |
Beta Was this translation helpful? Give feedback.
-
Hello Thanks for your question. Remoteproc is setting up vrings and shared memory address in the resource table, which is needed for RPU to create virtio devices. So yes, RPMsg can't be used without remoteproc. RPMsg in userspace with open-amp library: As of now, remote core LCM is not optional if remoteproc is included in the kernel. |
Beta Was this translation helpful? Give feedback.
-
UIO is simple shared memory and interrupt register access directly from user-space. It's not the best way to access remote core as it has limitations like you can't actually multiplex multiple RPU core IPI to same IPI on linux side. Also, Due to direct access of hardware from userspace, the security is also debatable. But, it's very simple and does not involve remote processor life cycle management from linux side. Your use case is valid, and I think in kernel remoteproc, we should introduce a change that allows RPMsg use without life cycle management. As of now, it's possible to do attach-detach operations in remoteproc, and establish RPMsg communication when Remote is already running before Linux. However, this doesn't prevent Linux from stopping remote processor i.e. completely powering off remote processor. @arnopo , @wmamills we should discuss this use case in next openamp-rp call. If you have any inputs please let us know. |
Beta Was this translation helpful? Give feedback.
-
To be clear, I am not suggesting any such thing. I am saying that using UIO is one of the options to achieve RPMsg communication if one must avoid using remoteproc. Here is the documentation from Xilinx: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/2423717889/RPMsg+in+Linux+and+OpenAMP+Project#RPMsg-in-Userspace Here is the discussion that had happened before regarding how to use UIO and RPMsg in linux userspace: OpenAMP/openamp-system-reference#63 |
Beta Was this translation helpful? Give feedback.
-
@foxhoundsk I proposed your use-case in the community call, and we think it is a valid use case. |
Beta Was this translation helpful? Give feedback.
-
Just to update you, I will not be working on this immediately. I will work on it, either end of this year or beginning of next year time frame. If you prefer to implement this feature in remoteproc core framework in linux kernel, then following approach was agreed in the community call:
Thanks. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am on ZynqMP SoC, in which APU runs Linux, RPU runs an RTOS. RPU does not use conventional firmware loading mechanism, which is remoteproc. Instead, the bootloader loads RPU firmware, so the RPU starts execution prior to Linux boot.
With this in mind, it seems that to use OpenAMP RPMsg service, userspace app in Linux shall interact (using ioctl() calls) with the RPMsg interfaces (pseudo files such as /sys/bus/rpmsg/*) in order to create
/dev/rpmsgXXX
file which enables the use of RPMsg in Linux userspace.Also, as mentioned in #275 (reply in thread), OpenAMP in Linux can help with doing the ioctl() calls mentioned above. [1]
However, neither did I manage to find an example doing this in openamp-system-reference, nor in the OpenAMP document/source files.
Is it possible that I can use OpenAMP RPMsg in Linux userspace to communicate with RTOS running on RPU without the use of Linux remoteproc? [2]
Thanks!
[1] Plus, it was mentioned that Linux userspace app
rpmsg_lite
does it but I did not able to find the source file.[2] The RPU runs mission-critical app and need to boot very quick, so I don't want Linux to have capability to do LCM (Life Cycle Management) against RPU, meaning Linux remoteproc should not present in the system.
Beta Was this translation helpful? Give feedback.
All reactions