RPMsg explained

RPMsg (Remote Processor Messaging) is a protocol enabling inter-processor communication inside multi-core processors.

Background

Modern SoCs usually employ heterogeneous processors in Asymmetric multiprocessing (AMP) configurations, each of which may be running a different instance of an Operating system. Typically, SoCs have a central multi-core processor running a high-level OS, such as Linux, in a Symmetric multiprocessing (SMP) configuration, and additional remote processors running various flavors of a Real-time operating system. These remote processors are often used to offload CPU-intensive tasks from the main application processor, or to access hardware blocks otherwise inaccessible by the central processor. RPMsg facilitates communication between the various processors in the system, by providing means of sending inter-processor messages back and forth.

Implementations

RPMsg is present in the Linux kernel,[1] [2] has been demonstrated in Zephyr (operating system),[3] FreeRTOS, Cadence XOS, ThreadX, QNX and is also available as a stand-alone component for microcontroller-based systems.[4] [5] Most of the RPMsg implementations are developed as open-source.[6]

History

RPMsg was developed for the Linux kernel by Ohad Ben-Cohen of Wizery [7] [8] [9] [10] [11] and was merged to Linux 3.4 on 20 May 2012.[12] It was first used by Google, in Android Ice Cream Sandwich, on the Galaxy Nexus phone, to enable offloading of cpu-intensive multimedia tasks on the OMAP4: from the ARM Cortex-A9 cores, running the Linux Kernel, to the ARM Cortex-M3 cores, running the TI-RTOS OS. Several semiconductor companies have since added support for RPMsg, including Texas Instruments,[13] STMicroelectronics,[14] Xilinx,[15] NXP Semiconductors, Renesas Electronics[16] and Nordic Semiconductor.[17]

User-space access

RPMsg provides a basic framework for sending framed messages between heterogenous processors, but a higher level driver is required to expose RPMsg functionality to user space in a useful way. Some of these drivers are mainlined in the Linux kernel, others are provided in a SoC vendor's kernel fork, and yet others are available out of tree.

!Driver Name!Description!Kernel Fork!Official website
imx_rpmsg_ttyExposes an RPMsg endpoint as a virtual TTY at /dev/ttyRPMSGx. Can be used wherever a serial-like connection is desirable.linux-imxhttps://github.com/nxp-imx/linux-imx/
rpmsg_charExposes an RPMsg endpoint as a character device at/dev/rpmsgX, allowing a userspace applications to send and receive raw RPMsg packets via standard file I/O operations.mainlineN/A
rpmsg_ctrlExposes a control interface at /dev/rpmsg_ctrlX that allows RPMsg endpoints to be created by user-space applications.mainlineN/A
rpmsg-netExposes an RPMsg endpoint as a virtual Ethernet network interface named rpmsgX. Can be used to connect the two CPUs using at layer 2 and above.out of treehttps://github.com/jtavares/rpmsg-net/tree/main
rpmsg-sysfsExposes rpmsg bus control primitives to userspace via sysfs.out of treehttps://github.com/nxp-mcuxpresso/rpmsg-sysfs

Notes and References

  1. Web site: Remote Processor Messaging (rpmsg) Framework — The Linux Kernel documentation. 2022-02-25. www.kernel.org.
  2. Web site: Linux/Documentation/staging/rpmsg.rst - Linux Cross Reference - Bootlin. lxr.bootlin.com. 2019-09-04.
  3. Web site: Project . Zephyr . 2019-02-20 . The Zephyr Project Demonstrates IoT Innovation at Embedded World . 2022-03-05 . Zephyr Project . en-US.
  4. Web site: RPMsg-Lite User's Guide: RPMsg Component. nxpmicro.github.io. 2016-09-27.
  5. Web site: NXPmicro/rpmsg-lite. GitHub. 2016-09-27.
  6. Web site: Xilinx Wiki - OpenAMP. www.wiki.xilinx.com. 2016-09-27.
  7. Web site: Introducing a generic AMP/IPC framework [LWN.net]]. 2022-02-24. lwn.net.
  8. Web site: LKML: Ohad Ben-Cohen: [GIT PULL] adding rpmsg and remoteproc to 3.3]. 2022-02-24. lkml.org.
  9. Web site: LKML: Ohad Ben-Cohen: [PATCH 0/7] Introducing a generic AMP framework]. 2022-02-24. lkml.org.
  10. Web site: A Generic AMP/IPC Framework For Linux. 2022-02-24. www.phoronix.com. en.
  11. Web site: kernel/git/torvalds/linux.git - Linux kernel source tree . 2022-07-03 . git.kernel.org.
  12. Web site: Linux_3.4 - Linux Kernel Newbies . 2022-07-03 . kernelnewbies.org.
  13. Web site: 3.6.2.3. RPMsg Quick Start Guide — Processor SDK Linux for AM65X Documentation. 2022-02-25. software-dl.ti.com.
  14. Web site: Linux RPMsg framework overview - stm32mpu. 2022-02-25. wiki.st.com.
  15. Book: Aboelhassan . Mustafa O. E. . Bartik . Ondrej . Novak . Marek . 2017 7th IEEE International Conference on Control System, Computing and Engineering (ICCSCE) . Embedded multi-core systems for mixed-critical applications with RPMSG protocol based on xilinx ZYNQ-7000 . November 2017 . https://ieeexplore.ieee.org/document/8284398 . 162–167 . 10.1109/ICCSCE.2017.8284398. 978-1-5386-3897-2 . 46746400 .
  16. Web site: Renesas RPMsg .
  17. Web site: nRF5340: Multiprotocol RPMsg — nRF Connect SDK 1.9.99 documentation . 2022-03-05 . developer.nordicsemi.com.