[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/22] target-arm: Extend the gic node properties
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 13/22] target-arm: Extend the gic node properties |
Date: |
Tue, 2 Jun 2015 17:33:43 +0100 |
From: Christoffer Dall <address@hidden>
In preparation for adding the GICv2m which requires address specifiers
and is a subnode of the gic, we extend the gic DT definition to specify
the #address-cells and #size-cells properties and add an empty ranges
property properties of the DT node, since this is required to add the
v2m node as a child of the gic node.
Note that we must also expand the irq-map to reference the gic with the
right address-cells as a consequence of this change.
Reviewed-by: Eric Auger <address@hidden>
Signed-off-by: Christoffer Dall <address@hidden>
Message-id: address@hidden
Suggested-by: Shanker Donthineni <address@hidden>
Signed-off-by: Christoffer Dall <address@hidden>
Signed-off-by: Peter Maydell <address@hidden>
---
hw/arm/virt.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index e5235ef..387dac8 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -317,6 +317,9 @@ static void fdt_add_gic_node(VirtBoardInfo *vbi)
2, vbi->memmap[VIRT_GIC_DIST].size,
2, vbi->memmap[VIRT_GIC_CPU].base,
2, vbi->memmap[VIRT_GIC_CPU].size);
+ qemu_fdt_setprop_cell(vbi->fdt, "/intc", "#address-cells", 0x2);
+ qemu_fdt_setprop_cell(vbi->fdt, "/intc", "#size-cells", 0x2);
+ qemu_fdt_setprop(vbi->fdt, "/intc", "ranges", NULL, 0);
qemu_fdt_setprop_cell(vbi->fdt, "/intc", "phandle", vbi->gic_phandle);
}
@@ -585,7 +588,7 @@ static void create_pcie_irq_map(const VirtBoardInfo *vbi,
uint32_t gic_phandle,
int first_irq, const char *nodename)
{
int devfn, pin;
- uint32_t full_irq_map[4 * 4 * 8] = { 0 };
+ uint32_t full_irq_map[4 * 4 * 10] = { 0 };
uint32_t *irq_map = full_irq_map;
for (devfn = 0; devfn <= 0x18; devfn += 0x8) {
@@ -598,13 +601,13 @@ static void create_pcie_irq_map(const VirtBoardInfo *vbi,
uint32_t gic_phandle,
uint32_t map[] = {
devfn << 8, 0, 0, /* devfn */
pin + 1, /* PCI pin */
- gic_phandle, irq_type, irq_nr, irq_level }; /* GIC irq */
+ gic_phandle, 0, 0, irq_type, irq_nr, irq_level }; /* GIC irq */
/* Convert map to big endian */
- for (i = 0; i < 8; i++) {
+ for (i = 0; i < 10; i++) {
irq_map[i] = cpu_to_be32(map[i]);
}
- irq_map += 8;
+ irq_map += 10;
}
}
--
1.9.1
- Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier, (continued)
- Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier, Eric Auger, 2015/06/12
- Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier, Peter Maydell, 2015/06/12
- Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier, Peter Crosthwaite, 2015/06/12
- Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier, Peter Maydell, 2015/06/12
- Re: [Qemu-devel] [PULL 20/22] hw/arm/boot: arm_load_kernel implemented as a machine init done notifier, Eric Auger, 2015/06/15
[Qemu-devel] [PULL 21/22] hw/arm/virt: add dynamic sysbus device support, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 17/22] arm_gicv2m: set kvm_gsi_direct_mapping and kvm_msi_via_irqfd_allowed, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 16/22] kvm: introduce kvm_arch_msi_data_to_gsi, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 19/22] hw/arm/sysbus-fdt: helpers for platform bus nodes addition, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 15/22] pl061: fix wrong calculation of GPIOMIS register, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 13/22] target-arm: Extend the gic node properties,
Peter Maydell <=
[Qemu-devel] [PULL 14/22] target-arm: Add the GICv2m to the virt board, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 09/22] target-arm: Add TLBI_VAE2{IS}, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 11/22] target-arm: Add GIC phandle to VirtBoardInfo, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 08/22] target-arm: Add TLBI_ALLE2, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 06/22] target-arm: Add TTBR0_EL2, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 05/22] target-arm: Add TPIDR_EL2, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 12/22] arm_gicv2m: Add GICv2m widget to support MSIs, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 04/22] target-arm: Add SCTLR_EL2, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 02/22] target-arm: Add MAIR_EL2, Peter Maydell, 2015/06/02
[Qemu-devel] [PULL 10/22] Revert "target-arm: Avoid g_hash_table_get_keys()", Peter Maydell, 2015/06/02