xref: /openbmc/qemu/docs/system/arm/vexpress.rst (revision 2f926bfd)
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- QEMU does not currently support either dynamic or static remapping
62  of the area of memory at address 0: it is always mapped to alias
63  the first flash bank
64
65Booting a Linux kernel
66----------------------
67
68Building a current Linux kernel with ``multi_v7_defconfig`` should be
69enough to get something running. Nowadays an out-of-tree build is
70recommended (and also useful if you build a lot of different targets).
71In the following example $BLD points to the build directory and $SRC
72points to the root of the Linux source tree. You can drop $SRC if you
73are running from there.
74
75.. code-block:: bash
76
77  $ make O=$BLD -C $SRC ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- multi_v7_defconfig
78  $ make O=$BLD -C $SRC ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
79
80By default you will want to boot your rootfs off the sdcard interface.
81Your rootfs will need to be padded to the right size. With a suitable
82DTB you could also add devices to the virtio-mmio bus.
83
84.. code-block:: bash
85
86  $ qemu-system-arm -cpu cortex-a15 -smp 4 -m 4096 \
87      -machine type=vexpress-a15 -serial mon:stdio \
88      -drive if=sd,driver=file,filename=armel-rootfs.ext4 \
89      -kernel zImage  \
90      -dtb vexpress-v2p-ca15-tc1.dtb \
91      -append "console=ttyAMA0 root=/dev/mmcblk0 ro"
92