From: ths Date: Wed, 31 Jan 2007 12:02:12 +0000 (+0000) Subject: Fix GT64120 mapping with REDBOOT, by Aurelien Jarno. X-Git-Tag: release_0_9_1~1529 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=975d91bfa383311f0f77ef32a74524c60c1bd162;p=qemu-xen-4.4-testing.git Fix GT64120 mapping with REDBOOT, by Aurelien Jarno. --- diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c index 84e041fcf..ccb6a7c1a 100644 --- a/hw/gt64xxx.c +++ b/hw/gt64xxx.c @@ -229,9 +229,12 @@ static void gt64120_pci_mapping(GT64120State *s) 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,