qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Fischer <rep.nop@aon.at>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] check VGA BIOS size
Date: Sat, 27 Aug 2005 14:38:25 +0200	[thread overview]
Message-ID: <20050827123825.GA2671@aon.at> (raw)
In-Reply-To: <20050731115320.GI15261@aon.at>

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

      reply	other threads:[~2005-08-27 12:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-31 11:53 [Qemu-devel] [RFC] check VGA BIOS size Bernhard Fischer
2005-08-27 12:38 ` Bernhard Fischer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050827123825.GA2671@aon.at \
    --to=rep.nop@aon.at \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).