sh_pci: Fix sh_pci memory alias confusion
authorAvi Kivity <avi@redhat.com>
Sun, 28 Aug 2011 15:17:04 +0000 (18:17 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 28 Aug 2011 15:34:39 +0000 (18:34 +0300)
The a7 area was set up as an alias of itself, rather than the p4 area.  This
sent the memory core into infinite recursion.

Fix by aliasing the a7 area to the p4 area.

Signed-off-by: Avi Kivity <avi@redhat.com>
hw/sh_pci.c

index 76061bb7563f3bd742d9c2b70a1cf66469fa9eed..36f39300d580f03a98301b424348061b8f847717 100644 (file)
@@ -150,7 +150,7 @@ static int sh_pci_init_device(SysBusDevice *dev)
                               PCI_DEVFN(0, 0), 4);
     memory_region_init_io(&s->memconfig_p4, &sh_pci_reg_ops, s,
                           "sh_pci", 0x224);
-    memory_region_init_alias(&s->memconfig_a7, "sh_pci.2", &s->memconfig_a7,
+    memory_region_init_alias(&s->memconfig_a7, "sh_pci.2", &s->memconfig_p4,
                              0, 0x224);
     isa_mmio_setup(&s->isa, 0x40000);
     sysbus_init_mmio_cb2(dev, sh_pci_map, sh_pci_unmap);