From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LnG3P-0001OM-DO for qemu-devel@nongnu.org; Fri, 27 Mar 2009 13:41:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LnG3K-0001MM-AT for qemu-devel@nongnu.org; Fri, 27 Mar 2009 13:41:14 -0400 Received: from [199.232.76.173] (port=39448 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LnG3K-0001MI-3a for qemu-devel@nongnu.org; Fri, 27 Mar 2009 13:41:10 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40062) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LnG3J-0000p9-C7 for qemu-devel@nongnu.org; Fri, 27 Mar 2009 13:41:09 -0400 From: Glauber Costa Date: Fri, 27 Mar 2009 14:37:36 -0300 Message-Id: <1238175456-9816-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] [PATCH] get roms more room. Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com This patch increases by 50 % the size available for option roms. The main motivator is that some roms grew bigger than the 64k we currently allocate for them (Hey, it's 2009!) One example is the gpxe project, that produces some roms with 69k, 70k, etc. The space proposed by this patch actually makes it as big as 84k. Probably still a fit for some time. But there is no free lunch. This space must come from somewhere, and we take it from vga rom space. Currently, our vga roms are around 35k in size. With this patch, they will be limited to 44k, instead of 64k, which seems reasonable to me. --- hw/pc.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 69f25f3..f66bfdd 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -876,7 +876,7 @@ vga_bios_error: } /* setup basic memory access */ - cpu_register_physical_memory(0xc0000, 0x10000, + cpu_register_physical_memory(0xc0000, 0xb000, vga_bios_offset | IO_MEM_ROM); } @@ -897,7 +897,7 @@ vga_bios_error: option_rom_offset = qemu_ram_alloc(TARGET_PAGE_SIZE); load_linux(phys_ram_base + option_rom_offset, kernel_filename, initrd_filename, kernel_cmdline); - cpu_register_physical_memory(0xd0000, TARGET_PAGE_SIZE, + cpu_register_physical_memory(0xcb000, TARGET_PAGE_SIZE, option_rom_offset | IO_MEM_ROM); offset = TARGET_PAGE_SIZE; } @@ -909,7 +909,7 @@ vga_bios_error: option_rom[i]); exit(1); } - if (size > (0x10000 - offset)) + if (size > (0x15000 - offset)) goto option_rom_error; option_rom_offset = qemu_ram_alloc(size); ret = load_image(option_rom[i], phys_ram_base + option_rom_offset); @@ -919,7 +919,7 @@ vga_bios_error: exit(1); } size = (size + 4095) & ~4095; - cpu_register_physical_memory(0xd0000 + offset, + cpu_register_physical_memory(0xcb000 + offset, size, option_rom_offset | IO_MEM_ROM); offset += size; } -- 1.6.2