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