3be7fb5
From 7a53bcbef278b4191d5cb497ef2b81509a00f670 Mon Sep 17 00:00:00 2001
3be7fb5
From: Mark McLoughlin <markmc@redhat.com>
3be7fb5
Date: Wed, 13 May 2009 12:59:47 +0100
3be7fb5
Subject: [PATCH 1/1] Fix load_linux reset handling fix
3be7fb5
3be7fb5
This fix on the stable branch:
3be7fb5
3be7fb5
  commit 2da1e398641d9fccf683645c808dee0d088f84cf
3be7fb5
  Author: Glauber Costa <glommer@redhat.com>
3be7fb5
  Date:   Fri May 8 02:22:13 2009 -0300
3be7fb5
3be7fb5
    reset state for load_linux
3be7fb5
3be7fb5
Caused -kernel to break.
3be7fb5
3be7fb5
The problem is that we're passing the ROM's ram_addr_t to
3be7fb5
load_linux() rather than its target_phys_addr_t. We also
3be7fb5
need to register the memory before trying to write to
3be7fb5
it.
3be7fb5
3be7fb5
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
3be7fb5
---
3be7fb5
 hw/pc.c |    4 ++--
3be7fb5
 1 files changed, 2 insertions(+), 2 deletions(-)
3be7fb5
3be7fb5
diff --git a/hw/pc.c b/hw/pc.c
3be7fb5
index 062c306..e69a1f7 100644
3be7fb5
--- a/hw/pc.c
3be7fb5
+++ b/hw/pc.c
3be7fb5
@@ -954,10 +954,10 @@ vga_bios_error:
3be7fb5
         offset = option_rom_start;
3be7fb5
         if (linux_boot) {
3be7fb5
             option_rom_offset = qemu_ram_alloc(TARGET_PAGE_SIZE);
3be7fb5
-            load_linux(option_rom_offset,
3be7fb5
-                       kernel_filename, initrd_filename, kernel_cmdline);
3be7fb5
             cpu_register_physical_memory(option_rom_start, TARGET_PAGE_SIZE,
3be7fb5
                                          option_rom_offset);
3be7fb5
+            load_linux(option_rom_start,
3be7fb5
+                       kernel_filename, initrd_filename, kernel_cmdline);
3be7fb5
             offset += TARGET_PAGE_SIZE;
3be7fb5
         }
3be7fb5
 
3be7fb5
-- 
3be7fb5
1.6.2.2
3be7fb5