hw/arm/virt: add pmu interrupt state
Mimicking gicv3-maintenance-interrupt, add the PMU's interrupt to CPU state. Signed-off-by: Andrew Jones <drjones@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1500471597-2517-2-git-send-email-drjones@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
c2de81e2b2
commit
07f48730bc
|
@ -610,6 +610,9 @@ static void create_gic(VirtMachineState *vms, qemu_irq *pic)
|
||||||
qdev_connect_gpio_out_named(cpudev, "gicv3-maintenance-interrupt", 0,
|
qdev_connect_gpio_out_named(cpudev, "gicv3-maintenance-interrupt", 0,
|
||||||
qdev_get_gpio_in(gicdev, ppibase
|
qdev_get_gpio_in(gicdev, ppibase
|
||||||
+ ARCH_GICV3_MAINT_IRQ));
|
+ ARCH_GICV3_MAINT_IRQ));
|
||||||
|
qdev_connect_gpio_out_named(cpudev, "pmu-interrupt", 0,
|
||||||
|
qdev_get_gpio_in(gicdev, ppibase
|
||||||
|
+ VIRTUAL_PMU_IRQ));
|
||||||
|
|
||||||
sysbus_connect_irq(gicbusdev, i, qdev_get_gpio_in(cpudev, ARM_CPU_IRQ));
|
sysbus_connect_irq(gicbusdev, i, qdev_get_gpio_in(cpudev, ARM_CPU_IRQ));
|
||||||
sysbus_connect_irq(gicbusdev, i + smp_cpus,
|
sysbus_connect_irq(gicbusdev, i + smp_cpus,
|
||||||
|
|
|
@ -508,6 +508,8 @@ static void arm_cpu_initfn(Object *obj)
|
||||||
|
|
||||||
qdev_init_gpio_out_named(DEVICE(cpu), &cpu->gicv3_maintenance_interrupt,
|
qdev_init_gpio_out_named(DEVICE(cpu), &cpu->gicv3_maintenance_interrupt,
|
||||||
"gicv3-maintenance-interrupt", 1);
|
"gicv3-maintenance-interrupt", 1);
|
||||||
|
qdev_init_gpio_out_named(DEVICE(cpu), &cpu->pmu_interrupt,
|
||||||
|
"pmu-interrupt", 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* DTB consumers generally don't in fact care what the 'compatible'
|
/* DTB consumers generally don't in fact care what the 'compatible'
|
||||||
|
|
|
@ -585,6 +585,8 @@ struct ARMCPU {
|
||||||
qemu_irq gt_timer_outputs[NUM_GTIMERS];
|
qemu_irq gt_timer_outputs[NUM_GTIMERS];
|
||||||
/* GPIO output for GICv3 maintenance interrupt signal */
|
/* GPIO output for GICv3 maintenance interrupt signal */
|
||||||
qemu_irq gicv3_maintenance_interrupt;
|
qemu_irq gicv3_maintenance_interrupt;
|
||||||
|
/* GPIO output for the PMU interrupt */
|
||||||
|
qemu_irq pmu_interrupt;
|
||||||
|
|
||||||
/* MemoryRegion to use for secure physical accesses */
|
/* MemoryRegion to use for secure physical accesses */
|
||||||
MemoryRegion *secure_memory;
|
MemoryRegion *secure_memory;
|
||||||
|
|
Loading…
Reference in a new issue