summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2009-12-04 17:19:25 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-19 08:26:20 -0600
commit139e310025d0cb654c5f905214a4c685398fd0c7 (patch)
tree23ee426bfff999e4258eb7c32f42920daf4bcc9e /hw/loader.c
parentRevert "Rename DriveInfo.onerror to on_write_error" (fix mismerge) (diff)
downloadqemu-kvm-139e310025d0cb654c5f905214a4c685398fd0c7.tar.gz
qemu-kvm-139e310025d0cb654c5f905214a4c685398fd0c7.tar.bz2
qemu-kvm-139e310025d0cb654c5f905214a4c685398fd0c7.zip
Fix loading of ELF multiboot kernels
The multiboot implementation assumed that there is only one program header (which contains the entry point) and that the entry point is at the start of the code. This doesn't hold true generally and caused too little data to be loaded. Fix the loading code to pass the whole loaded data to the Multiboot Option ROM. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 092493be3caab1ac77f4223b4c3fb0975d1ed490)
Diffstat (limited to 'hw/loader.c')
-rw-r--r--hw/loader.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/hw/loader.c b/hw/loader.c
index 2d7a2c495..4c6981fc4 100644
--- a/hw/loader.c
+++ b/hw/loader.c
@@ -718,8 +718,6 @@ int rom_copy(uint8_t *dest, target_phys_addr_t addr, size_t size)
QTAILQ_FOREACH(rom, &roms, next) {
if (rom->max)
continue;
- if (rom->min > addr)
- continue;
if (rom->min + rom->romsize < addr)
continue;
if (rom->min > end)