aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-01-31 12:02:12 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-01-31 12:02:12 +0000
commit90e950d17fa8f6f6e5b10812a26dcb8bd893b6f2 (patch)
treee7b6b7104f257518faaf9159f0c31402cc60e5f6
parent3ddd00658edf6c1af0c22f9cdcf963efdeda91bb (diff)
Fix GT64120 mapping with REDBOOT, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2366 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--hw/gt64xxx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/gt64xxx.c b/hw/gt64xxx.c
index 84e041fcfc..ccb6a7c1a2 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,