Commit 1f04275ec1d2db4baab3fe638ccbaa5862cdc0df

Authored by bellard
1 parent 4e3e9d0b

-cirrusvga option


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@897 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 3 changed files with 22 additions and 5 deletions
... ... @@ -396,8 +396,18 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device,
396 396  
397 397 register_ioport_write(0xf0, 1, 1, ioportF0_write, NULL);
398 398  
399   - vga_initialize(ds, phys_ram_base + ram_size, ram_size,
400   - vga_ram_size, pci_enabled);
  399 + if (cirrus_vga_enabled) {
  400 + if (pci_enabled) {
  401 + pci_cirrus_vga_init(ds, phys_ram_base + ram_size, ram_size,
  402 + vga_ram_size);
  403 + } else {
  404 + isa_cirrus_vga_init(ds, phys_ram_base + ram_size, ram_size,
  405 + vga_ram_size);
  406 + }
  407 + } else {
  408 + vga_initialize(ds, phys_ram_base + ram_size, ram_size,
  409 + vga_ram_size, pci_enabled);
  410 + }
401 411  
402 412 rtc_state = rtc_init(0x70, 8);
403 413 register_ioport_read(0x61, 1, 1, speaker_ioport_read, NULL);
... ...
... ... @@ -130,6 +130,7 @@ int audio_enabled = 0;
130 130 int pci_enabled = 0;
131 131 int prep_enabled = 0;
132 132 int rtc_utc = 1;
  133 +int cirrus_vga_enabled = 0;
133 134  
134 135 /***********************************************************/
135 136 /* x86 ISA bus support */
... ... @@ -2053,6 +2054,7 @@ enum {
2053 2054 QEMU_OPTION_pci,
2054 2055 QEMU_OPTION_prep,
2055 2056 QEMU_OPTION_localtime,
  2057 + QEMU_OPTION_cirrusvga,
2056 2058 };
2057 2059  
2058 2060 typedef struct QEMUOption {
... ... @@ -2097,13 +2099,14 @@ const QEMUOption qemu_options[] = {
2097 2099 { "hdachs", HAS_ARG, QEMU_OPTION_hdachs },
2098 2100 { "L", HAS_ARG, QEMU_OPTION_L },
2099 2101 { "no-code-copy", 0, QEMU_OPTION_no_code_copy },
2100   -
2101   - /* temporary options */
2102   - { "pci", 0, QEMU_OPTION_pci },
2103 2102 #ifdef TARGET_PPC
2104 2103 { "prep", 0, QEMU_OPTION_prep },
2105 2104 #endif
2106 2105 { "localtime", 0, QEMU_OPTION_localtime },
  2106 +
  2107 + /* temporary options */
  2108 + { "pci", 0, QEMU_OPTION_pci },
  2109 + { "cirrusvga", 0, QEMU_OPTION_cirrusvga },
2107 2110 { NULL },
2108 2111 };
2109 2112  
... ... @@ -2383,6 +2386,9 @@ int main(int argc, char **argv)
2383 2386 case QEMU_OPTION_localtime:
2384 2387 rtc_utc = 0;
2385 2388 break;
  2389 + case QEMU_OPTION_cirrusvga:
  2390 + cirrus_vga_enabled = 1;
  2391 + break;
2386 2392 }
2387 2393 }
2388 2394 }
... ...
... ... @@ -171,6 +171,7 @@ extern int audio_enabled;
171 171 extern int ram_size;
172 172 extern int bios_size;
173 173 extern int rtc_utc;
  174 +extern int cirrus_vga_enabled;
174 175  
175 176 /* XXX: make it dynamic */
176 177 #if defined (TARGET_PPC)
... ...