From: Paul Burton <paul.bur...@imgtec.com> This preserves the final sector of the pflash which is used by YAMON to hold environment variables. If the endianness of the environment data is swapped then YAMON will fail to load environment variables from pflash.
Signed-off-by: Paul Burton <paul.bur...@imgtec.com> Signed-off-by: Leon Alrae <leon.al...@imgtec.com> --- hw/mips/mips_malta.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 116a2f8..6d43e86 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -974,7 +974,7 @@ void mips_malta_init(QEMUMachineInitArgs *args) if (!addr) { addr = memory_region_get_ram_ptr(bios); } - end = (void *)addr + bios_size; + end = (void *)addr + MIN(bios_size, 0x3e0000); while (addr < end) { bswap32s(addr); addr++; -- 1.7.5.4