[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [6322] add a -vga none cli option (Stefano Stabellini)
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] Re: [6322] add a -vga none cli option (Stefano Stabellini) |
Date: |
Fri, 16 Jan 2009 11:03:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Anthony Liguori wrote:
> Revision: 6322
> http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6322
> Author: aliguori
> Date: 2009-01-15 20:37:28 +0000 (Thu, 15 Jan 2009)
>
> Log Message:
> -----------
> add a -vga none cli option (Stefano Stabellini)
>
> currently there is no way to fully disable any graphic card device for
> the PC architecture.
> You can have no graphical output, thanks to -nographic, but you would
> have the VGA device connected to your PCI bus anyway.
> There is already a convenient -vga option to choose between std, cirrus
> and vmware; this patch add the new option "none" to select no graphic
> card at all.
>
> Signed-off-by: Stefano Stabellini <address@hidden>
> Signed-off-by: Anthony Liguori <address@hidden>
>
> Modified Paths:
> --------------
> trunk/hw/pc.c
> trunk/sysemu.h
> trunk/vl.c
>
> Modified: trunk/hw/pc.c
> ===================================================================
> --- trunk/hw/pc.c 2009-01-15 20:16:51 UTC (rev 6321)
> +++ trunk/hw/pc.c 2009-01-15 20:37:28 UTC (rev 6322)
> @@ -852,22 +852,24 @@
> exit(1);
> }
>
> - /* VGA BIOS load */
> - if (cirrus_vga_enabled) {
> - snprintf(buf, sizeof(buf), "%s/%s", bios_dir,
> VGABIOS_CIRRUS_FILENAME);
> - } else {
> - snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME);
> - }
> - vga_bios_size = get_image_size(buf);
> - if (vga_bios_size <= 0 || vga_bios_size > 65536)
> - goto vga_bios_error;
> - vga_bios_offset = qemu_ram_alloc(65536);
> + if (cirrus_vga_enabled || std_vga_enabled || vmsvga_enabled) {
> + /* VGA BIOS load */
> + if (cirrus_vga_enabled) {
> + snprintf(buf, sizeof(buf), "%s/%s", bios_dir,
> VGABIOS_CIRRUS_FILENAME);
> + } else {
> + snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME);
> + }
> + vga_bios_size = get_image_size(buf);
> + if (vga_bios_size <= 0 || vga_bios_size > 65536)
> + goto vga_bios_error;
> + vga_bios_offset = qemu_ram_alloc(65536);
>
> - ret = load_image(buf, phys_ram_base + vga_bios_offset);
> - if (ret != vga_bios_size) {
> - vga_bios_error:
> - fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", buf);
> - exit(1);
> + ret = load_image(buf, phys_ram_base + vga_bios_offset);
> + if (ret != vga_bios_size) {
> +vga_bios_error:
> + fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", buf);
> + exit(1);
> + }
> }
>
> /* setup basic memory access */
This hunk now generates:
qemu/hw/pc.c: In function ‘pc_init1’:
qemu/hw/pc.c:762: warning: ‘vga_bios_offset’ may be used uninitialized in this
function
For obvious reasons. Can we simply make the related
cpu_register_physical_memory conditional as well?
Jan
--
Siemens AG, Corporate Technology, CT SE 26
Corporate Competence Center Embedded Linux