Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1E902x-0002ii-TC for qemu-devel@nongnu.org; Sat, 27 Aug 2005 08:44:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1E902t-0002gZ-JN for qemu-devel@nongnu.org; Sat, 27 Aug 2005 08:44:29 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1E902s-0002Yv-G6 for qemu-devel@nongnu.org; Sat, 27 Aug 2005 08:44:26 -0400 Received: from [195.3.96.102] (helo=email.aon.at) by monty-python.gnu.org with esmtp (Exim 4.34) id 1E8zxy-0002qP-9x for qemu-devel@nongnu.org; Sat, 27 Aug 2005 08:39:22 -0400 Received: from m906p016.adsl.highway.telekom.at (HELO s37.loc) ([62.47.145.48]) (envelope-sender ) by smarthub71.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 27 Aug 2005 12:37:34 -0000 Received: from cow by s37.loc with local (Exim 4.52) id 1E8zx3-0000ia-8Q for qemu-devel@nongnu.org; Sat, 27 Aug 2005 14:38:25 +0200 Date: Sat, 27 Aug 2005 14:38:25 +0200 From: Bernhard Fischer Subject: Re: [Qemu-devel] [RFC] check VGA BIOS size Message-ID: <20050827123825.GA2671@aon.at> References: <20050731115320.GI15261@aon.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050731115320.GI15261@aon.at> 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 Fabrice, Will you accept such a check? kind regards, On Sun, Jul 31, 2005 at 01:53:20PM +0200, Bernhard Fischer wrote: >Hi, > >What do you think about checking if a VGA bios was found (and if so, if >it has a valid size)? > >Reasoning is that on pristine machines (i.e. without a VGA bios ROM >available) starting qemu fails without giving any helpful error message. > >I'm attaching a simple patch which adds such a check. > >Comments? > >Thank you, >Bernhard >diff -X excl -rduNp qemu.oorig/hw/pc.c qemu/hw/pc.c >--- qemu.oorig/hw/pc.c 2005-07-28 17:54:38.000000000 +0200 >+++ qemu/hw/pc.c 2005-07-31 13:38:23.000000000 +0200 >@@ -414,7 +414,7 @@ static void pc_init1(int ram_size, int v > char buf[1024]; > int ret, linux_boot, initrd_size, i, nb_nics1; > unsigned long bios_offset, vga_bios_offset; >- int bios_size, isa_bios_size; >+ int bios_size, isa_bios_size, vga_bios_size; > PCIBus *pci_bus; > > linux_boot = (kernel_filename != NULL); >@@ -446,8 +446,12 @@ static void pc_init1(int ram_size, int v > } else { > snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME); > } >+ vga_bios_size = get_image_size(buf); >+ if (vga_bios_size != 32768) >+ goto bios_error; >+ > ret = load_image(buf, phys_ram_base + vga_bios_offset); >- >+ > /* setup basic memory access */ > cpu_register_physical_memory(0xc0000, 0x10000, > vga_bios_offset | IO_MEM_ROM); > >_______________________________________________ >Qemu-devel mailing list >Qemu-devel@nongnu.org >http://lists.nongnu.org/mailman/listinfo/qemu-devel