The communication between the two cores is managed using a Remote Procedure Call (RPC) framework. This framework designates the main core as the client and the other cores as servers, making it ideal for Asymmetric Multiprocessing (AMP) applications like CyDAQ. The server remains in a "busy-wait" state, ready to be interrupted by a CPU interrupt to handle any incoming commands. Our implementation of this framework builds on existing frameworks and libraries. We use openAMP to manage the setup of RPMsg (Remote Protocol Messaging) and to configure remoteproc (remote processors). This API is chosen for its compatibility with both Linux and bare-metal environments. It employs VirtIO Media Access Control to facilitate the primary communication channel between the two cores via shared memory.
Here are some links to pages we would recommend reading for an in-depth understanding:
- https://openamp.readthedocs.io/en/latest/protocol_details/asymmetric_mp.html
- https://docs.amd.com/v/u/2020.1-English/ug1186-zynq-openamp-gsg (Does not directly apply but the information can be extrapolated to gain a better understanding of the document above)
RPMsg
RPMsg (Remote Processor Messaging) is a lightweight messaging protocol provided by the OpenAMP framework to enable communication between different cores in an AMP system. RPMsg allows processors to send and receive messages across a virtual communication channel. It operates over VirtIO, a standardized interface for virtual devices, to facilitate asynchronous message passing between cores.
Remoteproc
Remoteproc is a key component within the OpenAMP framework responsible for managing remote processors in an AMP system. It provides a set of APIs that allow for the booting, monitoring, and control of secondary processors. Remoteproc can load firmware images, start up remote cores, and manage their lifecycle, including safely shutting them down when necessary.