hw/arm: versal: Correct number of IRQs in GIC setup
cover hw/arm: versal: Correct number of IRQs in GIC setup
From: "Edgar E. Iglesias" <[email protected]>
The Versal GIC has 192 IRQs not 256 as we previously had setup. This series fixes the setup and moves the virtio-mmio nodes to use other reserved interrupts.
Since we don't have 32 reserved lines, we also reduce the number of virtio-mmio regions to 8 (we do have some more lines free but let's leave some for future use).
Cheers,
Edgar
Edgar E. Iglesias (4):
hw/arm: versal: Remove bogus virtio-mmio creation hw/arm: versal: Reduce number of virtio-mmio instances hw/arm: versal: Use IRQs 111 - 118 for virtio-mmio hw/arm: versal: Correct the nr of IRQs to 192
hw/arm/xlnx-versal-virt.c | 7 +++---- include/hw/arm/xlnx-versal.h | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/4 hw/arm: versal: Remove bogus virtio-mmio creation
From: "Edgar E. Iglesias" <[email protected]>
Remove bogus virtio-mmio creation. This was an accidental left-over an experiment.
--- hw/arm/xlnx-versal-virt.c | 1 - 1 file changed, 1 deletion(-)
hw/arm/xlnx-versal-virt.c +0 -1
@@ -364,7 +364,6 @@ static void create_virtio_regions(VersalVirt *s)sysbus_connect_irq (SYS_BUS_DEVICE (dev),0 , pic_irq); mr =sysbus_mmio_get_region (SYS_BUS_DEVICE (dev),0 );memory_region_add_subregion (&s->soc.mr_ps, base, mr); -sysbus_create_simple ("virtio-mmio" , base, pic_irq); }for (i =0 ; i <NUM_VIRTIO_TRANSPORT ; i++) {
Signature · 1 line
2.17.1
Re: [Qemu-devel] [PATCH v1 1/4] hw/arm: versal: Remove bogus virtio-mmio creation
Quoted 7 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Remove bogus virtio-mmio creation. This was an accidental left-over an experiment.
Signed-off-by Edgar E. Iglesias <[email protected]>
Alistair
Quoted 20 lines
--- hw/arm/xlnx-versal-virt.c | 1 - 1 file changed, 1 deletion(-)hw/arm/xlnx-versal-virt.c +0
-2@@ -364,7 +364,6 @@ static void create_virtio_regions(VersalVirt *s)sysbus_connect_irq (SYS_BUS_DEVICE (dev),0 , pic_irq); mr =sysbus_mmio_get_region (SYS_BUS_DEVICE (dev),0 );memory_region_add_subregion (&s->soc.mr_ps, base, mr); -sysbus_create_simple ("virtio-mmio" , base, pic_irq); }for (i =0 ; i <NUM_VIRTIO_TRANSPORT ; i++) { --2.17.1
Re: [Qemu-arm] [PATCH v1 1/4] hw/arm: versal: Remove bogus virtio-mmio creation
In reply to Edgar E. IglesiasQuoted 6 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Remove bogus virtio-mmio creation. This was an accidental left-over an experiment.
Signed-off-by Edgar E. Iglesias <[email protected]>
Luc
Quoted 17 lines
--- hw/arm/xlnx-versal-virt.c | 1 - 1 file changed, 1 deletion(-)hw/arm/xlnx-versal-virt.c +0
-1@@ -364,7 +364,6 @@ static void create_virtio_regions(VersalVirt *s)sysbus_connect_irq (SYS_BUS_DEVICE (dev),0 , pic_irq); mr =sysbus_mmio_get_region (SYS_BUS_DEVICE (dev),0 );memory_region_add_subregion (&s->soc.mr_ps, base, mr); -sysbus_create_simple ("virtio-mmio" , base, pic_irq); }for (i =0 ; i <NUM_VIRTIO_TRANSPORT ; i++) {
PATCH 2/4 hw/arm: versal: Reduce number of virtio-mmio instances
In reply to Edgar E. IglesiasFrom: "Edgar E. Iglesias" <[email protected]>
Reduce number of virtio-mmio instances. This is in preparation for correcting the interrupt setup for Versal.
--- hw/arm/xlnx-versal-virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm/xlnx-versal-virt.c +1 -1
@@ -342,7 +342,7 @@ static void *versal_virt_get_dtb(const struct arm_boot_info *binfo,return board->fdt; } -#define NUM_VIRTIO_TRANSPORT 32 +#define NUM_VIRTIO_TRANSPORT 8static void create_virtio_regions (VersalVirt *s) {int virtio_mmio_size =0x200 ;
Signature · 1 line
2.17.1
Re: [Qemu-arm] [Qemu-devel] [PATCH v1 2/4] hw/arm: versal: Reduce number of virtio-mmio instances
Quoted 7 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Reduce number of virtio-mmio instances. This is in preparation for correcting the interrupt setup for Versal.
Signed-off-by Edgar E. Iglesias <[email protected]>
Alistair
Quoted 21 lines
--- hw/arm/xlnx-versal-virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/arm/xlnx-versal-virt.c +1
-2@@ -342,7 +342,7 @@ static void *versal_virt_get_dtb(const struct arm_boot_info *binfo,return board->fdt; } -#define NUM_VIRTIO_TRANSPORT 32 +#define NUM_VIRTIO_TRANSPORT 8static void create_virtio_regions (VersalVirt *s) {int virtio_mmio_size =0x200 ; --2.17.1
PATCH 3/4 hw/arm: versal: Use IRQs 111 - 118 for virtio-mmio
In reply to Edgar E. IglesiasFrom: "Edgar E. Iglesias" <[email protected]>
Use IRQs 111 - 118 for virtio-mmio. The interrupts we're currently using 160+ are not available in the Versal GIC.
--- hw/arm/xlnx-versal-virt.c | 4 ++-- include/hw/arm/xlnx-versal.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)
hw/arm/xlnx-versal-virt.c +2 -2
@@ -351,7 +351,7 @@ static void create_virtio_regions(VersalVirt *s)for (i =0 ; i <NUM_VIRTIO_TRANSPORT ; i++) {char *name =g_strdup_printf ("virtio%d" , i);;hwaddr base =MM_TOP_RSVD + i * virtio_mmio_size; -int irq =VERSAL_RSVD_HIGH_IRQ_FIRST + i; +int irq =VERSAL_RSVD_IRQ_FIRST + i;MemoryRegion *mr;DeviceState *dev;qemu_irq pic_irq;
@@ -368,7 +368,7 @@ static void create_virtio_regions(VersalVirt *s)for (i =0 ; i <NUM_VIRTIO_TRANSPORT ; i++) {hwaddr base =MM_TOP_RSVD + i * virtio_mmio_size; -int irq =VERSAL_RSVD_HIGH_IRQ_FIRST + i; +int irq =VERSAL_RSVD_IRQ_FIRST + i;char *name =g_strdup_printf ("/virtio_mmio@%" PRIx64, base);qemu_fdt_add_subnode (s->fdt, name);
include/hw/arm/xlnx-versal.h +3 -3
@@ -75,9 +75,9 @@ typedef struct Versal {#define VERSAL_GEM1_IRQ_0 58#define VERSAL_GEM1_WAKE_IRQ_0 59 -/* Architecturally eserved IRQs suitable for virtualization. */ -#define VERSAL_RSVD_HIGH_IRQ_FIRST 160 -#define VERSAL_RSVD_HIGH_IRQ_LAST 255 +/* Architecturally reserved IRQs suitable for virtualization. */ +#define VERSAL_RSVD_IRQ_FIRST 111 +#define VERSAL_RSVD_IRQ_LAST 118#define MM_TOP_RSVD 0xa0000000U#define MM_TOP_RSVD_SIZE 0x4000000
Signature · 1 line
2.17.1
Re: [Qemu-arm] [Qemu-devel] [PATCH v1 3/4] hw/arm: versal: Use IRQs 111 - 118 for virtio-mmio
Quoted 7 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Use IRQs 111 - 118 for virtio-mmio. The interrupts we're currently using 160+ are not available in the Versal GIC.
Signed-off-by Edgar E. Iglesias <[email protected]>
Alistair
Quoted 48 lines
--- hw/arm/xlnx-versal-virt.c | 4 ++-- include/hw/arm/xlnx-versal.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)hw/arm/xlnx-versal-virt.c +2
-2@@ -351,7 +351,7 @@ static void create_virtio_regions(VersalVirt *s)for (i =0 ; i <NUM_VIRTIO_TRANSPORT ; i++) {char *name =g_strdup_printf ("virtio%d" , i);;hwaddr base =MM_TOP_RSVD + i * virtio_mmio_size; -int irq =VERSAL_RSVD_HIGH_IRQ_FIRST + i; +int irq =VERSAL_RSVD_IRQ_FIRST + i;MemoryRegion *mr;DeviceState *dev;qemu_irq pic_irq;@@ -368,7 +368,7 @@ static void create_virtio_regions(VersalVirt *s)for (i =0 ; i <NUM_VIRTIO_TRANSPORT ; i++) {hwaddr base =MM_TOP_RSVD + i * virtio_mmio_size; -int irq =VERSAL_RSVD_HIGH_IRQ_FIRST + i; +int irq =VERSAL_RSVD_IRQ_FIRST + i;char *name =g_strdup_printf ("/virtio_mmio@%" PRIx64, base);qemu_fdt_add_subnode (s->fdt, name);include/hw/arm/xlnx-versal.h +3
-4@@ -75,9 +75,9 @@ typedef struct Versal {#define VERSAL_GEM1_IRQ_0 58#define VERSAL_GEM1_WAKE_IRQ_0 59 -/* Architecturally eserved IRQs suitable for virtualization. */ -#define VERSAL_RSVD_HIGH_IRQ_FIRST 160 -#define VERSAL_RSVD_HIGH_IRQ_LAST 255 +/* Architecturally reserved IRQs suitable for virtualization. */ +#define VERSAL_RSVD_IRQ_FIRST 111 +#define VERSAL_RSVD_IRQ_LAST 118#define MM_TOP_RSVD 0xa0000000U#define MM_TOP_RSVD_SIZE 0x4000000 --2.17.1
PATCH 4/4 hw/arm: versal: Correct the nr of IRQs to 192
In reply to Edgar E. IglesiasFrom: "Edgar E. Iglesias" <[email protected]>
Correct the nr of IRQs to 192.
--- include/hw/arm/xlnx-versal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/hw/arm/xlnx-versal.h +1 -1
@@ -22,7 +22,7 @@#define XLNX_VERSAL_NR_ACPUS 2#define XLNX_VERSAL_NR_UARTS 2#define XLNX_VERSAL_NR_GEMS 2 -#define XLNX_VERSAL_NR_IRQS 256 +#define XLNX_VERSAL_NR_IRQS 192 typedef struct Versal { /*< private >*/
Signature · 1 line
2.17.1
Re: [Qemu-arm] [Qemu-devel] [PATCH v1 4/4] hw/arm: versal: Correct the nr of IRQs to 192
Quoted 6 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
Correct the nr of IRQs to 192.
Signed-off-by Edgar E. Iglesias <[email protected]>
Alistair
Quoted 21 lines
--- include/hw/arm/xlnx-versal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/hw/arm/xlnx-versal.h +1
-2@@ -22,7 +22,7 @@#define XLNX_VERSAL_NR_ACPUS 2#define XLNX_VERSAL_NR_UARTS 2#define XLNX_VERSAL_NR_GEMS 2 -#define XLNX_VERSAL_NR_IRQS 256 +#define XLNX_VERSAL_NR_IRQS 192 typedef struct Versal { /*< private >*/ --2.17.1
Peter Maydell
AppliedQuoted 11 lines · Edgar E. Iglesias
From: "Edgar E. Iglesias" <[email protected]>
The Versal GIC has 192 IRQs not 256 as we previously had setup. This series fixes the setup and moves the virtio-mmio nodes to use other reserved interrupts.
Since we don't have 32 reserved lines, we also reduce the number of virtio-mmio regions to 8 (we do have some more lines free but let's leave some for future use).
Quoted 8 lines
Cheers,
EdgarEdgar E. Iglesias (4):
hw/arm: versal: Remove bogus virtio-mmio creation hw/arm: versal: Reduce number of virtio-mmio instances hw/arm: versal: Use IRQs 111 - 118 for virtio-mmio hw/arm: versal: Correct the nr of IRQs to 192
Applied to target-arm.next for 4.0, thanks.
-- PMM