xref: /qemu/docs/system/arm/vexpress.rst (revision a5dbb175077c93c8d2e1021757f8b9a593fc2b5e)
15a1d4244SPeter MaydellArm Versatile Express boards (``vexpress-a9``, ``vexpress-a15``)
25a1d4244SPeter Maydell================================================================
35a1d4244SPeter Maydell
45a1d4244SPeter MaydellQEMU models two variants of the Arm Versatile Express development
55a1d4244SPeter Maydellboard family:
65a1d4244SPeter Maydell
75a1d4244SPeter Maydell- ``vexpress-a9`` models the combination of the Versatile Express
85a1d4244SPeter Maydell  motherboard and the CoreTile Express A9x4 daughterboard
95a1d4244SPeter Maydell- ``vexpress-a15`` models the combination of the Versatile Express
105a1d4244SPeter Maydell  motherboard and the CoreTile Express A15x2 daughterboard
115a1d4244SPeter Maydell
125a1d4244SPeter MaydellNote that as this hardware does not have PCI, IDE or SCSI,
135a1d4244SPeter Maydellthe only available storage option is emulated SD card.
145a1d4244SPeter Maydell
155a1d4244SPeter MaydellImplemented devices:
165a1d4244SPeter Maydell
175a1d4244SPeter Maydell- PL041 audio
185a1d4244SPeter Maydell- PL181 SD controller
195a1d4244SPeter Maydell- PL050 keyboard and mouse
205a1d4244SPeter Maydell- PL011 UARTs
215a1d4244SPeter Maydell- SP804 timers
225a1d4244SPeter Maydell- I2C controller
235a1d4244SPeter Maydell- PL031 RTC
245a1d4244SPeter Maydell- PL111 LCD display controller
255a1d4244SPeter Maydell- Flash memory
265a1d4244SPeter Maydell- LAN9118 ethernet
275a1d4244SPeter Maydell
285a1d4244SPeter MaydellUnimplemented devices:
295a1d4244SPeter Maydell
305a1d4244SPeter Maydell- SP810 system control block
315a1d4244SPeter Maydell- PCI-express
325a1d4244SPeter Maydell- USB controller (Philips ISP1761)
335a1d4244SPeter Maydell- Local DAP ROM
345a1d4244SPeter Maydell- CoreSight interfaces
355a1d4244SPeter Maydell- PL301 AXI interconnect
365a1d4244SPeter Maydell- SCC
375a1d4244SPeter Maydell- System counter
385a1d4244SPeter Maydell- HDLCD controller (``vexpress-a15``)
395a1d4244SPeter Maydell- SP805 watchdog
405a1d4244SPeter Maydell- PL341 dynamic memory controller
415a1d4244SPeter Maydell- DMA330 DMA controller
425a1d4244SPeter Maydell- PL354 static memory controller
435a1d4244SPeter Maydell- BP147 TrustZone Protection Controller
445a1d4244SPeter Maydell- TrustZone Address Space Controller
455a1d4244SPeter Maydell
465a1d4244SPeter MaydellOther differences between the hardware and the QEMU model:
475a1d4244SPeter Maydell
485a1d4244SPeter Maydell- QEMU will default to creating one CPU unless you pass a different
495a1d4244SPeter Maydell  ``-smp`` argument
505a1d4244SPeter Maydell- QEMU allows the amount of RAM provided to be specified with the
515a1d4244SPeter Maydell  ``-m`` argument
525a1d4244SPeter Maydell- QEMU defaults to providing a CPU which does not provide either
535a1d4244SPeter Maydell  TrustZone or the Virtualization Extensions: if you want these you
545a1d4244SPeter Maydell  must enable them with ``-machine secure=on`` and ``-machine
555a1d4244SPeter Maydell  virtualization=on``
565a1d4244SPeter Maydell- QEMU provides 4 virtio-mmio virtio transports; these start at
575a1d4244SPeter Maydell  address ``0x10013000`` for ``vexpress-a9`` and at ``0x1c130000`` for
585a1d4244SPeter Maydell  ``vexpress-a15``, and have IRQs from 40 upwards. If a dtb is
595a1d4244SPeter Maydell  provided on the command line then QEMU will edit it to include
605a1d4244SPeter Maydell  suitable entries describing these transports for the guest.
61*a5dbb175SAlex Bennée
62*a5dbb175SAlex BennéeBooting a Linux kernel
63*a5dbb175SAlex Bennée----------------------
64*a5dbb175SAlex Bennée
65*a5dbb175SAlex BennéeBuilding a current Linux kernel with ``multi_v7_defconfig`` should be
66*a5dbb175SAlex Bennéeenough to get something running. Nowadays an out-of-tree build is
67*a5dbb175SAlex Bennéerecommended (and also useful if you build a lot of different targets).
68*a5dbb175SAlex BennéeIn the following example $BLD points to the build directory and $SRC
69*a5dbb175SAlex Bennéepoints to the root of the Linux source tree. You can drop $SRC if you
70*a5dbb175SAlex Bennéeare running from there.
71*a5dbb175SAlex Bennée
72*a5dbb175SAlex Bennée.. code-block:: bash
73*a5dbb175SAlex Bennée
74*a5dbb175SAlex Bennée  $ make O=$BLD -C $SRC ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- multi_v7_defconfig
75*a5dbb175SAlex Bennée  $ make O=$BLD -C $SRC ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
76*a5dbb175SAlex Bennée
77*a5dbb175SAlex BennéeBy default you will want to boot your rootfs off the sdcard interface.
78*a5dbb175SAlex BennéeYour rootfs will need to be padded to the right size. With a suitable
79*a5dbb175SAlex BennéeDTB you could also add devices to the virtio-mmio bus.
80*a5dbb175SAlex Bennée
81*a5dbb175SAlex Bennée.. code-block:: bash
82*a5dbb175SAlex Bennée
83*a5dbb175SAlex Bennée  $ qemu-system-arm -cpu cortex-a15 -smp 4 -m 4096 \
84*a5dbb175SAlex Bennée      -machine type=vexpress-a15 -serial mon:stdio \
85*a5dbb175SAlex Bennée      -drive if=sd,driver=file,filename=armel-rootfs.ext4 \
86*a5dbb175SAlex Bennée      -kernel zImage  \
87*a5dbb175SAlex Bennée      -dtb vexpress-v2p-ca15-tc1.dtb \
88*a5dbb175SAlex Bennée      -append "console=ttyAMA0 root=/dev/mmcblk0 ro"
89