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 _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel