qjson: Don't crash when input exceeds nesting limit
[qemu/ar7.git] / include / hw / arm / virt.h
blobf464586304df771eb2a197bf494786530dfde479
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_GICV2M_SPIS 64
36 #define NUM_VIRTIO_TRANSPORTS 32
38 #define ARCH_TIMER_VIRT_IRQ 11
39 #define ARCH_TIMER_S_EL1_IRQ 13
40 #define ARCH_TIMER_NS_EL1_IRQ 14
41 #define ARCH_TIMER_NS_EL2_IRQ 10
43 enum {
44 VIRT_FLASH,
45 VIRT_MEM,
46 VIRT_CPUPERIPHS,
47 VIRT_GIC_DIST,
48 VIRT_GIC_CPU,
49 VIRT_GIC_V2M,
50 VIRT_GIC_ITS,
51 VIRT_GIC_REDIST,
52 VIRT_UART,
53 VIRT_MMIO,
54 VIRT_RTC,
55 VIRT_FW_CFG,
56 VIRT_PCIE,
57 VIRT_PCIE_MMIO,
58 VIRT_PCIE_PIO,
59 VIRT_PCIE_ECAM,
60 VIRT_PLATFORM_BUS,
61 VIRT_PCIE_MMIO_HIGH,
64 typedef struct MemMapEntry {
65 hwaddr base;
66 hwaddr size;
67 } MemMapEntry;
70 #endif