QEMU for Xilinx ZynqMP. V Aug-20

Similar documents
viommu/arm: full emulation and virtio-iommu approaches Eric Auger KVM Forum 2017

HKG : OpenAMP Introduction. Wendy Liang

viommu/arm: full emulation and virtio-iommu approaches Eric Auger KVM Forum 2017

QEMU and SystemC. Màrius Màrius Montón

Software Quality is Directly Proportional to Simulation Speed

Extending Fixed Subsystems at the TLM Level: Experiences from the FPGA World

ARM CORTEX-R52. Target Audience: Engineers and technicians who develop SoCs and systems based on the ARM Cortex-R52 architecture.

ARM-KVM: Weather Report Korea Linux Forum

KVM/ARM. Marc Zyngier LPC 12

Integrated Development Environment

ESE Back End 2.0. D. Gajski, S. Abdi. (with contributions from H. Cho, D. Shin, A. Gerstlauer)

Debugging uclinux on Coldfire

Virtual PLATFORMS for complex IP within system context

Hypervisors on ARM Overview and Design choices

Optimizing ARM SoC s with Carbon Performance Analysis Kits. ARM Technical Symposia, Fall 2014 Andy Ladd

High Performance Microprocessor Emulation for Software Validation Facilities and Operational Simulators. Dr. Mattias Holm

Embedded Linux Architecture

Efficient use of Virtual Prototypes in HW/SW Development and Verification

Hardware Software Bring-Up Solutions for ARM v7/v8-based Designs. August 2015

Copyright 2016 Xilinx

SoC Systeme ultra-schnell entwickeln mit Vivado und Visual System Integrator

Transaction Level Modeling with SystemC. Thorsten Grötker Engineering Manager Synopsys, Inc.

ARMv8-A Software Development

64-bit ARM Unikernels on ukvm

AN OPEN-SOURCE VHDL IP LIBRARY WITH PLUG&PLAY CONFIGURATION

Performance Optimization for an ARM Cortex-A53 System Using Software Workloads and Cycle Accurate Models. Jason Andrews

Simulation Based Analysis and Debug of Heterogeneous Platforms

ARM s IP and OSCI TLM 2.0

Designing, developing, debugging ARM Cortex-A and Cortex-M heterogeneous multi-processor systems

LCA14-107: ACPI upstreaming. Wed-5-Mar, 11:15am, Al Stone, G Gregory, Hanjun Guo

Parallella Linux - quickstart guide. Antmicro Ltd

Creating hybrid FPGA/virtual platform prototypes

Designing a Multi-Processor based system with FPGAs

Embedded Hardware and Software

Tim Kogel. June 13, 2010

Integrated Workflow to Implement Embedded Software and FPGA Designs on the Xilinx Zynq Platform Puneet Kumar Senior Team Lead - SPC

«Real Time Embedded systems» Multi Masters Systems

Virtual Platform Software Simulation for Enhanced Multi-core Software Verification

Software Development Using Full System Simulation with Freescale QorIQ Communications Processors

This presentation of uclinux-on-microblaze given

Xen on ARM ARMv7 with virtualization extensions

Trustzone Security IP for IoT

Embedded Software Dynamic Analysis. A new life for the Virtual Platform

System Simulator for x86

FPGA Manager. State of the Union. Moritz Fischer, National Instruments

2. HW/SW Co-design. Young W. Lim Thr. Young W. Lim 2. HW/SW Co-design Thr 1 / 21

Optimizing Hardware/Software Development for Arm-Based Embedded Designs

Experiences and Challenges of Transaction-Level Modelling with SystemC 2.0

Introduction to gem5. Nizamudheen Ahmed Texas Instruments

ARM Trusted Firmware From Embedded to Enterprise. Dan Handley

What is gem5 and where do I get it?

ARMv8 port of the Jailhouse hypervisor

MATLAB/Simulink 기반의프로그래머블 SoC 설계및검증

SoC Systeme ultra-schnell entwickeln mit Vivado und Visual System Integrator

ECE 598 Advanced Operating Systems Lecture 14

A So%ware Developer's Journey into a Deeply Heterogeneous World. Tomas Evensen, CTO Embedded So%ware, Xilinx

Performance Verification for ESL Design Methodology from AADL Models

Building High Performance, Power Efficient Cortex and Mali systems with ARM CoreLink. Robert Kaye

Real Safe Times in the Jailhouse Hypervisor Unrestricted Siemens AG All rights reserved

ARM Trusted Firmware Evolution HKG15 February Andrew Thoelke Systems & Software, ARM

EMBEDDED SYSTEMS WITH ROBOTICS AND SENSORS USING ERLANG

System Level Design with IBM PowerPC Models

Software Driven Verification at SoC Level. Perspec System Verifier Overview

Linux Driver and Embedded Developer

Vertical Reuse of functional verification from subsystem to SoC level (with seamless SoC emulation)

ECE 471 Embedded Systems Lecture 16

First To Market through Translation of Executable UML

Lec 13: Linking and Memory. Kavita Bala CS 3410, Fall 2008 Computer Science Cornell University. Announcements

Heterogeneous Software Architecture with OpenAMP

SR-IOV support in Xen. Yaozu (Eddie) Dong Yunhong Jiang Kun (Kevin) Tian

AOSP Devboard Update & Recent/Future Pain Points. John Stultz

Intel Graphics Virtualization on KVM. Aug KVM Forum 2011 Rev. 3

Design of Embedded DSP Processors Unit 7: Programming toolchain. 9/26/2017 Unit 7 of TSEA H1 1

Copyright 2014 Xilinx

Porting FreeBSD to AArch64

Design and Verification of FPGA Applications

SYSTEMS ON CHIP (SOC) FOR EMBEDDED APPLICATIONS

Xen on ARM. Stefano Stabellini

Hardware/Software Partitioning for SoCs. EECE Advanced Topics in VLSI Design Spring 2009 Brad Quinton

OSCI Update. Guido Arnout OSCI Chief Strategy Officer CoWare Chairman & Founder

Fast access ===> use map to find object. HW == SW ===> map is in HW or SW or combo. Extend range ===> longer, hierarchical names

Veloce2 the Enterprise Verification Platform. Simon Chen Emulation Business Development Director Mentor Graphics

The challenge of SVE in QEMU. Alex Bennée Senior Virtualization Engineer

A Meta-Modeling-Based Approach for Automatic Generation of Fault- Injection Processes

ECE 471 Embedded Systems Lecture 16

Cross-architecture Virtualisation

Optimizing Cache Coherent Subsystem Architecture for Heterogeneous Multicore SoCs

1-1 SDK with Zynq EPP

How to get realistic C-states latency and residency? Vincent Guittot

Using Formalized Programming Sequences for Higher Quality Virtual Prototypes

CSE 120 Principles of Operating Systems

Guide for getting started with SystemC development

Lecture 5. KVM for ARM. Christoffer Dall and Jason Nieh. 5 November, Operating Systems Practical. OSP Lecture 5, KVM for ARM 1/42

Malware

Parallel Simulation Accelerates Embedded Software Development, Debug and Test

Microkernels and Portability. What is Portability wrt Operating Systems? Reuse of code for different platforms and processor architectures.

ARM64 Server RAS Solutions. Jonathan (Zhixiong) Zhang Cavium Inc.

QEMU: Architecture and Internals Lecture for the Embedded Systems Course CSD, University of Crete (April 18, 2016)

Test and Verification Solutions. ARM Based SOC Design and Verification

64 bit Bare Metal Programming on RPI-3. Tristan Gingold

Transcription:

QEMU for Xilinx ZynqMP Edgar E. Iglesias <edgar.iglesias@xilinx.com> V2 2015-Aug-20

ZynqMP SoC New Chip (Zynq NG) Aggressive target for QEMU as early SW platform emulating WiP chip BootROMs, Boot-loaders, Firmware, Hypervisors, OS ports etc Schedules and Secrecy QEMU is fast and scales to large userbase compared to RTL based simulations

Thanks Xilinx John Williams and Peter Ryser Peter C, Alistair Francis, Sai Pavan

Machine description Flat Device Tree Devices matched with compat props Links between devs DMA stream connections GPIOs, Interrupts, Memory Regions, etc Issue: QEMU specific device-tree Started simple but improved by Peter C and others QoM related work

Simplified bus approximation

PMA - Per Master AddressSpace(s) Per CPU AdressSpaces Useful to avoid and easily debug DMA related AS errors Memory regions are described in FDT syntax Common setup mechanism for devs/cpus missing upstream Multiple AS:s per CPU (Maydell)

Cortex A53 and Cortex R5

Cortex A53 ARMv8 Thanks to Alexander Graf, Peter Maydell and others EL1 and EL0 were functional and quite stable Kernel and User-space

A53 Software stack EL3 and 2 missing

EL3 and EL2 Xilinx focused on AArch64 modes GIC virtualization, virtual interrupts, 2- stage MMU, exception model, virtual timers Community effort (Maydell, Greg, Fabian, Sergey and more) Still lots missing upstream (Huge spec) Xilinx tree limited but runs emulated XEN/KVM/ATF

Bus approximation MemAttrs NS, MasterID, etc

Memory Attributes AS based first attempt Very messy with the IOMMUs Xilinx MemAttr changes to the MemAPI Peter Maydell did a better implementation of the same that eventually got merged Xilinx: MemAttrs are QoM objects, making it easy to create them and assign them with FDT syntax

Model of IOMMUs ARM SMMU model (limited and fixed cfg) R5s and Control processors are behind the IOMMUs Turned out to be fairly complex but also very helpful in SW driver bring-up Helped find and fix errors in the XEN SMMU drivers and in our RTL!

Bus approximation: Multi-arch?

Multi-arch June 2013 QEMU didn't seem to be close enough for single build with multi-arch (Despite good efforts from multiple people including Andreas F) Looking ahead, MMTCG and MultiArch look promising

Remote-Port QEMU to QEMU proxy First prototype based on hacked Qtest Binary protocol using shared memory maps for RAM sharing RP devices, bus master, bus slave, GPIO, DMA Stream, core (setup, sync, atomic ops) Multiple QEMUs run in parallel Keep it simple, one big QEMU, a few tiny remote ones attaching CPUs and mostly IRQs.

Bus approximation: Remote Port

Remote-Port RAMs are mapped SHARED into all instances (- mem-path) Bus accesses, interrupts, sync and DMA-stream are forwarded over sockets Atomic ops are done with IPC semaphores (translators need modifications) TLB flushes for inter-core code modifications not supported (could be implemented but hasn't been needed yet..).

SystemC / TLM SystemC, C++ class libs for simulating systems TLM: Inter-operability extensions for connecting models from different vendors into a larger system OpenSource simulator from OSCI Increasingly used by chip design teams Acts as a glue/binding between models written in different languages (e.g Verilog, VHDL, C, etc)

SystemC / TLM QEMU runs with Icount Timer based sync-calls stops QEMU from running to far a head of time (configurable quantum) Time-scaling and warping may be used to trade real-time experience vs accuracy

Verilator Open Source Verilog to SystemC (or C++) compiler Generated SystemC easily integrated into SystemC/TLM. It all runs with free tools QEMU, OSCIs OpenSource SystemC sim, Verilator, gtkwave.

Tools binary tracing Qemu-etrace Binary trace emitted by QEMU Exec, gpio, mem, asm Processed by external tool Post-process trace files Live processing via unix sockets

Tools etrace Qemu-etrace Decode traces into human readable form Load ELF files to provide symbol info Collects code coverage statistics mapping executed addresses back into source code lines by reverse lookup of debug info Emits lcov info files, lcovs genhtml can then generate nice HTML reports

Debugging GDB session break driven by LOG_GUEST_ERROR ARMv8 specific extensions easily switch virtual memory view between Els Access to more sysregs A64/A32 Reg mapping hacks Issues: We have problems with the runstate control in GDB. (Run a specific core for a while etc)

Qtesting Qtest with TCG CPUs Python classes QEMU.apu.bus32[0x1000] = 0xa0 Val = QEMU.apu.bus16[0x1000] QEMU.set_irq(name, val) Scripted tests for embedded SW Corner cases, HW errors, etc

Model autogen Data driven register decode/accesses Common practice in RTL design Auto-generate RTL, C header files, documentation from a single source of reg description We extended this to generate QEMU skeletons for models Identify patterns and auto-generate interrupt controllers / logic

Questions Thanks for listening