• P
    mips_malta: fix BIOS endianness swapping · a2b8813d
    Paul Burton 提交于
    If the target is little endian (mipsel) then the BIOS image endianness
    is swapped so that the big endian BIOS binaries commonly produced can be
    loaded correctly.
    
    When using the -bios argument the BIOS is loaded using
    load_image_targphys, however this doesn't perform the load to target
    memory immediately. Instead it loads the BIOS file into a struct Rom
    which will later be written to target memory upon reset. However the
    endianness conversion was being performed before this, on init, and
    operating on the target memory which at this point is blank & will later
    be overwritten by the (big endian) BIOS image. Correct this by operating
    on the data referenced by struct Rom rather than the target memory when
    the -bios argument is used.
    Signed-off-by: NPaul Burton <paul.burton@imgtec.com>
    Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
    Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
    a2b8813d
mips_malta.c 33.9 KB