Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
RPMsg to accelerate transition
between multi-SoC and multi-
processor SoC solutions.
Arnaud Pouliquen / Loïc Pallardy
STMicroelectronics
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
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.”
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
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
• Preserve applications but migrate from a serial link to
RPMsg.
Motivation
SoC
MCU
Shared
memory
MPUMCU SoC
MPU SoC
UART
I2C
SPI
...
6
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
Migrate to an internal co-processor
SoC
MCUMPU
MCU SoC
MPU SoC
Serial linkVirtual
serial link
over RPMsg
8
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
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
Co-processor
UART Peripheral
serial drv
Shared memoryserial Peripheral
11
virt serial drv
serial API
applicationapplication
serial API
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
Extend to an external co-processor
SoC
MCURPMsg
MPU
SoC
MCURPMsg
MPU
MCU
RPMsg on
serial link
13
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
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
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
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
Thank you !
Questions ? Suggestions, comments?
Arnaud [email protected]
Loïc [email protected]
Meet us and see the demos at the ST Booth!
18