The bios loading in pc_memory_init doesn't seem to make sense
Hi all,
The bios loading part of pc_memory_init in hw/pc.c does not seem to make sense. Specifically, the operations are:
- find the bios file and its size, put the size in bios_size
- bios_offset = qemu_ram_alloc(bios_size)
- rom_add_file_fixed(bios_name, (uint32_t)(-bios_size))
-> at this point raff() loads the file in an independant allocation
and maps it at the end of the 4G space
- map up to 128K of bios_offset at 0xd0000
-> notice that the bios file was never loaded in the ram allocated
at bios_offset
- map bios_offset at end-of-4G
-> same remark as before
So, since the emulation seems to work, what am I missing?
Best,
OG.