From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Fix GT64120 mapping with REDBOOT
Date: Tue, 23 Jan 2007 00:41:58 +0100 [thread overview]
Message-ID: <20070122234158.GA12465@farad.aurel32.net> (raw)
The patch below fixes the PCI mapping of the GT64120 when the high
address is lower than the lower address. The datasheet says the zone
should not be mapped in that case. REDBOOT uses such a mapping for a
very short time frame, as it starts to write the low address and then
the high address.
Index: gt64xxx.c
===================================================================
RCS file: /sources/qemu/qemu/hw/gt64xxx.c,v
retrieving revision 1.2
diff -u -d -p -r1.2 gt64xxx.c
--- gt64xxx.c 17 Jan 2007 23:35:01 -0000 1.2
+++ gt64xxx.c 22 Jan 2007 23:38:06 -0000
@@ -229,9 +229,12 @@ static void gt64120_pci_mapping(GT64120S
target_phys_addr_t start, length;
/* Update IO mapping */
- start = s->regs[GT_PCI0IOLD] << 21;
- length = ((s->regs[GT_PCI0IOHD] + 1) - (s->regs[GT_PCI0IOLD] & 0x7f)) << 21;
- isa_mmio_init(start, length);
+ if ((s->regs[GT_PCI0IOLD] & 0x7f) <= s->regs[GT_PCI0IOHD])
+ {
+ start = s->regs[GT_PCI0IOLD] << 21;
+ length = ((s->regs[GT_PCI0IOHD] + 1) - (s->regs[GT_PCI0IOLD] & 0x7f)) << 21;
+ isa_mmio_init(start, length);
+ }
}
static void gt64120_writel (void *opaque, target_phys_addr_t addr,
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
reply other threads:[~2007-01-22 23:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20070122234158.GA12465@farad.aurel32.net \
--to=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).