SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
An Introduction to Asymmetric Multiprocessing:
when this architecture can be a game changer
and how to survive it.
Nicola La Gloria, Laura Nao
Kynetics LLC
Santa Clara, California
Hybrid Architecture: warpx.io
The Hybrid Design Architecture (HDA)
combines the power of an application
processor with the ease-of-use of
micro-controllers.
Software on warpx HDA
SMP vs AMP
SMP on homogeneous architectures:
● Single OS controlling two or more
identical cores sharing system
resources
● Dynamic scheduling and load
balancing
Core1
CoreN
Kernel SMP
OS
App App
. . .
SMP vs AMP
Core1
CoreN
MCAPI
OS OS/RTOS
App App Task Task
AMP on heterogeneous architectures:
● Different OS on each core -->
full-featured OS alongside a
real-time kernel
● Inter processor communication
protocol
● Efficient when the application can
be statically partitioned across
cores - high performance is
achieved locally
. . .
Supervised vs Not Supervised
● Strong isolation
● Hides non-trivial AMP details (e.g. resource
assignment, inter-core communication)
● Security and robustness
● Overhead of a software layer
● Achieve best performances by running
natively
● Boot sequence complexity
● Harder to debug
Interprocessor Communication
NXP i.MX7 overview
● Cortex-A7 core + Cortex-M4 core
● Master - Slave architecture
○ A7 is the master
○ M4 is the slave
● Inter processor communication
○ MU - Messaging Unit
○ RPMsg component (OpenAMP framework)
● Safe sharing of resources
○ RDC - Resource Domain Controller
NXP i.MX7 - RDC
NXP i.MX7 IPC - MU
MAC (VirtIO)
The OpenAMP framework - RPMsg
RPMsg on Linux
Hybrid Linux/FreeRTOS Demo
Demo Goal:
● IMU sensor (I2C) read by MCU task
● Calculate objective function (module of acc, mag, gyro vectors)
● Log/plot sensor samples on MPU
● Safely recover from a kernel panic
Hardware Setup
● Boundary Devices Nitrogen 7, Toradex Colibri i.MX7 SOM
○ NXP i.MX7D processor - ARM dual Cortex-A7 + ARM Cortex-M4
○ Segger J-Link Probe
Cortex M4 Bring Up (1)
Environment setup:
● Download FreeRTOS sources
https://github.com/boundarydevices/freertos-boundary.git
● Download GNU ARM Embedded Toolchain
https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/download
● Example applications for Cortex-M4 are located in the
examples/imx7d_nitrogen7_m4/ folder
● Scripts for building both debug and release binaries are available in the
armgcc subfolder
Cortex M4 Bring Up (2)
M4 Binary application can be loaded on the Cortex-M4 in different ways:
● U-Boot - ums gadget + m4update
● using remoteproc framework (linux userspace)
● using imx-m4fwloader from NXP (linux userspace):
https://github.com/codeauroraforum/imx-m4fwloader
M4 code can be linked and loaded to one of the following:
● TCM - 32KB (preferred)
● OCRAM - 32KB
● DDR - up to 1MB
● QSPI Flash - 128KB
IDE Setup
● Eclipse for C/C+
○ GNU MCU Eclipse : plugins and tools for embedded ARM development -
https://marketplace.eclipse.org/content/gnu-mcu-eclipse
● GDB
● J-Link scripts for iMX7D for debugging both Cortex-A7 cores and Cortex-M4 -
https://wiki.segger.com/IMX7D
● FreeRTOS Kernel Awareness plugin from NXP
http://freescale.com/lgfiles/updates/Eclipse/KDS
● ARM DS-5 (not free)
● Sourcery Codebench (not free)
Workbench
code
MPU
console
Break
points
(MCU)
FreeRTOS
kernel
awareness
MCU
console
Demo Parameters
Remote core:
● Sample IMUs every 10ms
● Calculate the objective function on MCU (module of vectors)
● Buffer of 300 elements = 3Kb (stored TCM Memory only 32 Kb)
● Items (12 byte each) are dequeued and sent to master 10 at a time every 100
ms
Master core:
● Master reads incoming samples by polling the character device
Architecture Overview
start_cmd, stop_cmd, heartbeatLinux 4.9 FreeRTOS 1.0.1
The OpenAMP framework - RPMsg
Control Flow (2 cores)
● S0 RPMsg channel is down
● S1 RPMsg channel is up, /dev/rpmsg0 is created
● S2 RPMsg channel is up, endpoint created, data is
dumped into a log file
● S0 RPMsg channel is down
● S1 RPMsg channel is up (sampling IMU sensor,
buffering data)
● S2 RPMsg channel is up, sending data to master
core, (sampling IMU sensor, buffering data),
Register rpmsg char driver
+ probe
open /dev/rpmsg0
read /dev/rpmsg0
Channel created
stop_cmd
Master is dead
start_cmd
Master
heartbeat
rpmsg_char_client Data sender task
close /dev/rpmsg0
What if Linux Kernel Panics
● Kexec: system call to load and boot into another kernel from the currently
running kernel (4.9.74).
○ crashkernel=128M [normal kernel cmdline]
○ irqpoll, nosmp, reset_devices [crash kernel
cmdline]
○ --load-panic option
● Kdump: Linux mechanism to dump machine memory content on kernel
panic.
● Kexec/Kdump support on ARM platforms is still experimental
Video of the Demo
VIDEO
Pitfalls
● Before announcing the remote service, MCU checks whether master is
up. If notification arrives too early (virtqueue kick function call) when
booting crash kernel the system might hang
● Sometimes kexec still hangs and fails to soft-reboot - more frequent when
streaming continuously instead of sending data bursts (but we don’t know
why)
References
● OpenAMP project page: https://github.com/OpenAMP/
● Asymmetric multiprocessing and embedded linux (ELC 2017):
https://elinux.org/images/3/3b/NOVAK_CERVENKA.pdf
● Mantainers:
○ Open-amp:
■ Wendy Liang
○ RPMsg (Linux)
■ Ohad Ben-Cohen
■ Bjorn Andersson
○ Kexec (Linux)
■ Eric Biederman
○ Kdump (Linux)
■ Dave Young
■ Baoquan He
Q/A

Weitere ähnliche Inhalte

Was ist angesagt?

Verification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed SystemsVerification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed SystemsMykola Novik
 
Red Bend Software: Separation Using Type-1 Virtualization in Vehicles and Aut...
Red Bend Software: Separation Using Type-1 Virtualization in Vehicles and Aut...Red Bend Software: Separation Using Type-1 Virtualization in Vehicles and Aut...
Red Bend Software: Separation Using Type-1 Virtualization in Vehicles and Aut...Red Bend Software
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in AndroidOpersys inc.
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)Linaro
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxPicker Weng
 
Decoupling Compute from Memory, Storage and IO with OMI
Decoupling Compute from Memory, Storage and IO with OMIDecoupling Compute from Memory, Storage and IO with OMI
Decoupling Compute from Memory, Storage and IO with OMIAllan Cantle
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device driversHoucheng Lin
 
What are latest new features that DPDK brings into 2018?
What are latest new features that DPDK brings into 2018?What are latest new features that DPDK brings into 2018?
What are latest new features that DPDK brings into 2018?Michelle Holley
 
OpenHPC: A Comprehensive System Software Stack
OpenHPC: A Comprehensive System Software StackOpenHPC: A Comprehensive System Software Stack
OpenHPC: A Comprehensive System Software Stackinside-BigData.com
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxThe Linux Foundation
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded trainingH Ming
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageKernel TLV
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/CoreShay Cohen
 
Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals哲豪 康哲豪
 
LCA13: Xen on ARM
LCA13: Xen on ARMLCA13: Xen on ARM
LCA13: Xen on ARMLinaro
 

Was ist angesagt? (20)

Verification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed SystemsVerification of Concurrent and Distributed Systems
Verification of Concurrent and Distributed Systems
 
Power Management from Linux Kernel to Android
Power Management from Linux Kernel to AndroidPower Management from Linux Kernel to Android
Power Management from Linux Kernel to Android
 
Red Bend Software: Separation Using Type-1 Virtualization in Vehicles and Aut...
Red Bend Software: Separation Using Type-1 Virtualization in Vehicles and Aut...Red Bend Software: Separation Using Type-1 Virtualization in Vehicles and Aut...
Red Bend Software: Separation Using Type-1 Virtualization in Vehicles and Aut...
 
Scheduling in Android
Scheduling in AndroidScheduling in Android
Scheduling in Android
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)HKG15-107: ACPI Power Management on ARM64 Servers (v2)
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on Linux
 
Decoupling Compute from Memory, Storage and IO with OMI
Decoupling Compute from Memory, Storage and IO with OMIDecoupling Compute from Memory, Storage and IO with OMI
Decoupling Compute from Memory, Storage and IO with OMI
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
What are latest new features that DPDK brings into 2018?
What are latest new features that DPDK brings into 2018?What are latest new features that DPDK brings into 2018?
What are latest new features that DPDK brings into 2018?
 
OpenHPC: A Comprehensive System Software Stack
OpenHPC: A Comprehensive System Software StackOpenHPC: A Comprehensive System Software Stack
OpenHPC: A Comprehensive System Software Stack
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
GPU Programming
GPU ProgrammingGPU Programming
GPU Programming
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
Android Virtualization: Opportunity and Organization
Android Virtualization: Opportunity and OrganizationAndroid Virtualization: Opportunity and Organization
Android Virtualization: Opportunity and Organization
 
Linux Preempt-RT Internals
Linux Preempt-RT InternalsLinux Preempt-RT Internals
Linux Preempt-RT Internals
 
LCA13: Xen on ARM
LCA13: Xen on ARMLCA13: Xen on ARM
LCA13: Xen on ARM
 

Ähnlich wie AMP Kynetics - ELC 2018 Portland

Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSBuilding a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSFernando Luiz Cola
 
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...OpenStack Korea Community
 
BPF Hardware Offload Deep Dive
BPF Hardware Offload Deep DiveBPF Hardware Offload Deep Dive
BPF Hardware Offload Deep DiveNetronome
 
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...Toradex
 
Add sale davinci
Add sale davinciAdd sale davinci
Add sale davinciAkash Sahoo
 
ODSA Use Case - SmartNIC
ODSA Use Case - SmartNICODSA Use Case - SmartNIC
ODSA Use Case - SmartNICODSA Workgroup
 
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLinaro
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDKKernel TLV
 
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...Pradeep Singh
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overviewLinaro
 
A Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm BasebandsA Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm BasebandsPriyanka Aash
 
Towards Software Defined Persistent Memory
Towards Software Defined Persistent MemoryTowards Software Defined Persistent Memory
Towards Software Defined Persistent MemorySwaminathan Sundararaman
 
Current and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on LinuxCurrent and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on Linuxmountpoint.io
 
20141111_SOS3_Gallo
20141111_SOS3_Gallo20141111_SOS3_Gallo
20141111_SOS3_GalloAndrea Gallo
 
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxOptimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxScyllaDB
 
Challenges in GPU compilers
Challenges in GPU compilersChallenges in GPU compilers
Challenges in GPU compilersAnastasiaStulova
 
Embedded platform choices
Embedded platform choicesEmbedded platform choices
Embedded platform choicesTavish Naruka
 
ONNC - 0.9.1 release
ONNC - 0.9.1 releaseONNC - 0.9.1 release
ONNC - 0.9.1 releaseLuba Tang
 

Ähnlich wie AMP Kynetics - ELC 2018 Portland (20)

Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSBuilding a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
 
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
[OpenStack Day in Korea 2015] Track 1-6 - 갈라파고스의 이구아나, 인프라에 오픈소스를 올리다. 그래서 보이...
 
BPF Hardware Offload Deep Dive
BPF Hardware Offload Deep DiveBPF Hardware Offload Deep Dive
BPF Hardware Offload Deep Dive
 
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
 
Add sale davinci
Add sale davinciAdd sale davinci
Add sale davinci
 
ODSA Use Case - SmartNIC
ODSA Use Case - SmartNICODSA Use Case - SmartNIC
ODSA Use Case - SmartNIC
 
ARM.pdf
ARM.pdfARM.pdf
ARM.pdf
 
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overview
 
A Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm BasebandsA Journey into Hexagon: Dissecting Qualcomm Basebands
A Journey into Hexagon: Dissecting Qualcomm Basebands
 
Towards Software Defined Persistent Memory
Towards Software Defined Persistent MemoryTowards Software Defined Persistent Memory
Towards Software Defined Persistent Memory
 
Current and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on LinuxCurrent and Future of Non-Volatile Memory on Linux
Current and Future of Non-Volatile Memory on Linux
 
Porting Android
Porting AndroidPorting Android
Porting Android
 
20141111_SOS3_Gallo
20141111_SOS3_Gallo20141111_SOS3_Gallo
20141111_SOS3_Gallo
 
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxOptimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
 
Challenges in GPU compilers
Challenges in GPU compilersChallenges in GPU compilers
Challenges in GPU compilers
 
Embedded platform choices
Embedded platform choicesEmbedded platform choices
Embedded platform choices
 
ONNC - 0.9.1 release
ONNC - 0.9.1 releaseONNC - 0.9.1 release
ONNC - 0.9.1 release
 

Mehr von Kynetics

Eclipse Hara, Updating Embedded Devices with hawkBit Made Easy
Eclipse Hara, Updating Embedded Devices with hawkBit Made EasyEclipse Hara, Updating Embedded Devices with hawkBit Made Easy
Eclipse Hara, Updating Embedded Devices with hawkBit Made EasyKynetics
 
Deploy Eclipse hawBit in Production
Deploy Eclipse hawBit in ProductionDeploy Eclipse hawBit in Production
Deploy Eclipse hawBit in ProductionKynetics
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxKynetics
 
ELC2019 - Poster - Update Anything
ELC2019 - Poster - Update Anything ELC2019 - Poster - Update Anything
ELC2019 - Poster - Update Anything Kynetics
 
Eclipse Iot Day 2018 Presentation
Eclipse Iot Day 2018 PresentationEclipse Iot Day 2018 Presentation
Eclipse Iot Day 2018 PresentationKynetics
 
Eclipsecon 2017 presentation
Eclipsecon 2017 presentationEclipsecon 2017 presentation
Eclipsecon 2017 presentationKynetics
 
Using Java on Wearable Devices featuring an Hybrid Architecture.
Using Java on Wearable Devices featuring an Hybrid Architecture.Using Java on Wearable Devices featuring an Hybrid Architecture.
Using Java on Wearable Devices featuring an Hybrid Architecture.Kynetics
 
Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...
Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...
Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...Kynetics
 
Reactive IoT, Java One 2016
Reactive IoT, Java One 2016Reactive IoT, Java One 2016
Reactive IoT, Java One 2016Kynetics
 
Linaro Connect 2017 - Presentation - Kynetics
Linaro Connect 2017 - Presentation - KyneticsLinaro Connect 2017 - Presentation - Kynetics
Linaro Connect 2017 - Presentation - KyneticsKynetics
 

Mehr von Kynetics (10)

Eclipse Hara, Updating Embedded Devices with hawkBit Made Easy
Eclipse Hara, Updating Embedded Devices with hawkBit Made EasyEclipse Hara, Updating Embedded Devices with hawkBit Made Easy
Eclipse Hara, Updating Embedded Devices with hawkBit Made Easy
 
Deploy Eclipse hawBit in Production
Deploy Eclipse hawBit in ProductionDeploy Eclipse hawBit in Production
Deploy Eclipse hawBit in Production
 
Orchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded LinuxOrchestrated Android-Style System Upgrades for Embedded Linux
Orchestrated Android-Style System Upgrades for Embedded Linux
 
ELC2019 - Poster - Update Anything
ELC2019 - Poster - Update Anything ELC2019 - Poster - Update Anything
ELC2019 - Poster - Update Anything
 
Eclipse Iot Day 2018 Presentation
Eclipse Iot Day 2018 PresentationEclipse Iot Day 2018 Presentation
Eclipse Iot Day 2018 Presentation
 
Eclipsecon 2017 presentation
Eclipsecon 2017 presentationEclipsecon 2017 presentation
Eclipsecon 2017 presentation
 
Using Java on Wearable Devices featuring an Hybrid Architecture.
Using Java on Wearable Devices featuring an Hybrid Architecture.Using Java on Wearable Devices featuring an Hybrid Architecture.
Using Java on Wearable Devices featuring an Hybrid Architecture.
 
Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...
Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...
Deploy Small IoT Embedded SOC Devices and a Back-End Platform with Java, usin...
 
Reactive IoT, Java One 2016
Reactive IoT, Java One 2016Reactive IoT, Java One 2016
Reactive IoT, Java One 2016
 
Linaro Connect 2017 - Presentation - Kynetics
Linaro Connect 2017 - Presentation - KyneticsLinaro Connect 2017 - Presentation - Kynetics
Linaro Connect 2017 - Presentation - Kynetics
 

Kürzlich hochgeladen

Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptxNikhil Raut
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESNarmatha D
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 

Kürzlich hochgeladen (20)

Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptx
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIES
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 

AMP Kynetics - ELC 2018 Portland

  • 1. An Introduction to Asymmetric Multiprocessing: when this architecture can be a game changer and how to survive it. Nicola La Gloria, Laura Nao Kynetics LLC Santa Clara, California
  • 2. Hybrid Architecture: warpx.io The Hybrid Design Architecture (HDA) combines the power of an application processor with the ease-of-use of micro-controllers.
  • 4. SMP vs AMP SMP on homogeneous architectures: ● Single OS controlling two or more identical cores sharing system resources ● Dynamic scheduling and load balancing Core1 CoreN Kernel SMP OS App App . . .
  • 5. SMP vs AMP Core1 CoreN MCAPI OS OS/RTOS App App Task Task AMP on heterogeneous architectures: ● Different OS on each core --> full-featured OS alongside a real-time kernel ● Inter processor communication protocol ● Efficient when the application can be statically partitioned across cores - high performance is achieved locally . . .
  • 6. Supervised vs Not Supervised ● Strong isolation ● Hides non-trivial AMP details (e.g. resource assignment, inter-core communication) ● Security and robustness ● Overhead of a software layer ● Achieve best performances by running natively ● Boot sequence complexity ● Harder to debug
  • 8. NXP i.MX7 overview ● Cortex-A7 core + Cortex-M4 core ● Master - Slave architecture ○ A7 is the master ○ M4 is the slave ● Inter processor communication ○ MU - Messaging Unit ○ RPMsg component (OpenAMP framework) ● Safe sharing of resources ○ RDC - Resource Domain Controller
  • 14. Hybrid Linux/FreeRTOS Demo Demo Goal: ● IMU sensor (I2C) read by MCU task ● Calculate objective function (module of acc, mag, gyro vectors) ● Log/plot sensor samples on MPU ● Safely recover from a kernel panic Hardware Setup ● Boundary Devices Nitrogen 7, Toradex Colibri i.MX7 SOM ○ NXP i.MX7D processor - ARM dual Cortex-A7 + ARM Cortex-M4 ○ Segger J-Link Probe
  • 15. Cortex M4 Bring Up (1) Environment setup: ● Download FreeRTOS sources https://github.com/boundarydevices/freertos-boundary.git ● Download GNU ARM Embedded Toolchain https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/download ● Example applications for Cortex-M4 are located in the examples/imx7d_nitrogen7_m4/ folder ● Scripts for building both debug and release binaries are available in the armgcc subfolder
  • 16. Cortex M4 Bring Up (2) M4 Binary application can be loaded on the Cortex-M4 in different ways: ● U-Boot - ums gadget + m4update ● using remoteproc framework (linux userspace) ● using imx-m4fwloader from NXP (linux userspace): https://github.com/codeauroraforum/imx-m4fwloader M4 code can be linked and loaded to one of the following: ● TCM - 32KB (preferred) ● OCRAM - 32KB ● DDR - up to 1MB ● QSPI Flash - 128KB
  • 17. IDE Setup ● Eclipse for C/C+ ○ GNU MCU Eclipse : plugins and tools for embedded ARM development - https://marketplace.eclipse.org/content/gnu-mcu-eclipse ● GDB ● J-Link scripts for iMX7D for debugging both Cortex-A7 cores and Cortex-M4 - https://wiki.segger.com/IMX7D ● FreeRTOS Kernel Awareness plugin from NXP http://freescale.com/lgfiles/updates/Eclipse/KDS ● ARM DS-5 (not free) ● Sourcery Codebench (not free)
  • 19. Demo Parameters Remote core: ● Sample IMUs every 10ms ● Calculate the objective function on MCU (module of vectors) ● Buffer of 300 elements = 3Kb (stored TCM Memory only 32 Kb) ● Items (12 byte each) are dequeued and sent to master 10 at a time every 100 ms Master core: ● Master reads incoming samples by polling the character device
  • 20. Architecture Overview start_cmd, stop_cmd, heartbeatLinux 4.9 FreeRTOS 1.0.1
  • 22. Control Flow (2 cores) ● S0 RPMsg channel is down ● S1 RPMsg channel is up, /dev/rpmsg0 is created ● S2 RPMsg channel is up, endpoint created, data is dumped into a log file ● S0 RPMsg channel is down ● S1 RPMsg channel is up (sampling IMU sensor, buffering data) ● S2 RPMsg channel is up, sending data to master core, (sampling IMU sensor, buffering data), Register rpmsg char driver + probe open /dev/rpmsg0 read /dev/rpmsg0 Channel created stop_cmd Master is dead start_cmd Master heartbeat rpmsg_char_client Data sender task close /dev/rpmsg0
  • 23. What if Linux Kernel Panics ● Kexec: system call to load and boot into another kernel from the currently running kernel (4.9.74). ○ crashkernel=128M [normal kernel cmdline] ○ irqpoll, nosmp, reset_devices [crash kernel cmdline] ○ --load-panic option ● Kdump: Linux mechanism to dump machine memory content on kernel panic. ● Kexec/Kdump support on ARM platforms is still experimental
  • 24. Video of the Demo VIDEO
  • 25. Pitfalls ● Before announcing the remote service, MCU checks whether master is up. If notification arrives too early (virtqueue kick function call) when booting crash kernel the system might hang ● Sometimes kexec still hangs and fails to soft-reboot - more frequent when streaming continuously instead of sending data bursts (but we don’t know why)
  • 26. References ● OpenAMP project page: https://github.com/OpenAMP/ ● Asymmetric multiprocessing and embedded linux (ELC 2017): https://elinux.org/images/3/3b/NOVAK_CERVENKA.pdf ● Mantainers: ○ Open-amp: ■ Wendy Liang ○ RPMsg (Linux) ■ Ohad Ben-Cohen ■ Bjorn Andersson ○ Kexec (Linux) ■ Eric Biederman ○ Kdump (Linux) ■ Dave Young ■ Baoquan He
  • 27. Q/A