Commit 90e950d17fa8f6f6e5b10812a26dcb8bd893b6f2
1 parent
3ddd0065
Fix GT64120 mapping with REDBOOT, by Aurelien Jarno.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2366 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
3 deletions
hw/gt64xxx.c
... | ... | @@ -229,9 +229,12 @@ static void gt64120_pci_mapping(GT64120State *s) |
229 | 229 | target_phys_addr_t start, length; |
230 | 230 | |
231 | 231 | /* Update IO mapping */ |
232 | - start = s->regs[GT_PCI0IOLD] << 21; | |
233 | - length = ((s->regs[GT_PCI0IOHD] + 1) - (s->regs[GT_PCI0IOLD] & 0x7f)) << 21; | |
234 | - isa_mmio_init(start, length); | |
232 | + if ((s->regs[GT_PCI0IOLD] & 0x7f) <= s->regs[GT_PCI0IOHD]) | |
233 | + { | |
234 | + start = s->regs[GT_PCI0IOLD] << 21; | |
235 | + length = ((s->regs[GT_PCI0IOHD] + 1) - (s->regs[GT_PCI0IOLD] & 0x7f)) << 21; | |
236 | + isa_mmio_init(start, length); | |
237 | + } | |
235 | 238 | } |
236 | 239 | |
237 | 240 | static void gt64120_writel (void *opaque, target_phys_addr_t addr, | ... | ... |