[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 3/8] hw/arm/realview: Specify explicitly the GIC has 64 extern
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 3/8] hw/arm/realview: Specify explicitly the GIC has 64 external IRQs |
Date: |
Wed, 12 Feb 2025 16:43:28 +0100 |
When not specified, Cortex-A9MP configures its GIC with 64 external
IRQs (see commit a32134aad89 "arm:make the number of GIC interrupts
configurable"). Add the GIC_EXT_IRQS definition (with a comment)
to make that explicit.
Except explicitly setting a property value to its same implicit
value, there is no logical change intended.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/arm/realview.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/hw/arm/realview.c b/hw/arm/realview.c
index 9900a98f3b8..e50f687227c 100644
--- a/hw/arm/realview.c
+++ b/hw/arm/realview.c
@@ -35,6 +35,8 @@
#define SMP_BOOT_ADDR 0xe0000000
#define SMP_BOOTREG_ADDR 0x10000030
+#define GIC_EXT_IRQS 64 /* Realview PBX-A9 development board */
+
/* Board init. */
static struct arm_boot_info realview_binfo = {
@@ -185,7 +187,12 @@ static void realview_init(MachineState *machine,
sysbus_mmio_map(SYS_BUS_DEVICE(sysctl), 0, 0x10000000);
if (is_mpcore) {
- dev = qdev_new(is_pb ? TYPE_A9MPCORE_PRIV : "realview_mpcore");
+ if (is_pb) {
+ dev = qdev_new(TYPE_A9MPCORE_PRIV);
+ qdev_prop_set_uint32(dev, "num-irq", GIC_EXT_IRQS + GIC_INTERNAL);
+ } else {
+ dev = qdev_new("realview_mpcore");
+ }
qdev_prop_set_uint32(dev, "num-cpu", smp_cpus);
busdev = SYS_BUS_DEVICE(dev);
sysbus_realize_and_unref(busdev, &error_fatal);
@@ -201,7 +208,7 @@ static void realview_init(MachineState *machine,
/* For now just create the nIRQ GIC, and ignore the others. */
dev = sysbus_create_simple(TYPE_REALVIEW_GIC, gic_addr, cpu_irq[0]);
}
- for (n = 0; n < 64; n++) {
+ for (n = 0; n < GIC_EXT_IRQS; n++) {
pic[n] = qdev_get_gpio_in(dev, n);
}
--
2.47.1
- [PATCH v2 0/8] hw/arm: Explicit number of GIC external IRQs for Cortex A9/A15 MPCore, Philippe Mathieu-Daudé, 2025/02/12
- [PATCH v2 1/8] hw/arm/exynos4210: Replace magic 32 by proper 'GIC_INTERNAL' definition, Philippe Mathieu-Daudé, 2025/02/12
- [PATCH v2 2/8] hw/arm/exynos4210: Specify explicitly the GIC has 64 external IRQs, Philippe Mathieu-Daudé, 2025/02/12
- [PATCH v2 3/8] hw/arm/realview: Specify explicitly the GIC has 64 external IRQs,
Philippe Mathieu-Daudé <=
- [PATCH v2 5/8] hw/arm/xilinx_zynq: Specify explicitly the GIC has 64 external IRQs, Philippe Mathieu-Daudé, 2025/02/12
- [PATCH v2 4/8] hw/arm/xilinx_zynq: Replace IRQ_OFFSET -> GIC_INTERNAL, Philippe Mathieu-Daudé, 2025/02/12
- [PATCH v2 6/8] hw/arm/vexpress: Specify explicitly the GIC has 64 external IRQs, Philippe Mathieu-Daudé, 2025/02/12
- [PATCH v2 7/8] hw/arm/highbank: Specify explicitly the GIC has 128 external IRQs, Philippe Mathieu-Daudé, 2025/02/12
- [PATCH v2 8/8] hw/cpu/arm_mpcore: Remove default values for GIC external IRQs, Philippe Mathieu-Daudé, 2025/02/12
- Re: [PATCH v2 0/8] hw/arm: Explicit number of GIC external IRQs for Cortex A9/A15 MPCore, Peter Maydell, 2025/02/17