diff options
Diffstat (limited to 'hw/arm/armv7m.c')
-rw-r--r-- | hw/arm/armv7m.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 3332f34617..de9746665d 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -171,6 +171,7 @@ static void armv7m_instance_init(Object *obj) static void armv7m_realize(DeviceState *dev, Error **errp) { ARMv7MState *s = ARMV7M(dev); + SysBusDevice *sbd; Error *err = NULL; int i; char **cpustr; @@ -232,10 +233,14 @@ static void armv7m_realize(DeviceState *dev, Error **errp) qdev_pass_gpios(DEVICE(&s->nvic), dev, "SYSRESETREQ"); /* Wire the NVIC up to the CPU */ - sysbus_connect_irq(SYS_BUS_DEVICE(&s->nvic), 0, + sbd = SYS_BUS_DEVICE(&s->nvic); + sysbus_connect_irq(sbd, 0, qdev_get_gpio_in(DEVICE(s->cpu), ARM_CPU_IRQ)); s->cpu->env.nvic = &s->nvic; + memory_region_add_subregion(&s->container, 0xe000e000, + sysbus_mmio_get_region(sbd, 0)); + for (i = 0; i < ARRAY_SIZE(s->bitband); i++) { Object *obj = OBJECT(&s->bitband[i]); SysBusDevice *sbd = SYS_BUS_DEVICE(&s->bitband[i]); |