rpmsg to accelerate transition between multi-soc and multi ...ensure processors coexistence and...

18
RPMsg to accelerate transition between multi-SoC and multi- processor SoC solutions. Arnaud Pouliquen / Loïc Pallardy STMicroelectronics

Upload: others

Post on 08-Nov-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

RPMsg to accelerate transition

between multi-SoC and multi-

processor SoC solutions.

Arnaud Pouliquen / Loïc Pallardy

STMicroelectronics

Page 2: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Who am I

Arnaud Pouliquen– Embedded software Engineer at STMicroelectronics on STM32MP1 MPU.

• Audio technical leader.

• Coprocessor management technical leader:

ensure processors coexistence and inter-communication.– Contributions:

• Linux

Contributor and maintainer on some ST drivers (asoc / iio / remoteproc / rpmsg).

• OpenAMP library

Contributor to OpenAMP restructuring and footprint reduction.

• Zephyr

– Introduction of the stm32mp1 SoC in Zephyr.

– Contributor/expertise for OpenAMP library integration.

2

Page 3: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Scope of the presentation

• Muti–SoC solution: – several processors in separate devices

– communicate together by a physical link (only common serial link is considered)

• Multi-processor SoC solution: – several processors embedded in one chip

– hardware mailbox and optional shared memory for inter-processing communication.

• Focus on the inter-processor communication.

3

SoC

Serial

link

SoC

Mailbox /

memory

SoC

Proc 2Proc 1

Proc 1 Proc 2

“RPMsg to accelerate transition between muti-SoC and multi-processor SoC solutions.”

Page 4: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Remote Processor Messaging

• ST implementation is based on open source solutions:

– VirtIO and RPMsg frameworks for Linux (Ohad Ben-Cohen 2011)

– OpenAMP library for the co-processor (Xilinx and Mentor Graphic 2014).

Communication link(shared memory + inter-core

Interrupts)

Virtio/virtqueue

RPMsg

Physical layer

Mac layer

Transport layerLinux RPMsgOpenAMP RPMsg

Linux VirtIOOpenAMP VirtIO

Shared memoryMailbox

Payload

Reserved (32 bits)

Destination address (32 bits)

Source address (32 bits)

Length (16 bits) Flags (16 bits)

RPMsg structure

4

Page 5: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Remote Processor Messaging

physical link (shared memory + cross Interrupts)

Master Slave

End point

End point

End point

End point

End point

End point

5

appldriver

• One physical link can offer multiple communication channels.

• A channel implements a service relying on one or several end-points.

• An end-point provides a logical connections through a channel.

RPMsg Channel

RPMsgChannel

RPMsg Channel

RPMsg Channel

appl 1 appl 2 driver

Page 6: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

• Preserve applications but migrate from a serial link to

RPMsg.

Motivation

SoC

MCU

Shared

memory

MPUMCU SoC

MPU SoC

UART

I2C

SPI

...

6

Page 7: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

MotivationSoC

MCURPMsg

MPU

SoC

MCURPMsg

MPU

MCU

Serial link

• Extend platform by offloading some services on an external coprocessor.

• Manage diversity of services on a single link.

7

Page 8: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Migrate to an internal co-processor

SoC

MCUMPU

MCU SoC

MPU SoC

Serial linkVirtual

serial link

over RPMsg

8

Page 9: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Linux

serial dev interface serial dev interface

3

9

application

serial-core

serial Peripheral

serial drv

application

serial-core

rpmsg_serial

Shared memory

rpmsg

serial client drvserial client drv

Page 10: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Linux

tty dev interface i2c dev interfacespi dev interface

10

application

tty

rpmsg_tty

Shared memory

rpmsg

spidev i2c-core

rpmsg_i2crpmsg_spi

serial core

applicationapplication

Page 11: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Co-processor

UART Peripheral

serial drv

Shared memoryserial Peripheral

11

virt serial drv

serial API

applicationapplication

serial API

Page 12: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Implementation status

• Linux developments

Virtual serial drivers over RPMsg implemented.

• rpmsg_tty driver

• rpmsg_i2c driver

• rpmsg_spi driver

• Co-processor firmwares

Virtual drivers over RPMsg and associated examples available:

• on STM32Cube

• on Zephyr

12

Page 13: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Extend to an external co-processor

SoC

MCURPMsg

MPU

SoC

MCURPMsg

MPU

MCU

RPMsg on

serial link

13

Page 14: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Linux

dev interface

rpmsg client

dev interface

application

14

rpmsg virtio bus

virtio

rpmsg

application

rpmsg client

rpmsg

rpmsg serdev bus serdev

uart drv

UART PeripheralShared memory

Page 15: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Co-processor

Shared memory

application

rpmsg rpmsg

UART Peripheral

application

rpmsg virtio bus

virtio

rpmsg UART bus

uart controller

uart API

15

rpmsg-uart WP

Page 16: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Implementation status?

• Linux developments

RPMsg serial buses:

• RPMsg serdev bus implemented,

• RPMsg I2C/SPI bus not implemented

• Co-processor firmwares Examples on STM32Cube distribution and Zephyr available

Serial buses not yet implemented in OpenAMP library.

16

Page 17: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

What’s next (current target)

• Upstream of the Linux RPMsg clients drivers and RPMsg

serial buses.

• Support serial buses in OpenAMP.

• Provide support of the virtual serial drivers in different

ecosystems ( STM32Cube, Zephyr, arm® Mbed,

Arduino…).

17

Page 18: RPMsg to accelerate transition between multi-SoC and multi ...ensure processors coexistence and inter-communication. – Contributions: • Linux Contributor and maintainer on some

Thank you !

Questions ? Suggestions, comments?

Arnaud [email protected]

Loïc [email protected]

Meet us and see the demos at the ST Booth!

18