qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] sh4: Remove bad memory alias 'sh_pci.isa'


From: Guenter Roeck
Subject: [PATCH] sh4: Remove bad memory alias 'sh_pci.isa'
Date: Mon, 17 Feb 2020 12:37:34 -0800

The memory alias sh_pci.isa is located at address 0x0000 with
a length of 0x40000. This results in the following memory tree.

FlatView #1
 AS "memory", root: system
 AS "cpu-memory-0", root: system
 AS "sh_pci_host", root: bus master container
 Root memory region: system
  0000000000000000-000000000000ffff (prio 0, i/o): io
  0000000000010000-0000000000ffffff (prio 0, i/o): r2d.flash @0000000000010000

The alias overlaps with flash memory. As result, flash memory can
not be accessed. Removing the alias fixes the problem. With this patch,
the memory tree is as follows, and flash is detected as expected.

FlatView #1
 AS "memory", root: system
 AS "cpu-memory-0", root: system
 AS "sh_pci_host", root: bus master container
 Root memory region: system
  0000000000000000-0000000000ffffff (prio 0, i/o): r2d.flash

After this patch has been applied, access to PCI, ATA, and USB is still
working, and no negative impact has ben observed.

Signed-off-by: Guenter Roeck <address@hidden>
---
 hw/sh4/sh_pci.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c
index 71afd23b67..4ced54f1a5 100644
--- a/hw/sh4/sh_pci.c
+++ b/hw/sh4/sh_pci.c
@@ -143,8 +143,6 @@ static void sh_pci_device_realize(DeviceState *dev, Error 
**errp)
                           "sh_pci", 0x224);
     memory_region_init_alias(&s->memconfig_a7, OBJECT(s), "sh_pci.2",
                              &s->memconfig_p4, 0, 0x224);
-    memory_region_init_alias(&s->isa, OBJECT(s), "sh_pci.isa",
-                             get_system_io(), 0, 0x40000);
     sysbus_init_mmio(sbd, &s->memconfig_p4);
     sysbus_init_mmio(sbd, &s->memconfig_a7);
     s->iobr = 0xfe240000;
-- 
2.17.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]