* [Qemu-devel] [PATCH] Fix GT64120 mapping with REDBOOT
@ 2007-01-22 23:41 Aurelien Jarno
0 siblings, 0 replies; only message in thread
From: Aurelien Jarno @ 2007-01-22 23:41 UTC (permalink / raw)
To: qemu-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-01-22 23:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-22 23:41 [Qemu-devel] [PATCH] Fix GT64120 mapping with REDBOOT Aurelien Jarno
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).