Skip to contentSkip to conversation

Fix load_linux reset handling fix

PATCH New Mark McLoughlin 1 participant 1 message May 13, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix load_linux reset handling fix

This fix on the stable branch:

commit 2da1e398641d9fccf683645c808dee0d088f84cf
Author: Glauber Costa <[email protected]>
Date: Fri May 8 02:22:13 2009 -0300

reset state for load_linux

Caused -kernel to break.

The problem is that we're passing the ROM's ram_addr_t to load_linux() rather than its target_phys_addr_t. We also need to register the memory before trying to write to it.

---
 hw/pc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/pc.c +2 -2
index 062c306..e69a1f7 100644
@@ -954,10 +954,10 @@ vga_bios_error:
         offset = 0;
         if (linux_boot) {
             option_rom_offset = qemu_ram_alloc(TARGET_PAGE_SIZE);
-            load_linux(option_rom_offset,
-                       kernel_filename, initrd_filename, kernel_cmdline);
             cpu_register_physical_memory(0xd0000, TARGET_PAGE_SIZE,
                                          option_rom_offset);
+            load_linux(0xd0000,
+                       kernel_filename, initrd_filename, kernel_cmdline);
             offset = TARGET_PAGE_SIZE;
         }
 
Signature · 1 line
1.6.2.2