*

OpenAMP on i.MX8 – Yocto Linux with FreeRTOS #2

      2020/06/08

Porting requirements of OpenAMP on a heterogeneous core SoC

The OpenAMP Framework uses libmetal to provide abstractions that allow for porting of the OpenAMP Framework to various software environments (operating systems / bare metal environments) and machines (processors/platforms). Porting of OpenAMP to your platform needs:

  • add your system environment support to libmetal
    • Need to add system/machine support to lib/system/<SYS>/ directory in libmetal repository.
  • Implement your platform specific remoteproc driver.
    • Need to implement platform specific remoteproc driver to use remoteproc life cycle management APIs. The remoteproc driver platform specific functions are defined in this file: lib/include/openamp/remoteproc.h.
  • Define your shared memory layout and specify it in a resource table.
    • Need to define shared memory location in device tree. After that, user can use remoteproc APIs to run application on a remote processor.

OpenAMP on FreeRTOS

As with upstream Linux 3.4.x kernel onward all the required components required for OpenAMP is available. RPMsg character driver, remoteproc driver and virtio are part of the kernel. As we can see from the previous diagram, the open AMP implementation is only required for FreeRTOS.

The Implementation of OpenAMP is not yet done on i.MX8MQ’s M4. i.MX7 has a similar implementation of OpenAMP in FreeRTOS. We were considering this as a reference. An i.MX8MQ M4 core based system driver configuration is required to make this work. This is a time consuming process as it is a porting work on M4 Core. This is TBD.

The FreeRTOS release for i.MX8MQ M4 core already have the NXP implementation of OpenAMP. They have named it as RPMsg_lite.

RPMsg-Lite

RPMsg-lite is a lightweight implementation of the Remote Processor Messaging (RPMsg) protocol. The RPMsg protocol defines a standardized binary interface used to communicate between multiple cores in a heterogeneous multicore system.

Compared to the RPMsg implementation of the Open Asymmetric Multi Processing (OpenAMP) framework (https://github.com/OpenAMP/open-amp), the RPMsg-Lite offers a code size reduction, API simplification, and improved modularity. On smaller Cortex-M0+ based systems, it is recommended to use RPMsg-Lite.

The RPMsg-Lite is an open-source component developed by NXP Semiconductors and released under the BSD-compatible license. Below is the difference between OpenAMP RPMsg implementation and RPMsg-lite

Component / Configuration

Flash [B]

RAM [B]

OpenAMP RPMsg / Release (reference)

5547

456 + dynamic

RPMsg-Lite / Dynamic API, Release

3462

56 + dynamic

Relative Difference [%]

~62.4%

~12.3%

RPMsg-Lite / Static API (no malloc), Release

2926

352

Relative Difference [%]

~52.7%

~77.2%

Working of RPMsg-lite

Next : OpenAMP on i.MX8 – Yocto Linux with FreeRTOS #3

 - 未分類