mirror of https://github.com/xqemu/xqemu.git
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
This commit is contained in:
parent
5a38f08190
commit
c2b3b41a0b
6
hw/pc.c
6
hw/pc.c
|
@ -852,6 +852,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cirrus_vga_enabled || std_vga_enabled || vmsvga_enabled) {
|
||||||
/* VGA BIOS load */
|
/* VGA BIOS load */
|
||||||
if (cirrus_vga_enabled) {
|
if (cirrus_vga_enabled) {
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_CIRRUS_FILENAME);
|
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_CIRRUS_FILENAME);
|
||||||
|
@ -865,10 +866,11 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
|
||||||
|
|
||||||
ret = load_image(buf, phys_ram_base + vga_bios_offset);
|
ret = load_image(buf, phys_ram_base + vga_bios_offset);
|
||||||
if (ret != vga_bios_size) {
|
if (ret != vga_bios_size) {
|
||||||
vga_bios_error:
|
vga_bios_error:
|
||||||
fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", buf);
|
fprintf(stderr, "qemu: could not load VGA BIOS '%s'\n", buf);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* setup basic memory access */
|
/* setup basic memory access */
|
||||||
cpu_register_physical_memory(0xc0000, 0x10000,
|
cpu_register_physical_memory(0xc0000, 0x10000,
|
||||||
|
@ -956,7 +958,7 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
|
||||||
vga_ram_addr, vga_ram_size);
|
vga_ram_addr, vga_ram_size);
|
||||||
else
|
else
|
||||||
fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
|
fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
|
||||||
} else {
|
} else if (std_vga_enabled) {
|
||||||
if (pci_enabled) {
|
if (pci_enabled) {
|
||||||
pci_vga_init(pci_bus, ds, phys_ram_base + vga_ram_addr,
|
pci_vga_init(pci_bus, ds, phys_ram_base + vga_ram_addr,
|
||||||
vga_ram_addr, vga_ram_size, 0, 0);
|
vga_ram_addr, vga_ram_size, 0, 0);
|
||||||
|
|
1
sysemu.h
1
sysemu.h
|
@ -83,6 +83,7 @@ void do_info_slirp(void);
|
||||||
|
|
||||||
extern int bios_size;
|
extern int bios_size;
|
||||||
extern int cirrus_vga_enabled;
|
extern int cirrus_vga_enabled;
|
||||||
|
extern int std_vga_enabled;
|
||||||
extern int vmsvga_enabled;
|
extern int vmsvga_enabled;
|
||||||
extern int graphic_width;
|
extern int graphic_width;
|
||||||
extern int graphic_height;
|
extern int graphic_height;
|
||||||
|
|
10
vl.c
10
vl.c
|
@ -192,6 +192,7 @@ int vm_running;
|
||||||
static int rtc_utc = 1;
|
static int rtc_utc = 1;
|
||||||
static int rtc_date_offset = -1; /* -1 means no change */
|
static int rtc_date_offset = -1; /* -1 means no change */
|
||||||
int cirrus_vga_enabled = 1;
|
int cirrus_vga_enabled = 1;
|
||||||
|
int std_vga_enabled = 0;
|
||||||
int vmsvga_enabled = 0;
|
int vmsvga_enabled = 0;
|
||||||
#ifdef TARGET_SPARC
|
#ifdef TARGET_SPARC
|
||||||
int graphic_width = 1024;
|
int graphic_width = 1024;
|
||||||
|
@ -3873,7 +3874,7 @@ static void help(int exitcode)
|
||||||
" use -soundhw ? to get the list of supported cards\n"
|
" use -soundhw ? to get the list of supported cards\n"
|
||||||
" use -soundhw all to enable all of them\n"
|
" use -soundhw all to enable all of them\n"
|
||||||
#endif
|
#endif
|
||||||
"-vga [std|cirrus|vmware]\n"
|
"-vga [std|cirrus|vmware|none]\n"
|
||||||
" select video card type\n"
|
" select video card type\n"
|
||||||
"-localtime set the real time clock to local time [default=utc]\n"
|
"-localtime set the real time clock to local time [default=utc]\n"
|
||||||
"-full-screen start in full screen\n"
|
"-full-screen start in full screen\n"
|
||||||
|
@ -4407,14 +4408,21 @@ static void select_vgahw (const char *p)
|
||||||
const char *opts;
|
const char *opts;
|
||||||
|
|
||||||
if (strstart(p, "std", &opts)) {
|
if (strstart(p, "std", &opts)) {
|
||||||
|
std_vga_enabled = 1;
|
||||||
cirrus_vga_enabled = 0;
|
cirrus_vga_enabled = 0;
|
||||||
vmsvga_enabled = 0;
|
vmsvga_enabled = 0;
|
||||||
} else if (strstart(p, "cirrus", &opts)) {
|
} else if (strstart(p, "cirrus", &opts)) {
|
||||||
cirrus_vga_enabled = 1;
|
cirrus_vga_enabled = 1;
|
||||||
|
std_vga_enabled = 0;
|
||||||
vmsvga_enabled = 0;
|
vmsvga_enabled = 0;
|
||||||
} else if (strstart(p, "vmware", &opts)) {
|
} else if (strstart(p, "vmware", &opts)) {
|
||||||
cirrus_vga_enabled = 0;
|
cirrus_vga_enabled = 0;
|
||||||
|
std_vga_enabled = 0;
|
||||||
vmsvga_enabled = 1;
|
vmsvga_enabled = 1;
|
||||||
|
} else if (strstart(p, "none", &opts)) {
|
||||||
|
cirrus_vga_enabled = 0;
|
||||||
|
std_vga_enabled = 0;
|
||||||
|
vmsvga_enabled = 0;
|
||||||
} else {
|
} else {
|
||||||
invalid_vga:
|
invalid_vga:
|
||||||
fprintf(stderr, "Unknown vga type: %s\n", p);
|
fprintf(stderr, "Unknown vga type: %s\n", p);
|
||||||
|
|
Loading…
Reference in New Issue