リネオブログ

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 公式実践講座 4 月 ~ 6 月 開催分 受講お申込み受付中!
Vigiles サポート
Yocto Project よもやま話
Yocto よもやま話 第 13 回 「Yocto Project の最新動向 2023 夏」
Yocto よもやま話 第 13 回 「Yocto Project の最新動向 2023 夏」

2023 年 07 月 25 日 Yocto Project よもやま話

Yocto よもやま話 第 12 回 「Yocto Project 始めます その 2」
Yocto よもやま話 第 12 回 「Yocto Project 始めます その 2」

2023 年 06 月 20 日 Yocto Project よもやま話

 Yocto よもやま話 第 11 回 「Yocto 4.2 Mickledore リリース」
Yocto よもやま話 第 11 回 「Yocto 4.2 Mickledore リリース」

2023 年 05 月 17 日 Yocto Project よもやま話

Linux 技術ネタ
RISC-Vについて学ぶ-後編
RISC-Vについて学ぶ-後編

2024 年 01 月 10 日 Linux 技術ネタ

RISC-Vについて学ぶ-前編
RISC-Vについて学ぶ-前編

2023 年 12 月 12 日 Linux 技術ネタ

イベントレポート
EdgeTech+ 2023 出展レポート
EdgeTech+ 2023 出展レポート

2023 年 12 月 14 日 イベントレポート

EdgeTech+ West 2023 出展レポート
EdgeTech+ West 2023 出展レポート

2023 年 08 月 09 日 イベントレポート

Design Solution Forum 2022
Design Solution Forum 2022

2023 年 02 月 27 日 イベントレポート

リクルート
新卒採用、絶賛募集中!
新卒採用、絶賛募集中!

2023 年 05 月 30 日 リクルート

国立大学オンライン研修レポート 2022
国立大学オンライン研修レポート 2022

2022 年 09 月 27 日 リクルート

北小野通信
北小野通信 桜の季節、珍客来訪?
北小野通信 桜の季節、珍客来訪?

2023 年 05 月 11 日 北小野通信

北小野通信 「 日本土真ん中ウォーク 2022 」
北小野通信 「 日本土真ん中ウォーク 2022 」

2023 年 01 月 30 日 北小野通信

北小野通信 1011
北小野通信 1011

2022 年 10 月 11 日 北小野通信

ソリューション統括部
シリコンバレー探検記 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 日 マーケティング統括部