From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M4CWM-0004Xc-Sd for qemu-devel@nongnu.org; Wed, 13 May 2009 07:21:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M4CWH-0004Wt-9A for qemu-devel@nongnu.org; Wed, 13 May 2009 07:21:09 -0400 Received: from [199.232.76.173] (port=53436 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4CWH-0004Wq-2E for qemu-devel@nongnu.org; Wed, 13 May 2009 07:21:05 -0400 Received: from mail17.svc.cra.dublin.eircom.net ([159.134.118.216]:35818) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1M4CWG-0004A9-Oc for qemu-devel@nongnu.org; Wed, 13 May 2009 07:21:04 -0400 From: Mark McLoughlin Date: Wed, 13 May 2009 12:21:01 +0100 Message-Id: <1242213661-6138-1-git-send-email-markmc@redhat.com> Subject: [Qemu-devel] [PATCH 1/1] Fix load_linux reset handling fix List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Mark McLoughlin , Glauber Costa , qemu-devel@nongnu.org This fix on the stable branch: commit 2da1e398641d9fccf683645c808dee0d088f84cf Author: Glauber Costa 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. Signed-off-by: Mark McLoughlin --- hw/pc.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 062c306..e69a1f7 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -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; } -- 1.6.2.2