[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 19/21] hw/cpu/a15mpcore: Wire generic timer outputs t
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 19/21] hw/cpu/a15mpcore: Wire generic timer outputs to GIC inputs |
Date: |
Tue, 20 Aug 2013 15:07:58 +0100 |
Now our A15 CPU implements the generic timers, we can wire them
up to the appropriate inputs on the GIC.
Signed-off-by: Peter Maydell <address@hidden>
Tested-by: Laurent Desnogues <address@hidden>
Message-id: address@hidden
---
hw/cpu/a15mpcore.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/hw/cpu/a15mpcore.c b/hw/cpu/a15mpcore.c
index 4f37964..af182da 100644
--- a/hw/cpu/a15mpcore.c
+++ b/hw/cpu/a15mpcore.c
@@ -49,6 +49,8 @@ static int a15mp_priv_init(SysBusDevice *dev)
A15MPPrivState *s = A15MPCORE_PRIV(dev);
SysBusDevice *busdev;
const char *gictype = "arm_gic";
+ int i;
+ CPUState *cpu;
if (kvm_irqchip_in_kernel()) {
gictype = "kvm-arm-gic";
@@ -67,6 +69,22 @@ static int a15mp_priv_init(SysBusDevice *dev)
/* Pass through inbound GPIO lines to the GIC */
qdev_init_gpio_in(DEVICE(dev), a15mp_priv_set_irq, s->num_irq - 32);
+ /* Wire the outputs from each CPU's generic timer to the
+ * appropriate GIC PPI inputs
+ */
+ for (i = 0, cpu = first_cpu; i < s->num_cpu; i++, cpu = cpu->next_cpu) {
+ DeviceState *cpudev = DEVICE(cpu);
+ int ppibase = s->num_irq - 32 + i * 32;
+ /* physical timer; we wire it up to the non-secure timer's ID,
+ * since a real A15 always has TrustZone but QEMU doesn't.
+ */
+ qdev_connect_gpio_out(cpudev, 0,
+ qdev_get_gpio_in(s->gic, ppibase + 30));
+ /* virtual timer */
+ qdev_connect_gpio_out(cpudev, 1,
+ qdev_get_gpio_in(s->gic, ppibase + 27));
+ }
+
/* Memory map (addresses are offsets from PERIPHBASE):
* 0x0000-0x0fff -- reserved
* 0x1000-0x1fff -- GIC Distributor
--
1.7.9.5
- [Qemu-devel] [PULL 11/21] hw/arm/strongarm: Don't use arm_pic_init_cpu(), (continued)
- [Qemu-devel] [PULL 11/21] hw/arm/strongarm: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 07/21] hw/arm/kzm: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 12/21] hw/arm/versatilepb: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 05/21] hw/arm/highbank: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 16/21] target-arm: Allow raw_read() and raw_write() to handle 64 bit regs, Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 17/21] target-arm: Support coprocessor registers which do I/O, Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 01/21] target-arm: Implement 'int' loglevel, Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 21/21] hw/timer/imx_epit: Simplify and fix imx_epit implementation, Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 20/21] default-configs: Fix A9MP and A15MP config names, Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 14/21] hw/arm/xilinx_zynq: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 19/21] hw/cpu/a15mpcore: Wire generic timer outputs to GIC inputs,
Peter Maydell <=
- [Qemu-devel] [PULL 09/21] hw/arm/omap*: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 03/21] hw/arm/armv7m: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 18/21] target-arm: Implement the generic timer, Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 15/21] hw/arm/pic_cpu: Remove the now-unneeded arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 02/21] target-arm: Make IRQ and FIQ gpio lines on the CPU object, Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 10/21] hw/arm/realview: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 04/21] hw/arm/exynos4210: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20
- [Qemu-devel] [PULL 06/21] hw/arm/integratorcp: Don't use arm_pic_init_cpu(), Peter Maydell, 2013/08/20