Reorganize option rom (+linux kernel) loading.
A message that is not in the archive (sent off-list or not yet received): [email protected]
Am 06.10.2009 22:05, schrieb Anthony Liguori:
Quoted 30 lines
From: Gerd Hoffmann <[email protected]>
This patch adds infrastructure to maintain memory regions which must be restored on reset. That includes roms (vga bios and option roms on pc), but is also used when loading linux kernels directly. Features:
- loading files is supported.
- passing blobs is supported.
- target address range is supported (for optionrom area).
- fixed target memory address is supported (linux kernel).New in v2:
- writes to ROM are done only at initial boot.
- also handle aout and uimage loaders.
- drop unusedfread_targphys()function.The final memory layout is created once all memory regions are registered. The option roms get addresses assigned and the registered regions are checked against overlaps. Finally all data is copyed to the guest memory.
Advantages:
(1) Filling memory on initial boot and on reset takes the same code path, making reset more robust.
(2) The need to keep track of the option rom load address is gone.
(3) Due to (2) option roms can be loaded outsidepc_init(). This allows to move the pxe rom loading into the nic drivers for example.
Quoted 7 lines
Additional bonus: There is a 'info roms' monitor command now.
The patch also switches over
pc.cand removes theoption_rom_setup_reset()andload_option_rom()functions.Signed-off-by Gerd Hoffmann <[email protected]>Signed-off-by Anthony Liguori <[email protected]>
Is it intended that -initrd files are no longer searched in the current directory? Before this change you could use -initrd file, now you need -initrd ./file
Kevin
Hi,
Quoted 3 lines
Is it intended that -initrd files are no longer searched in the current directory? Before this change you could use -initrd file, now you need -initrd ./file
No. Two incremental fixes for this commit went to the list last week ("rom loader: ..."). This is one of the bugs fixed.
cheers,
Gerd