hw/arm/virt-acpi-build: Generate GTDT table
[qemu/ar7.git] / include / hw / arm / virt.h
blobceec8b3664b4f107f8adfc5bede3627cad7765a0
1 /*
3 * Copyright (c) 2015 Linaro Limited
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2 or later, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
17 * Emulate a virtual board which works by passing Linux all the information
18 * it needs about what devices are present via the device tree.
19 * There are some restrictions about what we can do here:
20 * + we can only present devices whose Linux drivers will work based
21 * purely on the device tree with no platform data at all
22 * + we want to present a very stripped-down minimalist platform,
23 * both because this reduces the security attack surface from the guest
24 * and also because it reduces our exposure to being broken when
25 * the kernel updates its device tree bindings and requires further
26 * information in a device binding that we aren't providing.
27 * This is essentially the same approach kvmtool uses.
30 #ifndef QEMU_ARM_VIRT_H
31 #define QEMU_ARM_VIRT_H
33 #include "qemu-common.h"
35 #define NUM_VIRTIO_TRANSPORTS 32
37 #define ARCH_TIMER_VIRT_IRQ 11
38 #define ARCH_TIMER_S_EL1_IRQ 13
39 #define ARCH_TIMER_NS_EL1_IRQ 14
40 #define ARCH_TIMER_NS_EL2_IRQ 10
42 enum {
43 VIRT_FLASH,
44 VIRT_MEM,
45 VIRT_CPUPERIPHS,
46 VIRT_GIC_DIST,
47 VIRT_GIC_CPU,
48 VIRT_UART,
49 VIRT_MMIO,
50 VIRT_RTC,
51 VIRT_FW_CFG,
52 VIRT_PCIE,
53 VIRT_PCIE_MMIO,
54 VIRT_PCIE_PIO,
55 VIRT_PCIE_ECAM,
58 typedef struct MemMapEntry {
59 hwaddr base;
60 hwaddr size;
61 } MemMapEntry;
64 #endif