Workshop 5, Technical support for safety critical systems:

Virtualization as a mean to isolate applications of different criticality in a multi-core system

4th Scandinavian Conference on SYSTEM & SOFTWARE SAFETY

March 17, 2016 Joakim Nilsson Nohau Solutions AB Phone: +46 (0)40-59 22 08 [email protected] www.nohau.se Nohau customers ABB AB, ACTIA Nordic AB, ARRIS Sweden AB, Anite Telecoms Oy, Anoto AB, Atlas Copco Industrial Technique AB, Atlas Copco Rock Drills AB, Atlas Copco Secoroc AB, Autoliv Electronics AB, Autronica Fire and Security AS, Axis Communications AB, BAE Systems Hägglunds AB, Breas Medical AB, Bittium Wireless Ltd, BorgWarner TorqTransfer Systems AB, Broadcom Corporation, CPAC Systems AB, Clavia DMI AB, Coriant Oy, Delphi AB, Denso Sales Sweden AB, Eltek AS, Enea AB, AB, European Spallation Source ERIC AB, FLIR Systems AB, Huawei Technologies Oy, Husqvarna AB, Hydroware Elevation Technology AB, Innokas Medical Engineering Oy, Intel Finland Oy, Kongsberg, Maquet Critical Care AB, Metso Flow Control Oy, Microsoft Mobile Oy, Nokia Solutions and Networks Oy, Norwegian Defence Communications, OY LM Ericsson AB, Planmeca Oy, Prevas AB, Posiva Oy, QRtech AB, RUAG Space AB, Saab AB, SCANIA CV AB, SECTRA Communications AB, Scandinavian Radio Technology AB, Siemens AB, Sigma Connectivity AB, Sony Mobile Communications AB, Space Systems Finland Oy, Structab AB, Suunto Oy, Teollisuuden Voima Oyj, Transmode Systems AB, VSM Group AB, VTT, Vacon Oyj, Volvo Car Corporation, Volvo Construction Equipment AB, Volvo Information Technology AB, Westermo Research and Development AB, Wärtsilä Finland Oy, ... Concerns: Safety and Security!

Leak Buffer Overrun Coding Standard Use after Violation Free

Uninitialized Variable Data Race

Overflow

Information Disclosure

Null Pointer Dereference Safety Security Nohau’s motto:

”Every Software Developer Deserves Great Tools and Support”

Strengthen embedded software development in the Nordics by bringing the right skills and advanced tool technology

(always scouting world-wide for better ways)

• Insight (visualization & measurements)

• Automation

• Right skills: Functional Safety (e.g. standards, MISRA), /C++, tools)

Top-ranked solutions Today’s topic

Virtualization as a mean to isolate applications of different criticality in a multi-core system

© SYSGO AG 6 SYSGO Facts

• An embedded software technology leader • COTS products & related services for most demanding industrial systems • Founded in 1991, privately owned until 2012 • Now owned by Thales Group • Over 110 employees • Business successful • Profitable • Growing • Strong financial backup • International presence • Offices in Germany (Mainz, Ulm, Rostock, Hamburg), France (Paris, Lyon), The Czech Republic (Prague) • Distributors in Japan, Korea, Austria, Russia, Scandinavia

© SYSGO AG 7 Company history 2012: Part of Thales Group 2 011: 2005: 100% increase PikeOS incoming orders Market introduction

2003: PikeOS Research Pr o j ect

1999: ELinOS 2013: st Market introduction 1 SIL4 1992: multicore Distributor for certification Safety-Critical 2010: RTOS Record 2008: turnover Tier-1 Airbus 2003: supplier ELinOS Product of The 2000: Year 1st DO178B DAL A Certification 1997: 1st Embedded Foundation project as RTOS Services8 Company

© SYSGO AG 8 Markets

We consider our target markets to be all industries related to Embedded Systems in which safety, security and certification are required.

© SYSGO AG 9 PikeOS in a Nutshell

Hard Real Time • PikeOS is a hard real time

Separation Kernel • Fast and efficient Micro-Kernel with separation capabilities Architecture Safe & Secure • PikeOS is a virtualization platform for safety and security critical systems Mixed Criticality • Applications with different safety and security levels can run on the same hardware, protected from each other by means of software partitioning Multiple Guest OS - • OS-environments: Linux, Android, AUTOSAR, Posix, … Personalities • APIs and Run-time environments: ARINC-653, Java, ADA, … Highly Portable • Supports all important CPU Architectures like ARM, , PowerPC, MIPS and Sparc (requires at least a 32bit processor with MMU) Certifiable • Certifiable according to Highest Safety and Security Standards • Certification Kit for Safety Critical Avionics (DO-178B), Industrial Automation (61508) and Transportation Applications (55128); working on Automotive (26262) and security (CC EAL6) No export restrictions • Fully European source, no export controls, no ITAR controls

© SYSGO AG 10 PikeOS Architecture – RTOS With Virtualization

App.App. App.App. App.App. Volume System Provider Partition

Para-Virtualized PikeOS HW Virtualized Guest OS (Native, POSIX, Guest OS PikeOS Native Linux, Android, ARINC653, ...) Linux, Android AUTOSAR Device Driver

User Space /

Partitions System System PikeOS System Software Extension Extension

PikeOS Kernel Space / Hypervisor Architecture Platform Kernel Level Support Package Support Package Driver

Target Boot Loader Bootloader / Hardware CPU1 Serial CAN Hardware Ethernet Graphics ...

© SYSGO AG 11 PikeOS - Personalities

PikeOS Hypervisor

Hardware

© SYSGO AG 12 Technical features

• Up to 63 resource partitions

• Up to 63 time partitions

• 253 priorities

• Less than 30 ms boot time

• 192kB RAM, 192kB ROM

© SYSGO AG 13 PikeOS in Automotive

• Certification-ready for ISO 26262 • Mixed safety and security levels possible on one system • Safe & secure partitioning on a proven hypervisor technology • Ideal coexistence with automotive APIs • AUTOSAR, POSIX, PikeOS Native, Linux, Android • Provide fast boot functionality • Bring up critical partitions first • Boost your time to market • 3rd party supplier products in separated partitions • Reduce dependencies and limit error propagation

© SYSGO AG 14 Integrated Automotive Platform

• Clustering software functions • Reduce number of ECUs • Software separation • High responsiveness • Secure SW updates • Secure boot • High-performance shared graphics • Applications of different security levels, different criticality levels, real-time or non-real-time, can run concurrently on a single SoC

• Safety and Security are essential!

© SYSGO AG 15 PikeOS Automotive Infotainment Example

Safe and MILS Cluster and Secure Architecture Driver Separation Assistance

Flexible App Integration

Certifiable Kernel Shared Drivers

Multi-Core Support

© SYSGO AG 16 PikeOS Automotive Connectivity Example

Combine RT, Early Start Safety and of Critical MCU Connectivity Partitions Replacement

Add Certifiable Connectivity Kernel and Extend AUTOSAR Functionality

Multi-Core Support

© SYSGO AG 17 SYSGO PikeOS Certified Projects

• IEC 61508 SIL3/4

• EN 50128 SIL 4

• EN 50128 SIL4 on Multi-Core

• DO-178B DAL B / DAL A

• CSPN (France) ≈ EAL 4+

• BSI EAL 5+/6 (in progress)

© SYSGO AG 18

© SYSGO AG 19 Mixed Criticality Mixing Real-Time and Non real.Time

SIL 1 SIL 0 SIL 3 No RT No RT Real-Time • Applications of different safety levels • Guaranteed hard real- App. App. App.App. App.App. • Clear separationSystem and App. App. time Real-Time

fault containmentPartition Application • Deterministic Scheduling PikeOS Runtime Guest OS Guest OS (Native, POSIX, • Modular PikeOSCertification Native (Java, Ada, PikeOS Native Linux, Android Linux, Android ARINC653, ...) legacy) • Centralized fault

managament • PikeOS HypervisorOptimize CPU PikeOS Hypervisor Utilization

GPL Isolation Hardware Convergence Your IP GPL SYSGO IP • Reduce Cost, Weight, • Separation of proprietary Size, Cabling and Integration Complexity App. App.IP and Open Source App. App. System App.App. App.App. System • Legally ProvenPartition • Manage HardwarePartition

PikeOS PikeOS Obsolescense Guest OS Guest OS (Native, POSIX, PikeOS Native (Native, POSIX, PikeOS Native Linux, Android Linux, Android ARINC653, ...) ARINC653, ...) • Hardware Independence

• Reuse existing Source Code PikeOS Hypervisor PikeOS Hypervisor

© SYSGO AG 20 PikeOS HWParavirtualization Virtualization SupportSupport

• All virtual machines execute within separated partitions • Partitions are protected by safe and secure segregation • Virtualization is a common option, but not mandatory

User Guest Supervisor PikeOS Posix PikeOS Native Operating P4Linux ASIL C ASIL C User System

PSSW

Supervisor PikeOS Hypervisor

Hypervisor Hypervisor CPU HARDWARE MAP Timer IC Core 1 Core 2

© SYSGO AG 21 The Hypervisor - ARM TrustZone Support

• PikeOS implements TrustZone Normal World Secure World

Monitor (no virtualization) Para-Virt. Guest

• CPU Cores are allocated to “Normal” and App App App “Secure World” App • PikeOS is running in “Secure World” Linux • All features of PikeOS are available • Para-Virtualized guest operating systems App App App are supported PikeOS • Unmodified guest OS can run in “Normal World” Linux • Runs with native performance • Direct access to hardware when enabled for “normal world” PikeOS TrustZone Monitor • Communication between “trusted” and “normal” world through P4-Bus • Access to File Provider, Port Provider, ARM Cortex A9 SoC Console, Part. Control, Target Control, Time Part. Control, ...

© SYSGO AG 22 PikeOS Resource Partitioning

• Container for User Applications Separated resource partitions • One or more applications can share a resource partition

• Static configured set of resources and privileges App.App. App.App. System Partition

• Application has guaranteed access PikeOS Guest OS (Native, POSIX, PikeOS Native Linux, Android to assigned resources ARINC653, ...)

• No Access to resources of other partitions if not explicitly configured • No error propagation throughout other PikeOS Hypervisor partitions • Memory protection enforcement Hardware using Hardware (MMU) • All partitions execute in user mode

© SYSGO AG 23 Resource Partitioning

Guaranteed Privileged Partition No Error Access to • Restart / MMU Propagation Assigned Shutdown Map Memory to Resources Partitions • Direct Mapping of Physical Resources Communication Data Base Control System Part. • Change & Security Application Health Mon. Scheduling CBIT

Adress-Space

Linux Linux Soft-PLC Native Execute in Static User Mode Configuration of OS Resources PikeOS Hypervisor

Execute in IOMMU Kernel Mode Memory access for DMA Devices

© SYSGO AG 24 PikeOS Time Partitioning

• Static configuration of 40 tpTicks 10 tpTicks 20 tpTicks execution order and duration

• Deterministic Hard Real-time tp1 tp2 tp3 • Guaranteed WCET Scheduler – Priority/Preemptive time • Shortest response time • Dedicated thread with superior priority App. App. App. App. App. App. App.App.

• Best possible CPU usage

PikeOS • Partition ‘0’ Android AUTOSAR PikeOS POSIX Native • Threads with high priority can preempt active partition • Threads with low priority can act PikeOS Hypervisor as global idle-job

© SYSGO AG 25 Hardware ecosystem

26

© SYSGO AG 26 Software ecosystem

27

© SYSGO AG 27 SYSGO’s Users

28

© SYSGO AG 28