mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 20:03:37 +08:00
mips_malta: cap BIOS endian swap length at 0x3e0000 bytes
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.burton@imgtec.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
02bccc7796
commit
1817f56a83
@ -978,7 +978,7 @@ void mips_malta_init(QEMUMachineInitArgs *args)
|
|||||||
if (!addr) {
|
if (!addr) {
|
||||||
addr = memory_region_get_ram_ptr(bios);
|
addr = memory_region_get_ram_ptr(bios);
|
||||||
}
|
}
|
||||||
end = (void *)addr + bios_size;
|
end = (void *)addr + MIN(bios_size, 0x3e0000);
|
||||||
while (addr < end) {
|
while (addr < end) {
|
||||||
bswap32s(addr);
|
bswap32s(addr);
|
||||||
addr++;
|
addr++;
|
||||||
|
Loading…
Reference in New Issue
Block a user