eCos Support for ARM Virtual Machines — Overview
This document covers the configuration and usage of eCos and RedBoot on ARM Aarch32 Virtual Machines. It supports Virtual Machines using a limited number of real device emulations as well as some VirtIO based devices. It has been tested using virtual machines under QEMU and Xvisor; both of these will be referred to as hypervisors for convenience.
eCos applications are typically developed using the host-based gdb debugger, communicating with a "gdb stub" built-in to either RedBoot or the hypervisor. For RedBoot-based development, the VM is set up to boot into RedBoot either from a ROM image or from an image inserted into RAM from the hypervisor. RedBoot incorporates a gdb stub that enables eCos applications to be downloaded and debugged either via a serial line or over Ethernet. When running under QEMU, such applications may also be debugged using QEMU's GDB stub interface.
Finished eCos ROM startup applications can be deployed directly by a hypervisor, copying its image into a VM and booting the VM.
This documentation is expected to be read in conjunction with the ARM architecture HAL documentation and further device support and subsystems are described and documented there.
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.
- 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. Both QEMU and Xvisor support 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.
- VirtIO GPIO
- Support is present for a VirtIO GPIO controller where it is supported by the hypervisor.
- Rockchip SPI
- A driver for the Rockchip SPI controller is present. This controller may either be emulated by the hypervisor, or may be accessed directly using hypervisor passthrough support when the host is a Rockchip device.
- Rockchip Timer
- Support for the Rockchip timer device is present in the HAL. This device may be emulated or be a real timer accessed using hypervisor passthrough support.
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.
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.
|2020-06-15||eCosPro Non-Commercial Public License|