1324b2298SPaolo Bonzini.. _ARM-System-emulator: 2324b2298SPaolo Bonzini 3d3149c59SPeter MaydellArm System emulator 4324b2298SPaolo Bonzini------------------- 5324b2298SPaolo Bonzini 6d3149c59SPeter MaydellQEMU can emulate both 32-bit and 64-bit Arm CPUs. Use the 7d3149c59SPeter Maydell``qemu-system-aarch64`` executable to simulate a 64-bit Arm machine. 8d3149c59SPeter MaydellYou can use either ``qemu-system-arm`` or ``qemu-system-aarch64`` 9d3149c59SPeter Maydellto simulate a 32-bit Arm machine: in general, command lines that 10d3149c59SPeter Maydellwork for ``qemu-system-arm`` will behave the same when used with 11d3149c59SPeter Maydell``qemu-system-aarch64``. 12d3149c59SPeter Maydell 13d3149c59SPeter MaydellQEMU has generally good support for Arm guests. It has support for 14d3149c59SPeter Maydellnearly fifty different machines. The reason we support so many is that 15d3149c59SPeter MaydellArm hardware is much more widely varying than x86 hardware. Arm CPUs 16d3149c59SPeter Maydellare generally built into "system-on-chip" (SoC) designs created by 17d3149c59SPeter Maydellmany different companies with different devices, and these SoCs are 18d3149c59SPeter Maydellthen built into machines which can vary still further even if they use 19d3149c59SPeter Maydellthe same SoC. Even with fifty boards QEMU does not cover more than a 20d3149c59SPeter Maydellsmall fraction of the Arm hardware ecosystem. 21d3149c59SPeter Maydell 22d3149c59SPeter MaydellThe situation for 64-bit Arm is fairly similar, except that we don't 23d3149c59SPeter Maydellimplement so many different machines. 24d3149c59SPeter Maydell 25d3149c59SPeter MaydellAs well as the more common "A-profile" CPUs (which have MMUs and will 26d3149c59SPeter Maydellrun Linux) QEMU also supports "M-profile" CPUs such as the Cortex-M0, 27d3149c59SPeter MaydellCortex-M4 and Cortex-M33 (which are microcontrollers used in very 28d3149c59SPeter Maydellembedded boards). For most boards the CPU type is fixed (matching what 29d3149c59SPeter Maydellthe hardware has), so typically you don't need to specify the CPU type 30d3149c59SPeter Maydellby hand, except for special cases like the ``virt`` board. 31d3149c59SPeter Maydell 32d3149c59SPeter MaydellChoosing a board model 33d3149c59SPeter Maydell====================== 34d3149c59SPeter Maydell 35d3149c59SPeter MaydellFor QEMU's Arm system emulation, you must specify which board 36d3149c59SPeter Maydellmodel you want to use with the ``-M`` or ``--machine`` option; 37d3149c59SPeter Maydellthere is no default. 38d3149c59SPeter Maydell 39d3149c59SPeter MaydellBecause Arm systems differ so much and in fundamental ways, typically 40d3149c59SPeter Maydelloperating system or firmware images intended to run on one machine 41d3149c59SPeter Maydellwill not run at all on any other. This is often surprising for new 42d3149c59SPeter Maydellusers who are used to the x86 world where every system looks like a 43d3149c59SPeter Maydellstandard PC. (Once the kernel has booted, most userspace software 44d3149c59SPeter Maydellcares much less about the detail of the hardware.) 45d3149c59SPeter Maydell 46d3149c59SPeter MaydellIf you already have a system image or a kernel that works on hardware 47d3149c59SPeter Maydelland you want to boot with QEMU, check whether QEMU lists that machine 48d3149c59SPeter Maydellin its ``-machine help`` output. If it is listed, then you can probably 49d3149c59SPeter Maydelluse that board model. If it is not listed, then unfortunately your image 50d3149c59SPeter Maydellwill almost certainly not boot on QEMU. (You might be able to 51d3149c59SPeter Maydellextract the filesystem and use that with a different kernel which 52d3149c59SPeter Maydellboots on a system that QEMU does emulate.) 53d3149c59SPeter Maydell 54d3149c59SPeter MaydellIf you don't care about reproducing the idiosyncrasies of a particular 55d3149c59SPeter Maydellbit of hardware, such as small amount of RAM, no PCI or other hard 56d3149c59SPeter Maydelldisk, etc., and just want to run Linux, the best option is to use the 57d3149c59SPeter Maydell``virt`` board. This is a platform which doesn't correspond to any 58d3149c59SPeter Maydellreal hardware and is designed for use in virtual machines. You'll 59d3149c59SPeter Maydellneed to compile Linux with a suitable configuration for running on 60d3149c59SPeter Maydellthe ``virt`` board. ``virt`` supports PCI, virtio, recent CPUs and 61d3149c59SPeter Maydelllarge amounts of RAM. It also supports 64-bit CPUs. 62d3149c59SPeter Maydell 63d3149c59SPeter MaydellBoard-specific documentation 64d3149c59SPeter Maydell============================ 65d3149c59SPeter Maydell 66b6e50ad0SPeter Maydell.. 67b6e50ad0SPeter Maydell This table of contents should be kept sorted alphabetically 68b6e50ad0SPeter Maydell by the title text of each file, which isn't the same ordering 69b6e50ad0SPeter Maydell as an alphabetical sort by filename. 70b6e50ad0SPeter Maydell 71c11a8e89SPeter Maydell.. toctree:: 720553ef42SNiek Linnenbank :maxdepth: 1 73324b2298SPaolo Bonzini 74c11a8e89SPeter Maydell arm/integratorcp 75ba7912a5SPeter Maydell arm/mps2 769f8f640eSPeter Maydell arm/musca 77c11a8e89SPeter Maydell arm/realview 780339c2a8SAlex Bennée arm/sbsa 79b6e50ad0SPeter Maydell arm/versatile 805a1d4244SPeter Maydell arm/vexpress 817a1e049aSCédric Le Goater arm/aspeed 828d7f954aSqianfan Zhao arm/bananapi_m2u.rst 8341581f13SInès Varhol arm/b-l475e-iot01a.rst 84c9f8511eSBin Meng arm/sabrelite 85af3f5c4fSPeter Maydell arm/highbank 862d21dd17SPeter Maydell arm/digic 87d4a7c362SPeter Maydell arm/cubieboard 883f65df38SPeter Maydell arm/emcraft-sf2 89f99e1d31SPeter Maydell arm/exynos 906a98e614SPeter Maydell arm/fby35 91c11a8e89SPeter Maydell arm/musicpal 92fa6c9394SPeter Maydell arm/kzm 93af3f5c4fSPeter Maydell arm/nrf 9482c703feSHavard Skinnemoen arm/nuvoton 95b1b3e3e3SPeter Maydell arm/imx25-pdk 96*946f9ef2SPeter Maydell arm/mcimx6ul-evk 97*946f9ef2SPeter Maydell arm/mcimx7d-sabre 980553ef42SNiek Linnenbank arm/orangepi 99d9f2ac3dSPhilippe Mathieu-Daudé arm/raspi 100b76b60f5SPeter Maydell arm/collie 101b6e50ad0SPeter Maydell arm/sx1 102b6e50ad0SPeter Maydell arm/stellaris 1031af060e5SAlexandre Iooss arm/stm32 1046a0b7505SPeter Maydell arm/virt 105733766cdSVikram Garhwal arm/xenpvh 106af3f5c4fSPeter Maydell arm/xlnx-versal-virt 1072d30506dSSai Pavan Boddu arm/xlnx-zynq 1086128720aSPeter Maydell arm/xlnx-zcu102 10934f18ab1SPeter Maydell 110741292faSPeter MaydellEmulated CPU architecture support 111741292faSPeter Maydell================================= 112741292faSPeter Maydell 113741292faSPeter Maydell.. toctree:: 114741292faSPeter Maydell arm/emulation 115741292faSPeter Maydell 11634f18ab1SPeter MaydellArm CPU features 11734f18ab1SPeter Maydell================ 11834f18ab1SPeter Maydell 11934f18ab1SPeter Maydell.. toctree:: 12034f18ab1SPeter Maydell arm/cpu-features 121