xref: /openbmc/qemu/docs/system/arm/vexpress.rst (revision 932a8d1f)
1Arm Versatile Express boards (``vexpress-a9``, ``vexpress-a15``)
2================================================================
3
4QEMU models two variants of the Arm Versatile Express development
5board family:
6
7- ``vexpress-a9`` models the combination of the Versatile Express
8  motherboard and the CoreTile Express A9x4 daughterboard
9- ``vexpress-a15`` models the combination of the Versatile Express
10  motherboard and the CoreTile Express A15x2 daughterboard
11
12Note that as this hardware does not have PCI, IDE or SCSI,
13the only available storage option is emulated SD card.
14
15Implemented devices:
16
17- PL041 audio
18- PL181 SD controller
19- PL050 keyboard and mouse
20- PL011 UARTs
21- SP804 timers
22- I2C controller
23- PL031 RTC
24- PL111 LCD display controller
25- Flash memory
26- LAN9118 ethernet
27
28Unimplemented devices:
29
30- SP810 system control block
31- PCI-express
32- USB controller (Philips ISP1761)
33- Local DAP ROM
34- CoreSight interfaces
35- PL301 AXI interconnect
36- SCC
37- System counter
38- HDLCD controller (``vexpress-a15``)
39- SP805 watchdog
40- PL341 dynamic memory controller
41- DMA330 DMA controller
42- PL354 static memory controller
43- BP147 TrustZone Protection Controller
44- TrustZone Address Space Controller
45
46Other differences between the hardware and the QEMU model:
47
48- QEMU will default to creating one CPU unless you pass a different
49  ``-smp`` argument
50- QEMU allows the amount of RAM provided to be specified with the
51  ``-m`` argument
52- QEMU defaults to providing a CPU which does not provide either
53  TrustZone or the Virtualization Extensions: if you want these you
54  must enable them with ``-machine secure=on`` and ``-machine
55  virtualization=on``
56- QEMU provides 4 virtio-mmio virtio transports; these start at
57  address ``0x10013000`` for ``vexpress-a9`` and at ``0x1c130000`` for
58  ``vexpress-a15``, and have IRQs from 40 upwards. If a dtb is
59  provided on the command line then QEMU will edit it to include
60  suitable entries describing these transports for the guest.
61
62Booting a Linux kernel
63----------------------
64
65Building a current Linux kernel with ``multi_v7_defconfig`` should be
66enough to get something running. Nowadays an out-of-tree build is
67recommended (and also useful if you build a lot of different targets).
68In the following example $BLD points to the build directory and $SRC
69points to the root of the Linux source tree. You can drop $SRC if you
70are running from there.
71
72.. code-block:: bash
73
74  $ make O=$BLD -C $SRC ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- multi_v7_defconfig
75  $ make O=$BLD -C $SRC ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
76
77By default you will want to boot your rootfs off the sdcard interface.
78Your rootfs will need to be padded to the right size. With a suitable
79DTB you could also add devices to the virtio-mmio bus.
80
81.. code-block:: bash
82
83  $ qemu-system-arm -cpu cortex-a15 -smp 4 -m 4096 \
84      -machine type=vexpress-a15 -serial mon:stdio \
85      -drive if=sd,driver=file,filename=armel-rootfs.ext4 \
86      -kernel zImage  \
87      -dtb vexpress-v2p-ca15-tc1.dtb \
88      -append "console=ttyAMA0 root=/dev/mmcblk0 ro"
89