From: Guenter Roeck <linux@roeck-us.net>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel@nongnu.org, Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH] sh4: Remove bad memory alias 'sh_pci.isa'
Date: Mon, 17 Feb 2020 12:37:34 -0800 [thread overview]
Message-ID: <20200217203734.18703-1-linux@roeck-us.net> (raw)
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 <linux@roeck-us.net>
---
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
next reply other threads:[~2020-02-17 20:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 20:37 Guenter Roeck [this message]
2020-02-18 16:33 ` [PATCH] sh4: Remove bad memory alias 'sh_pci.isa' Peter Maydell
2020-02-18 17:49 ` Guenter Roeck
2020-02-18 18:35 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200217203734.18703-1-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).