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 `. `' [EMAIL PROTECTED] | [EMAIL PROTECTED] `- people.debian.org/~aurel32 | www.aurel32.net _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel