Name

eCos Support for Xvisor Virtual Machines — Overview

Description

This document covers the configuration and usage of eCos and RedBoot on ARM Aarch32 Virtual Machines running under the Xvisor hypervisor. Only devices that are emulated by Xvisor, or are accessed through VirtIO interfaces are used, so this should run under Xvisor on any ARM host.

eCos applications are typically developed using the host-based gdb debugger, communicating with a "gdb stub" built-in to RedBoot. The VM is set up to boot into RedBoot from a ROM image. RedBoot incorporates a gdb stub that enables eCos applications to be downloaded and debugged either via a serial line or over Ethernet.

Support for SMP operation is available, although debugging support is restricted to use diagnostic messages. There is no SMP debug support in RedBoot. The emulated virtual GIC supports up to eight CPUs, by default eCos is configured to use four CPUs.

Finished eCos ROM startup applications can be deployed directly by the hypervisor by replacing RedBoot with the application binary.

This documentation is expected to be read in conjunction with the ARM architecture HAL and Virtual Machine Support documentation; further device support and subsystems are described and documented there.

Supported Hardware

eCos currently runs in single processor mode on an ARM Aarch32 Virtual Machine. The following devices are currently supported by this port.

Generic Interrupt Controller
The ARM GIC is used to handle interrupts. The GIC needs to be memory-mapped. Interrupt vector mapping is defined in this package.
Generic Timer
The ARM architecture Generic Timer is used to supply the system timer. eCos used the virtual counter and timer in order to insulate it from hypervisor scheduling. The timer is accessed through the CP15 register set.
Emulated UART
ARM PL011 UART macrocell. Xvisor supports an emulation of this device and drivers are available in RedBoot and eCos to support it.
VirtIO Console
Support for the VirtIO console device class is present in both RedBoot and eCos.
VirtIO NET
Ethernet access is via a VirtIO NET device. The hypervisor is then responsible for routing packets to other VMs or an external network connection.
VirtIO RPMSG
Support is present for using a VirtIO RPMSG interface. This supports the RPMSG subsystem library to present a standard RPMSG API to user applications.

In general, devices are initialized only as far as is necessary for eCos to run. Other devices are not touched unless the appropriate driver is loaded.

Tools

The board support is intended to work with GNU tools configured for an arm-eabi target. The original port was undertaken using arm-eabi-gcc version 7.3.0, arm-eabi-gdb version 8.1, and binutils version 2.30.