hw/arm/virt: Move common definitions to virt.h
[qemu/cris-port.git] / include / hw / arm / virt.h
blob2fe0d2eddda271447b96cf65c11501cd901af271
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 enum {
38 VIRT_FLASH,
39 VIRT_MEM,
40 VIRT_CPUPERIPHS,
41 VIRT_GIC_DIST,
42 VIRT_GIC_CPU,
43 VIRT_UART,
44 VIRT_MMIO,
45 VIRT_RTC,
46 VIRT_FW_CFG,
47 VIRT_PCIE,
50 typedef struct MemMapEntry {
51 hwaddr base;
52 hwaddr size;
53 } MemMapEntry;
56 #endif