Message ID | 1371195048-19618-2-git-send-email-leon.alrae@imgtec.com |
---|---|
State | New |
Headers | show |
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 5033d51..4def898 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -916,8 +916,11 @@ void mips_malta_init(QEMUMachineInitArgs *args) a neat trick which allows bi-endian firmware. */ #ifndef TARGET_WORDS_BIGENDIAN { - uint32_t *addr = memory_region_get_ram_ptr(bios); - uint32_t *end = addr + bios_size; + uint32_t *end, *addr = rom_ptr(FLASH_ADDRESS); + if (!addr) { + addr = memory_region_get_ram_ptr(bios); + } + end = (void *)addr + bios_size; while (addr < end) { bswap32s(addr); addr++;