mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/arm/virt: Add SMMUv3 to the virt board
Add code to instantiate an smmuv3 in virt machine. A new iommu integer member is introduced in VirtMachineState to store the type of the iommu in use. Signed-off-by: Prem Mallappa <prem.mallappa@broadcom.com> Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1524665762-31355-13-git-send-email-eric.auger@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b05c81d292
commit
584105eab2
2 changed files with 73 additions and 1 deletions
|
@ -38,6 +38,7 @@
|
|||
|
||||
#define NUM_GICV2M_SPIS 64
|
||||
#define NUM_VIRTIO_TRANSPORTS 32
|
||||
#define NUM_SMMU_IRQS 4
|
||||
|
||||
#define ARCH_GICV3_MAINT_IRQ 9
|
||||
|
||||
|
@ -59,6 +60,7 @@ enum {
|
|||
VIRT_GIC_V2M,
|
||||
VIRT_GIC_ITS,
|
||||
VIRT_GIC_REDIST,
|
||||
VIRT_SMMU,
|
||||
VIRT_UART,
|
||||
VIRT_MMIO,
|
||||
VIRT_RTC,
|
||||
|
@ -74,6 +76,12 @@ enum {
|
|||
VIRT_SECURE_MEM,
|
||||
};
|
||||
|
||||
typedef enum VirtIOMMUType {
|
||||
VIRT_IOMMU_NONE,
|
||||
VIRT_IOMMU_SMMUV3,
|
||||
VIRT_IOMMU_VIRTIO,
|
||||
} VirtIOMMUType;
|
||||
|
||||
typedef struct MemMapEntry {
|
||||
hwaddr base;
|
||||
hwaddr size;
|
||||
|
@ -97,6 +105,7 @@ typedef struct {
|
|||
bool its;
|
||||
bool virt;
|
||||
int32_t gic_version;
|
||||
VirtIOMMUType iommu;
|
||||
struct arm_boot_info bootinfo;
|
||||
const MemMapEntry *memmap;
|
||||
const int *irqmap;
|
||||
|
@ -106,6 +115,7 @@ typedef struct {
|
|||
uint32_t clock_phandle;
|
||||
uint32_t gic_phandle;
|
||||
uint32_t msi_phandle;
|
||||
uint32_t iommu_phandle;
|
||||
int psci_conduit;
|
||||
} VirtMachineState;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue