リネオブログ

OpenAMP on i.MX8 - Yocto Linux with FreeRTOS #1

2020 年 04 月 13 日   Linux 技術ネタ

An asymmetric multiprocessing (AMP) system is a multiprocessor computer system where not all of the multiple interconnected central processing units (CPUs) are treated equally.

For example, a system might allow (either at the hardware or operating system level) only one CPU to execute operating system code or might allow only one CPU to perform I/O operations. Heterogeneity is the main requirement for a system to work as AMP.

What is Heterogeneous Multicore Processing Architecture?

The i.MX8M processors offer an MCU and a MPU in the same chip, this is called a Heterogeneous Multicore Processing Architecture. Heterogeneous multi-core systems have two or more cores that differ in architecture or micro-architecture. Example of heterogeneous multi-core systems is the combination of a microprocessor core with a micro-controller class core (e.g. a mix of Cortex-A, Cortex-M, or DSP cores.)

More details on Asymmetric multiprocessing (AMP) system

Usually, more than one OS is running on the system, which is separated per core or core architecture. For example, the Cortex-A core may run a rich OS, while the Cortex-M core may run simple code or an RTOS.

The first thing to know is that one of the cores is the "master", meaning that it is in charge to boot the other core which otherwise will stay in reset.

The BootROM will always boot the Cortex-A core first. U-Boot is the bootloader used by your system. The reason is that U-Boot provides a bootaux command which allows to start the Cortex-M4.

Once started, both CPU are on their own, executing different instructions at different speeds.

What is Open-AMP?

The Open-AMP framework provides software components that enable development of software applications for Asymmetric Multiprocessing (AMP) systems.

The framework provides the following key capabilities.

  • Provides Life Cycle Management, and Inter Processor Communication capabilities for management of remote compute resources and their associated software contexts.
  • Provides a standalone library usable with RTOS and Baremetal software environments
  • Compatibility with upstream Linux remoteproc and rpmsg components
  • Following AMP configurations supported
    • Linux master with Generic(Baremetal/RTOS) remote
    • Generic (Baremetal/RTOS) master with Linux remote
  • Proxy infrastructure and supplied demos showcase ability of proxy on master to handle printf, scanf, open, close, read, write calls from bare metal based remote contexts.
  • The Open-AMP Framework uses libmetal to provide abstractions that allow for porting of the Open-AMP Framework to various software environments (operating systems and bare metal environments) and machines (processors/platforms).

OpenAMP Ingredients

The key components provided by the OpenAMP Framework is as below:

  • remoteproc
    • Life Cycle Management (LCM) of remote processors from software running on a master processor is handled by remoteproc. The remoteproc API provided by the
    • OpenAMP Framework is compliant with the remoteproc infrastructurepresent in upstream Lin
      ux 3.4.x kernel onward.
  • RPMsg
    • The RPMsg driver infra enables Inter Processor Communications (IPC) between independent software contexts running on homogeneous or heterogeneous cores present in an AMP system. RPMsg protocol structure is as below:

RPMsg

The Linux remoteproc and RPMsg infrastructure was first implemented by Texas Instruments. These are available in the upstream Linux kernel today which enable the Linux applications running on a master processor to manage the life cycle of remote processor/firmware and perform IPC with them.

The OpenAMP Framework provides the required LCM and IPC infrastructure from the RTOS and bare metal environments with the API conformity and functional symmetry available in the upstream Linux kernel. As in upstream Linux, the OpenAMP Framework's remoteproc and RPMsg infrastructure uses virtio as the transport layer/abstraction.

The following figure shows the various software environments/configurations supported by the OpenAMP Framework. As shown in this illustration, the OpenAMP Framework can be used with RTOS or bare metal contexts on a remote processor to communicate with Linux applications (in kernel space or user space) or other RTOS/bare metal-based applications running on the master processor through the remoteproc and RPMsg Components.

RPMsg

The OpenAMP Framework also serves as a stand-alone library that enables RTOS and bare metal applications on a master processor to manage the life cycle of remote processor/firmware and communicate with them using RPMsg.

The OpenAMP Framework supplies a proxy infrastructure that provides a transparent interface to remote contexts from Linux user space applications running on the master processor. The proxy application hides all the logistics involved in bringing-up the remote software context and its shutdown sequence. In addition, it supports RPMsg-based Remote Procedure Calls (RPCs) from remote context. A retargeting API available from the remote context allows C library system calls such as "_open", "_close", "_read", and "_write" to be forwarded to the proxy application on the master for service.

Next : OpenAMP on i.MX8 - Yocto Linux with FreeRTOS #2

Yocto Project 公式実践講座 5 月 ~ 7 月 開催分 受講お申込み受付中!
Yocto Project よもやま話
新企画「Yocto Project よもやま話」の連載を始めます
新企画「Yocto Project よもやま話」の連載を始めます

2022 年 04 月 28 日 Yocto Project よもやま話

Linux 技術ネタ
イベントレポート
ET & IoT 2021 レポート
ET & IoT 2021 レポート

2021 年 12 月 01 日 イベントレポート

組込み総合技術展 Embedded Technology 2019 レポート
組込み総合技術展 Embedded Technology 2019 レポート

2019 年 12 月 13 日 イベントレポート

組込み総合技術展 関西 ETWest2019 レポート
組込み総合技術展 関西 ETWest2019 レポート

2019 年 06 月 20 日 イベントレポート

リクルート
違うズラ
違うズラ

2018 年 10 月 26 日 リクルート

信州で人生がかわる
信州で人生がかわる

2018 年 07 月 24 日 リクルート

新入社員インタビュー
新入社員インタビュー

2017 年 02 月 28 日 リクルート

北小野通信
入笠山ハイキング その 2
入笠山ハイキング その 2

2019 年 10 月 09 日 北小野通信

入笠山ハイキング その 1
入笠山ハイキング その 1

2019 年 10 月 09 日 北小野通信

氷の世界
氷の世界

2019 年 01 月 22 日 北小野通信

ソリューション統括部
シリコンバレー探検記 2019 ~番外編~
シリコンバレー探検記 2019 ~番外編~

2019 年 12 月 10 日 ソリューション統括部

シリコンバレー探検記 2019 ~後編~
シリコンバレー探検記 2019 ~後編~

2019 年 12 月 10 日 ソリューション統括部

シリコンバレー探検記 2019 ~前編~
シリコンバレー探検記 2019 ~前編~

2019 年 12 月 10 日 ソリューション統括部

マーケティング統括部
大成功決起大会!!(ET2019)
大成功決起大会!!(ET2019)

2019 年 12 月 13 日 マーケティング統括部

ESEC 2019 決起大会
ESEC 2019 決起大会

2019 年 04 月 25 日 マーケティング統括部

シリコンバレー探検記 その 2
シリコンバレー探検記 その 2

2018 年 12 月 18 日 マーケティング統括部