Document virt and a few other Arm boards
cover Document virt and a few other Arm boards
This series adds some documentation to the system manual for previously undocumented Arm board types.
The first 3 patches are very minimalist documentation of the canon-a1000, collie and gumstix board families. The info was obtained by looking at source code comments, a brief scan of what kinds of devices the code was creating, and sometimes the cover letter for the patch series that added the board. The level of documentation here doesn't seem fantastically useful but on the other hand it's no worse than that we have for some existing boards (eg cheetah) and it would be nice to eventually get to complete coverage of all the arm board types. But I figured some feedback on whether this level of documentation was worth doing was worthwhile before I tried to add it for any of the other board types.
Finally, patch 4 is more meaty: it documents the "virt" board (which was a pretty embarrassing omission from the docs given that it is the standard board type that we recommend for Arm guests these days). I have attempted to fold in the info on the board from https://wiki.qemu.org/Documentation/Platforms/ARM
where appropriate.
Peter Maydell (4):
docs/system: Briefly document canon-a1100 board
docs/system: Briefly document collie board
docs/system: Briefly document gumstix boards
docs/system: Document the arm virt board
docs/system/arm/collie.rst | 16 ++++ docs/system/arm/digic.rst | 11 +++ docs/system/arm/gumstix.rst | 21 +++++ docs/system/arm/virt.rst | 157 ++++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 4 + MAINTAINERS | 4 + 6 files changed, 213 insertions(+) create mode 100644 docs/system/arm/collie.rst create mode 100644 docs/system/arm/digic.rst create mode 100644 docs/system/arm/gumstix.rst create mode 100644 docs/system/arm/virt.rst
Signature · 1 line
2.20.1
PATCH 1/4 docs/system: Briefly document canon-a1100 board
Add skeletal documentation of the canon-a1100 board.
--- docs/system/arm/digic.rst | 11 +++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 13 insertions(+) create mode 100644 docs/system/arm/digic.rst
docs/system/arm/digic.rst new file +11 -0
@@ -0,0 +1,11 @@ +Canon A1100 (``canon-a1100``) +============================= + +This machine is a model of the Canon PowerShot A1100 camera, which +uses the DIGIC SoC. This model is based on reverse engineering efforts +by the contributors to the `CHDK <http://chdk.wikia.com/>`_ and +`Magic Lantern <http://www.magiclantern.fm/>`_ projects. + +The emulation is incomplete. In particular it can't be used +to run the original camera firmware, but it can successfully run +an experimental version of the `barebox bootloader <http://www.barebox.org/>`_.
docs/system/target-arm.rst +1 -0
@@ -82,6 +82,7 @@ undocumented; you can get a complete list by running arm/versatile arm/vexpress arm/aspeed + arm/digic arm/musicpal arm/nseries arm/orangepi
MAINTAINERS +1 -0
@@ -634,6 +634,7 @@ F: include/hw/arm/digic.h F: hw/*/digic* F: include/hw/*/digic* F: tests/acceptance/machine_arm_canona1100.py +F: docs/system/arm/digic.rst Goldfish RTC M: Anup Patel <[email protected]>
Signature · 1 line
2.20.1
Re: [PATCH for-5.1 1/4] docs/system: Briefly document canon-a1100 board
Quoted 45 lines · Peter Maydell
Add skeletal documentation of the canon-a1100 board.
Signed-off-by Peter Maydell <[email protected]>--- docs/system/arm/digic.rst | 11 +++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 13 insertions(+) create mode 100644 docs/system/arm/digic.rstdocs/system/arm/digic.rst new file +11
-0@@ -0,0 +1,11 @@ +Canon A1100 (``canon-a1100``) +============================= + +This machine is a model of the Canon PowerShot A1100 camera, which +uses the DIGIC SoC. This model is based on reverse engineering efforts +by the contributors to the `CHDK <http://chdk.wikia.com/>`_ and +`Magic Lantern <http://www.magiclantern.fm/>`_ projects. + +The emulation is incomplete. In particular it can't be used +to run the original camera firmware, but it can successfully run +an experimental version of the `barebox bootloader <http://www.barebox.org/>`_.docs/system/target-arm.rst +1
-0@@ -82,6 +82,7 @@ undocumented; you can get a complete list by running arm/versatile arm/vexpress arm/aspeed + arm/digic arm/musicpal arm/nseries arm/orangepiMAINTAINERS +0
-0
MAINTAINERS F: include/hw/arm/digic.h · line 640
Quoted 7 lines
MAINTAINERS +1
-0@@ -634,6 +634,7 @@ F: include/hw/arm/digic.h F: hw/*/digic* F: include/hw/*/digic* F: tests/acceptance/machine_arm_canona1100.py +F: docs/system/arm/digic.rst Goldfish RTC M: Anup Patel <[email protected]>
Re: [PATCH for-5.1 1/4] docs/system: Briefly document canon-a1100 board
In reply to Peter MaydellQuoted 3 lines · Peter Maydell
Add skeletal documentation of the canon-a1100 board.
Signed-off-by Peter Maydell <[email protected]>
Signature · 1 line
Alex Bennée
PATCH 2/4 docs/system: Briefly document collie board
In reply to Peter MaydellAdd skeletal documentation of the collie board.
--- docs/system/arm/collie.rst | 16 ++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 18 insertions(+) create mode 100644 docs/system/arm/collie.rst
docs/system/arm/collie.rst new file +16 -0
@@ -0,0 +1,16 @@ +Sharp Zaurus SL-5500 (``collie``) +================================= + +This machine is a model of the Sharp Zaurus SL-5500, which is +based on the StrongARM SA1110. + +Implemented devices: + + * Flash + * Interrupt controller + * Timer + * RTC + * GPIO + * Peripheral Pin Controller (PPC) + * UARTs + * Synchronous Serial Ports (SSP)
docs/system/target-arm.rst +1 -0
@@ -88,6 +88,7 @@ undocumented; you can get a complete list by running arm/orangepi arm/palm arm/xscale + arm/collie arm/sx1 arm/stellaris
MAINTAINERS +1 -0
@@ -845,6 +845,7 @@ L: [email protected] S: Odd Fixes F: hw/arm/collie.c F: hw/arm/strongarm* +F: docs/system/arm/collie.rst Stellaris M: Peter Maydell <[email protected]>
Signature · 1 line
2.20.1
Re: [PATCH for-5.1 2/4] docs/system: Briefly document collie board
Quoted 16 lines · Peter Maydell
Add skeletal documentation of the collie board.
Signed-off-by Peter Maydell <[email protected]>--- docs/system/arm/collie.rst | 16 ++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 18 insertions(+) create mode 100644 docs/system/arm/collie.rstdocs/system/arm/collie.rst new file +0
-0
docs/system/arm/collie.rst line 9
Quoted 9 lines
docs/system/arm/collie.rst new file +9
-0@@ -0,0 +1,16 @@ +Sharp Zaurus SL-5500 (``collie``) +================================= + +This machine is a model of the Sharp Zaurus SL-5500, which is +based on the StrongARM SA1110. + +Implemented devices: + + * Flash
Maybe "NOR flash".
Regardless:
Quoted 32 lines
docs/system/arm/collie.rst new file +7
-0+ * Interrupt controller + * Timer + * RTC + * GPIO + * Peripheral Pin Controller (PPC) + * UARTs + * Synchronous Serial Ports (SSP)docs/system/target-arm.rst +1
-0@@ -88,6 +88,7 @@ undocumented; you can get a complete list by running arm/orangepi arm/palm arm/xscale + arm/collie arm/sx1 arm/stellarisMAINTAINERS +1
-0@@ -845,6 +845,7 @@ L: [email protected] S: Odd Fixes F: hw/arm/collie.c F: hw/arm/strongarm* +F: docs/system/arm/collie.rst Stellaris M: Peter Maydell <[email protected]>
Re: [PATCH for-5.1 2/4] docs/system: Briefly document collie board
In reply to Peter MaydellQuoted 16 lines · Peter Maydell
Add skeletal documentation of the collie board.
Signed-off-by Peter Maydell <[email protected]>--- docs/system/arm/collie.rst | 16 ++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 18 insertions(+) create mode 100644 docs/system/arm/collie.rstdocs/system/arm/collie.rst new file +0
-0
docs/system/arm/collie.rst line 5
Quoted 5 lines
docs/system/arm/collie.rst new file +5
-0@@ -0,0 +1,16 @@ +Sharp Zaurus SL-5500 (``collie``) +================================= + +This machine is a model of the Sharp Zaurus SL-5500, which is +based on the StrongARM SA1110.
Maybe:
... Sharp Zaurus SL-5500, which was PDA in the 1990's based on the StrongARM SA1110.
just to make the class of hardware clearer.
<snip>
Either way:
Signature · 1 line
Alex Bennée
PATCH 3/4 docs/system: Briefly document gumstix boards
In reply to Peter MaydellAdd skeletal documentation of the gumstix boards
('connex' and 'verdex').
--- docs/system/arm/gumstix.rst | 21 +++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 23 insertions(+) create mode 100644 docs/system/arm/gumstix.rst
docs/system/arm/gumstix.rst new file +21 -0
@@ -0,0 +1,21 @@ +Gumstix Connex and Verdex (``connex``, ``verdex``) +================================================== + +These machines model the Gumstix Connex and Verdex boards. +The Connex has a PXA255 CPU and the Verdex has a PXA270. + +Implemented devices: + + * Flash + * SMC91C111 ethernet + * Interrupt controller + * DMA + * Timer + * GPIO + * MMC/SD card + * FIR + * LCDC + * SSP + * PC Card sockets + * I2C + * I2S
docs/system/target-arm.rst +1 -0
@@ -84,6 +84,7 @@ undocumented; you can get a complete list by running arm/aspeed arm/digic arm/musicpal + arm/gumstix arm/nseries arm/orangepi arm/palm
MAINTAINERS +1 -0
@@ -650,6 +650,7 @@ R: Philippe Mathieu-Daudé <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/gumstix.c +F: docs/system/arm/gumstix.rst i.MX25 PDK M: Peter Maydell <[email protected]>
Signature · 1 line
2.20.1
Re: [PATCH for-5.1 3/4] docs/system: Briefly document gumstix boards
Quoted 17 lines · Peter Maydell
Add skeletal documentation of the gumstix boards
('connex' and 'verdex').Signed-off-by Peter Maydell <[email protected]>--- docs/system/arm/gumstix.rst | 21 +++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 23 insertions(+) create mode 100644 docs/system/arm/gumstix.rstdocs/system/arm/gumstix.rst new file +0
-0
docs/system/arm/gumstix.rst line 9
Quoted 9 lines
docs/system/arm/gumstix.rst new file +9
-0@@ -0,0 +1,21 @@ +Gumstix Connex and Verdex (``connex``, ``verdex``) +================================================== + +These machines model the Gumstix Connex and Verdex boards. +The Connex has a PXA255 CPU and the Verdex has a PXA270. + +Implemented devices: + + * Flash
Maybe "NOR flash"?
docs/system/arm/gumstix.rst line 11
Quoted 2 lines
docs/system/arm/gumstix.rst new file +2
-0+ * SMC91C111 ethernet + * Interrupt controller
Most of the peripherals are controllers =)
This sounds better then raw 'interrupts'.
docs/system/arm/gumstix.rst line 16
Quoted 5 lines
docs/system/arm/gumstix.rst new file +5
-0+ * DMA + * Timer + * GPIO + * MMC/SD card + * FIR
'Fast Infra-Red communications port'?
docs/system/arm/gumstix.rst line 17
Quoted 1 line
docs/system/arm/gumstix.rst new file +1
-0+ * LCDC
'LCD controller'
docs/system/arm/gumstix.rst line 18
Quoted 1 line
docs/system/arm/gumstix.rst new file +1
-0+ * SSP
I think only SPI is implemented.
Maybe: 'Synchronous Serial Ports (SPI)'
docs/system/arm/gumstix.rst line 19
Quoted 1 line
docs/system/arm/gumstix.rst new file +1
-0+ * PC Card sockets
'PCMCIA interface'?
Quoted 19 lines
docs/system/arm/gumstix.rst new file +2
-0+ * I2C + * I2Sdocs/system/target-arm.rst +1
-0@@ -84,6 +84,7 @@ undocumented; you can get a complete list by running arm/aspeed arm/digic arm/musicpal + arm/gumstix arm/nseries arm/orangepi arm/palmMAINTAINERS +0
-0
MAINTAINERS R: Philippe Mathieu-Daudé <[email protected]> · line 653
Quoted 4 lines
MAINTAINERS +1
-0@@ -650,6 +650,7 @@ R: Philippe Mathieu-Daudé <[email protected]> L: [email protected] S: Odd Fixes F: hw/arm/gumstix.c +F: docs/system/arm/gumstix.rst
Feel free to take better descriptions or as it:
Quoted 4 lines
MAINTAINERS +0
-0i.MX25 PDK M: Peter Maydell <[email protected]>
Re: [PATCH for-5.1 3/4] docs/system: Briefly document gumstix boards
In reply to Peter MaydellQuoted 4 lines · Peter Maydell
Add skeletal documentation of the gumstix boards
('connex' and 'verdex').Signed-off-by Peter Maydell <[email protected]>
Signature · 1 line
Alex Bennée
PATCH 4/4 docs/system: Document the arm virt board
In reply to Peter MaydellDocument the arm 'virt' board, which has been undocumented for far too long given that it is the main recommended board type for arm guests.
--- docs/system/arm/virt.rst | 157 +++++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 159 insertions(+) create mode 100644 docs/system/arm/virt.rst
docs/system/arm/virt.rst new file +157 -0
@@ -0,0 +1,157 @@ +'virt' generic virtual platform (``virt``) +========================================== + +The `virt` board is a platform which does not correspond to any +real hardware; it is designed for use in virtual machines. +It is the recommended board type if you simply want to run +a guest such as Linux and do not care about reproducing the +idiosyncrasies and limitations of a particular bit of real-world +hardware. + +This is a "versioned" board model, so as well as the ``virt`` machine +type itself (which may have improvements, bugfixes and other minor +changes between QEMU versions) a version is provided that guarantees +to have the same behaviour as that of previous QEMU releases, so +that VM migration will work between QEMU versions. For instance the +``virt-5.0`` machine type will behave like the ``virt`` machine from +the QEMU 5.0 release, and migration should work between ``virt-5.0`` +of the 5.0 release and ``virt-5.0`` of the 5.1 release. Migration +is not guaranteed to work between different QEMU releases for +the non-versioned ``virt`` machine type. + +Supported devices +""""""""""""""""" + +The virt board supports: + +- Flash memory +- One PL011 UART +- An RTC +- The fw_cfg device that allows a guest to obtain data from QEMU +- A PL061 GPIO controller +- An optional SMMUv3 IOMMU +- hotpluggable DIMMs +- hotpluggable NVDIMs +- 32 virtio-mmio transport devices +- running guests using the KVM accelerator on aarch64 hardware +- large amounts of RAM (at least 255GB, and more if using highmem) +- many CPUs (up to 512 if using a GICv3 and highmem) +- Secure-World-only devices if the CPU has TrustZone: + + - A second PL011 UART + - A secure flash memory + - 16MB of secure RAM + +Supported guest CPU types: + +- ``cortex-a7`` (32-bit) +- ``cortex-a15`` (32-bit; the default) +- ``cortex-a53`` (64-bit) +- ``cortex-a57`` (64-bit) +- ``cortex-a72`` (64-bit) +- ``host`` (with KVM only) +- ``max`` (same as ``host`` for KVM; best possible emulation with TCG) + +Note that the default is ``cortex-a15``, so for an AArch64 guest you must +specify a CPU type. + +Graphics output is available, but unlike the x86 PC machine types +there is no default display device enabled: you should select one from +the Display devices section of "-device help". The recommended option +is ``virtio-gpu-pci``; this is the only one which will work correctly +with KVM. You may also need to ensure your guest kernel is configured +with support for this; see below. + +Machine-specific options +"""""""""""""""""""""""" + +The following machine-specific options are supported: + +secure + Set ``on``/``off`` to enable/disable emulating a guest CPU which implements the + Arm Security Extensions (TrustZone). The default is ``off``. + +virtualization + Set ``on``/``off`` to enable/disable emulating a guest CPU which implements the + Arm Virtualization Extensions. The default is ``off``. + +highmem + Set ``on``/``off`` to enable/disable placing devices and RAM in physical + address space above 32 bits. The default is ``on`` for machine types + later than ``virt-2.12``. + +gic-version + Specify the version of the Generic Interrupt Controller (GIC) to provide. + Valid values are: + + ``2`` + GICv2 + ``3`` + GICv3 + ``host`` + Use the same GIC version the host provides, when using KVM + ``max`` + Use the best GIC version possible (same as host when using KVM; + currently same as ``3``` for TCG, but this may change in future) + +its + Set ``on``/``off`` to enable/disable ITS instantiation. The default is ``on`` + for machine types later than ``virt-2.7``. + +iommu + Set the IOMMU type to create for the guest. Valid values are: + + ``none`` + Don't create an IOMMU (the default) + ``smmuv3`` + Create an SMMUv3 + +ras + Set ``on``/``off`` to enable/disable reporting host memory errors to a guest + using ACPI and guest external abort exceptions. The default is off. + +Linux guest kernel configuration +"""""""""""""""""""""""""""""""" + +The 'defconfig' for Linux arm and arm64 kernels should include the +right device drivers for virtio and the PCI controller; however some older +kernel versions, especially for 32-bit Arm, did not have everything +enabled by default. If you're not seeing PCI devices that you expect, +then check that your guest config has:: + + CONFIG_PCI=y + CONFIG_VIRTIO_PCI=y + CONFIG_PCI_HOST_GENERIC=y + +If you want to use the ``virtio-gpu-pci`` graphics device you will also +need:: + + CONFIG_DRM=y + CONFIG_DRM_VIRTIO_GPU=y + +Hardware configuration information for bare-metal programming +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +The ``virt`` board automatically generates a device tree blob ("dtb") +which it passes to the guest. This provides information about the +addresses, interrupt lines and other configuration of the various devices +in the system. Guest code can rely on and hard-code the following +addresses: + +- Flash memory starts at address 0x0000_0000 + +- RAM starts at 0x4000_0000 + +All other information about device locations may change between +QEMU versions, so guest code must look in the DTB. + +QEMU supports two types of guest image boot for ``virt``, and +the way for the guest code to locate the dtb binary differs: + +- For guests using the Linux kernel boot protocol (this means any + non-ELF file passed to the QEMU ``-kernel`` option) the address + of the DTB is passed in a register (``r2`` for 32-bit guests, + or ``x0`` for 64-bit guests) + +- For guests booting as "bare-metal" (any other kind of boot), + the DTB is at the start of RAM (0x4000_0000)
docs/system/target-arm.rst +1 -0
@@ -92,6 +92,7 @@ undocumented; you can get a complete list by running arm/collie arm/sx1 arm/stellaris + arm/virt Arm CPU features ================
MAINTAINERS +1 -0
@@ -878,6 +878,7 @@ L: [email protected] S: Maintained F: hw/arm/virt* F: include/hw/arm/virt.h +F: docs/system/arm/virt.rst Xilinx Zynq M: Edgar E. Iglesias <[email protected]>
Signature · 1 line
2.20.1
Re: [PATCH for-5.1 4/4] docs/system: Document the arm virt board
Quoted 43 lines · Peter Maydell
Document the arm 'virt' board, which has been undocumented for far too long given that it is the main recommended board type for arm guests.
Signed-off-by Peter Maydell <[email protected]>--- docs/system/arm/virt.rst | 157 +++++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 159 insertions(+) create mode 100644 docs/system/arm/virt.rstdocs/system/arm/virt.rst new file +25
-0@@ -0,0 +1,157 @@ +'virt' generic virtual platform (``virt``) +========================================== + +The `virt` board is a platform which does not correspond to any +real hardware; it is designed for use in virtual machines. +It is the recommended board type if you simply want to run +a guest such as Linux and do not care about reproducing the +idiosyncrasies and limitations of a particular bit of real-world +hardware. + +This is a "versioned" board model, so as well as the ``virt`` machine +type itself (which may have improvements, bugfixes and other minor +changes between QEMU versions) a version is provided that guarantees +to have the same behaviour as that of previous QEMU releases, so +that VM migration will work between QEMU versions. For instance the +``virt-5.0`` machine type will behave like the ``virt`` machine from +the QEMU 5.0 release, and migration should work between ``virt-5.0`` +of the 5.0 release and ``virt-5.0`` of the 5.1 release. Migration +is not guaranteed to work between different QEMU releases for +the non-versioned ``virt`` machine type. + +Supported devices +""""""""""""""""" + +The virt board supports:
docs/system/arm/virt.rst line 35
Quoted 10 lines
docs/system/arm/virt.rst new file +10
-0+ +- Flash memory +- One PL011 UART +- An RTC +- The fw_cfg device that allows a guest to obtain data from QEMU +- A PL061 GPIO controller +- An optional SMMUv3 IOMMU +- hotpluggable DIMMs +- hotpluggable NVDIMs +- 32 virtio-mmio transport devices
We seem to miss out we also support the virtio-pci transports here.
Otherwise:
Signature · 1 line
Alex Bennée
Re: [PATCH for-5.1 4/4] docs/system: Document the arm virt board
Quoted 51 lines · Alex Bennée
Quoted 47 lines · Peter Maydell
Document the arm 'virt' board, which has been undocumented for far too long given that it is the main recommended board type for arm guests.
Signed-off-by Peter Maydell <[email protected]>--- docs/system/arm/virt.rst | 157 +++++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 159 insertions(+) create mode 100644 docs/system/arm/virt.rstdocs/system/arm/virt.rst new file +29
-0@@ -0,0 +1,157 @@ +'virt' generic virtual platform (``virt``) +========================================== + +The `virt` board is a platform which does not correspond to any +real hardware; it is designed for use in virtual machines. +It is the recommended board type if you simply want to run +a guest such as Linux and do not care about reproducing the +idiosyncrasies and limitations of a particular bit of real-world +hardware. + +This is a "versioned" board model, so as well as the ``virt`` machine +type itself (which may have improvements, bugfixes and other minor +changes between QEMU versions) a version is provided that guarantees +to have the same behaviour as that of previous QEMU releases, so +that VM migration will work between QEMU versions. For instance the +``virt-5.0`` machine type will behave like the ``virt`` machine from +the QEMU 5.0 release, and migration should work between ``virt-5.0`` +of the 5.0 release and ``virt-5.0`` of the 5.1 release. Migration +is not guaranteed to work between different QEMU releases for +the non-versioned ``virt`` machine type. + +Supported devices +""""""""""""""""" + +The virt board supports: + +- Flash memory +- One PL011 UART +- An RTC
Quoted 8 lines
docs/system/arm/virt.rst line 35
Quoted 6 lines
docs/system/arm/virt.rst new file +6
-0+- The fw_cfg device that allows a guest to obtain data from QEMU +- A PL061 GPIO controller +- An optional SMMUv3 IOMMU +- hotpluggable DIMMs +- hotpluggable NVDIMs +- 32 virtio-mmio transport devicesWe seem to miss out we also support the virtio-pci transports here.
That's just a special case of "PCI", which I did indeed somehow forget.
+ PCI devices
thanks
-- PMM
Re: [PATCH for-5.1 4/4] docs/system: Document the arm virt board
In reply to Peter MaydellHi Peter,
Quoted 23 lines · Peter Maydell
Document the arm 'virt' board, which has been undocumented for far too long given that it is the main recommended board type for arm guests.
Signed-off-by Peter Maydell <[email protected]>--- docs/system/arm/virt.rst | 157 +++++++++++++++++++++++++++++++++++++ docs/system/target-arm.rst | 1 + MAINTAINERS | 1 + 3 files changed, 159 insertions(+) create mode 100644 docs/system/arm/virt.rstdocs/system/arm/virt.rst new file +5
-0@@ -0,0 +1,157 @@ +'virt' generic virtual platform (``virt``) +========================================== + +The `virt` board is a platform which does not correspond to any +real hardware; it is designed for use in virtual machines.
docs/system/arm/virt.rst line 15
Quoted 10 lines
docs/system/arm/virt.rst new file +10
-0+It is the recommended board type if you simply want to run +a guest such as Linux and do not care about reproducing the +idiosyncrasies and limitations of a particular bit of real-world +hardware. + +This is a "versioned" board model, so as well as the ``virt`` machine +type itself (which may have improvements, bugfixes and other minor +changes between QEMU versions) a version is provided that guarantees +to have the same behaviour as that of previous QEMU releases, so +that VM migration will work between QEMU versions.
Note: as per the recent discussions, the ACPI description is currently allowed to changed and this is not really versionned. Normally this should not really impact the guest but who knows?
For instance the
Quoted 9 lines
docs/system/arm/virt.rst new file +9
-0+``virt-5.0`` machine type will behave like the ``virt`` machine from +the QEMU 5.0 release, and migration should work between ``virt-5.0`` +of the 5.0 release and ``virt-5.0`` of the 5.1 release. Migration +is not guaranteed to work between different QEMU releases for +the non-versioned ``virt`` machine type. + +Supported devices +""""""""""""""""" +
docs/system/arm/virt.rst line 34
Quoted 10 lines
docs/system/arm/virt.rst new file +10
-0+The virt board supports: + +- Flash memory +- One PL011 UART +- An RTC +- The fw_cfg device that allows a guest to obtain data from QEMU +- A PL061 GPIO controller +- An optional SMMUv3 IOMMU +- hotpluggable DIMMs +- hotpluggable NVDIMs
NVDIMMs
- an MSI controller (GICv2M or ITS). GICv2M is selected by default along with GICv2. ITS is selected by default with GICv3 (>= virt-2.7). Note ITS is not modeled in TCG mode.
Quoted 140 lines
docs/system/arm/virt.rst new file +122
-0+- 32 virtio-mmio transport devices +- running guests using the KVM accelerator on aarch64 hardware +- large amounts of RAM (at least 255GB, and more if using highmem) +- many CPUs (up to 512 if using a GICv3 and highmem) +- Secure-World-only devices if the CPU has TrustZone: + + - A second PL011 UART + - A secure flash memory + - 16MB of secure RAM + +Supported guest CPU types: + +- ``cortex-a7`` (32-bit) +- ``cortex-a15`` (32-bit; the default) +- ``cortex-a53`` (64-bit) +- ``cortex-a57`` (64-bit) +- ``cortex-a72`` (64-bit) +- ``host`` (with KVM only) +- ``max`` (same as ``host`` for KVM; best possible emulation with TCG) + +Note that the default is ``cortex-a15``, so for an AArch64 guest you must +specify a CPU type. + +Graphics output is available, but unlike the x86 PC machine types +there is no default display device enabled: you should select one from +the Display devices section of "-device help". The recommended option +is ``virtio-gpu-pci``; this is the only one which will work correctly +with KVM. You may also need to ensure your guest kernel is configured +with support for this; see below. + +Machine-specific options +"""""""""""""""""""""""" + +The following machine-specific options are supported: + +secure + Set ``on``/``off`` to enable/disable emulating a guest CPU which implements the + Arm Security Extensions (TrustZone). The default is ``off``. + +virtualization + Set ``on``/``off`` to enable/disable emulating a guest CPU which implements the + Arm Virtualization Extensions. The default is ``off``. + +highmem + Set ``on``/``off`` to enable/disable placing devices and RAM in physical + address space above 32 bits. The default is ``on`` for machine types + later than ``virt-2.12``. + +gic-version + Specify the version of the Generic Interrupt Controller (GIC) to provide. + Valid values are: + + ``2`` + GICv2 + ``3`` + GICv3 + ``host`` + Use the same GIC version the host provides, when using KVM + ``max`` + Use the best GIC version possible (same as host when using KVM; + currently same as ``3``` for TCG, but this may change in future) + +its + Set ``on``/``off`` to enable/disable ITS instantiation. The default is ``on`` + for machine types later than ``virt-2.7``. + +iommu + Set the IOMMU type to create for the guest. Valid values are: + + ``none`` + Don't create an IOMMU (the default) + ``smmuv3`` + Create an SMMUv3 + +ras + Set ``on``/``off`` to enable/disable reporting host memory errors to a guest + using ACPI and guest external abort exceptions. The default is off.> + +Linux guest kernel configuration +"""""""""""""""""""""""""""""""" + +The 'defconfig' for Linux arm and arm64 kernels should include the +right device drivers for virtio and the PCI controller; however some older +kernel versions, especially for 32-bit Arm, did not have everything +enabled by default. If you're not seeing PCI devices that you expect, +then check that your guest config has:: + + CONFIG_PCI=y + CONFIG_VIRTIO_PCI=y + CONFIG_PCI_HOST_GENERIC=y + +If you want to use the ``virtio-gpu-pci`` graphics device you will also +need:: + + CONFIG_DRM=y + CONFIG_DRM_VIRTIO_GPU=y + +Hardware configuration information for bare-metal programming +""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" + +The ``virt`` board automatically generates a device tree blob ("dtb") +which it passes to the guest. This provides information about the +addresses, interrupt lines and other configuration of the various devices +in the system. Guest code can rely on and hard-code the following +addresses: + +- Flash memory starts at address 0x0000_0000 + +- RAM starts at 0x4000_0000 + +All other information about device locations may change between +QEMU versions, so guest code must look in the DTB. + +QEMU supports two types of guest image boot for ``virt``, and +the way for the guest code to locate the dtb binary differs: + +- For guests using the Linux kernel boot protocol (this means any + non-ELF file passed to the QEMU ``-kernel`` option) the address + of the DTB is passed in a register (``r2`` for 32-bit guests, + or ``x0`` for 64-bit guests) + +- For guests booting as "bare-metal" (any other kind of boot), + the DTB is at the start of RAM (0x4000_0000)docs/system/target-arm.rst +1
-0@@ -92,6 +92,7 @@ undocumented; you can get a complete list by running arm/collie arm/sx1 arm/stellaris + arm/virt Arm CPU features ================MAINTAINERS +0
-0
MAINTAINERS L: [email protected] · line 884
Quoted 7 lines
MAINTAINERS +1
-0@@ -878,6 +878,7 @@ L: [email protected] S: Maintained F: hw/arm/virt* F: include/hw/arm/virt.h +F: docs/system/arm/virt.rst Xilinx Zynq M: Edgar E. Iglesias <[email protected]>
Thanks
Eric
Peter Maydell
AppliedQuoted 3 lines · Peter Maydell
This series adds some documentation to the system manual for previously undocumented Arm board types.
Applied to target-arm.next for 5.1 with the minor wording tweaks/additions suggested by various reviewers -- thanks!
-- PMM