aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-15 20:37:28 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-15 20:37:28 +0000
commitc2b3b41a0ba22b22e199f0a53830f337989db9fd (patch)
treedebc8d853f8debcbab913ad2ae9ac5c18490ba4e /hw/pc.c
parent5a38f081904fdae0251fb16befc2cdb4bc894e27 (diff)
downloadqemu-c2b3b41a0ba22b22e199f0a53830f337989db9fd.zip
qemu-c2b3b41a0ba22b22e199f0a53830f337989db9fd.tar.gz
qemu-c2b3b41a0ba22b22e199f0a53830f337989db9fd.tar.bz2
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 <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6322 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/hw/pc.c b/hw/pc.c
index efd291d..d64e442 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -852,22 +852,24 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
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);
-
- 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);
+ 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);
+ }
}
/* setup basic memory access */
@@ -956,7 +958,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
vga_ram_addr, vga_ram_size);
else
fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
- } else {
+ } else if (std_vga_enabled) {
if (pci_enabled) {
pci_vga_init(pci_bus, ds, phys_ram_base + vga_ram_addr,
vga_ram_addr, vga_ram_size, 0, 0);