From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNlY8-0004UI-79 for qemu-devel@nongnu.org; Fri, 16 Jan 2009 05:03:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNlY7-0004TV-3x for qemu-devel@nongnu.org; Fri, 16 Jan 2009 05:03:35 -0500 Received: from [199.232.76.173] (port=52667 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNlY6-0004TJ-Dp for qemu-devel@nongnu.org; Fri, 16 Jan 2009 05:03:34 -0500 Received: from lizzard.sbs.de ([194.138.37.39]:15160) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNlY5-0007zL-Gs for qemu-devel@nongnu.org; Fri, 16 Jan 2009 05:03:34 -0500 Received: from mail2.sbs.de (localhost [127.0.0.1]) by lizzard.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n0GA3TAL006249 for ; Fri, 16 Jan 2009 11:03:29 +0100 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail2.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id n0GA3SWo024290 for ; Fri, 16 Jan 2009 11:03:29 +0100 Message-ID: <49705B73.9060103@siemens.com> Date: Fri, 16 Jan 2009 11:03:31 +0100 From: Jan Kiszka MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [6322] add a -vga none cli option (Stefano Stabellini) 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 Anthony Liguori wrote: > Revision: 6322 > http://svn.sv.gnu.org/viewvc/?view=3Drev&root=3Dqemu&revision= =3D6322 > Author: aliguori > Date: 2009-01-15 20:37:28 +0000 (Thu, 15 Jan 2009) >=20 > Log Message: > ----------- > add a -vga none cli option (Stefano Stabellini) >=20 > 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. >=20 > Signed-off-by: Stefano Stabellini > Signed-off-by: Anthony Liguori >=20 > Modified Paths: > -------------- > trunk/hw/pc.c > trunk/sysemu.h > trunk/vl.c >=20 > Modified: trunk/hw/pc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- 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); > } > =20 > - /* VGA BIOS load */ > - if (cirrus_vga_enabled) { > - snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_CIRRUS_F= ILENAME); > - } else { > - snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME= ); > - } > - vga_bios_size =3D get_image_size(buf); > - if (vga_bios_size <=3D 0 || vga_bios_size > 65536) > - goto vga_bios_error; > - vga_bios_offset =3D 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_CIRR= US_FILENAME); > + } else { > + snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILE= NAME); > + } > + vga_bios_size =3D get_image_size(buf); > + if (vga_bios_size <=3D 0 || vga_bios_size > 65536) > + goto vga_bios_error; > + vga_bios_offset =3D qemu_ram_alloc(65536); > =20 > - ret =3D load_image(buf, phys_ram_base + vga_bios_offset); > - if (ret !=3D vga_bios_size) { > - vga_bios_error: > - fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", buf); > - exit(1); > + ret =3D load_image(buf, phys_ram_base + vga_bios_offset); > + if (ret !=3D vga_bios_size) { > +vga_bios_error: > + fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", bu= f); > + exit(1); > + } > } > =20 > /* setup basic memory access */ This hunk now generates: qemu/hw/pc.c: In function =E2=80=98pc_init1=E2=80=99: qemu/hw/pc.c:762: warning: =E2=80=98vga_bios_offset=E2=80=99 may be used = uninitialized in this function = =20 For obvious reasons. Can we simply make the related cpu_register_physical_memory conditional as well? Jan --=20 Siemens AG, Corporate Technology, CT SE 26 Corporate Competence Center Embedded Linux