Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw/arm/virt: Move common definitions to virt.h
Move some common definitions to virt.h. These will be used by generating ACPI tables. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1432522520-8068-3-git-send-email-zhaoshenglong@huawei.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
- Loading branch information
1 parent
ff80dc7
commit afe0b38
Showing
2 changed files
with
57 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* | ||
* Copyright (c) 2015 Linaro Limited | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2 or later, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* Emulate a virtual board which works by passing Linux all the information | ||
* it needs about what devices are present via the device tree. | ||
* There are some restrictions about what we can do here: | ||
* + we can only present devices whose Linux drivers will work based | ||
* purely on the device tree with no platform data at all | ||
* + we want to present a very stripped-down minimalist platform, | ||
* both because this reduces the security attack surface from the guest | ||
* and also because it reduces our exposure to being broken when | ||
* the kernel updates its device tree bindings and requires further | ||
* information in a device binding that we aren't providing. | ||
* This is essentially the same approach kvmtool uses. | ||
*/ | ||
|
||
#ifndef QEMU_ARM_VIRT_H | ||
#define QEMU_ARM_VIRT_H | ||
|
||
#include "qemu-common.h" | ||
|
||
#define NUM_VIRTIO_TRANSPORTS 32 | ||
|
||
enum { | ||
VIRT_FLASH, | ||
VIRT_MEM, | ||
VIRT_CPUPERIPHS, | ||
VIRT_GIC_DIST, | ||
VIRT_GIC_CPU, | ||
VIRT_UART, | ||
VIRT_MMIO, | ||
VIRT_RTC, | ||
VIRT_FW_CFG, | ||
VIRT_PCIE, | ||
}; | ||
|
||
typedef struct MemMapEntry { | ||
hwaddr base; | ||
hwaddr size; | ||
} MemMapEntry; | ||
|
||
|
||
#endif |