From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MGyCR-0004Rb-PO for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:41:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MGyCM-0004IU-EH for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:41:23 -0400 Received: from [199.232.76.173] (port=58499 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MGyCM-0004Hv-88 for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:41:18 -0400 Received: from cantor.suse.de ([195.135.220.2]:35184 helo=mx1.suse.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MGyCK-0002CM-6j for qemu-devel@nongnu.org; Wed, 17 Jun 2009 12:41:16 -0400 From: Alexander Graf Date: Wed, 17 Jun 2009 18:41:10 +0200 Message-Id: <1245256873-8010-2-git-send-email-agraf@suse.de> In-Reply-To: <1245256873-8010-1-git-send-email-agraf@suse.de> References: <1245256873-8010-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PATCH 1/4] Change bochs bios init order List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, rene@exactcode.de For multiboot support, we need bochs_bios_init to happen before load_linux, so we get the fw_cfg device. Signed-off-by: Alexander Graf --- hw/pc.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 143b697..f0df669 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -970,6 +970,12 @@ static void pc_init1(ram_addr_t ram_size, if (oprom_area_size < 0x8000) oprom_area_size = 0x8000; + /* map all the bios at the top of memory */ + cpu_register_physical_memory((uint32_t)(-bios_size), + bios_size, bios_offset | IO_MEM_ROM); + + bochs_bios_init(); + if (linux_boot) { load_linux(0xc0000 + oprom_area_size, kernel_filename, initrd_filename, kernel_cmdline, below_4g_mem_size); @@ -981,12 +987,6 @@ static void pc_init1(ram_addr_t ram_size, 0xc0000 + oprom_area_size, 0xe0000); } - /* map all the bios at the top of memory */ - cpu_register_physical_memory((uint32_t)(-bios_size), - bios_size, bios_offset | IO_MEM_ROM); - - bochs_bios_init(); - cpu_irq = qemu_allocate_irqs(pic_irq_request, NULL, 1); i8259 = i8259_init(cpu_irq[0]); ferr_irq = i8259[13]; -- 1.6.0.2