Commit 1f04275ec1d2db4baab3fe638ccbaa5862cdc0df
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
hw/pc.c
@@ -396,8 +396,18 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device, | @@ -396,8 +396,18 @@ void pc_init(int ram_size, int vga_ram_size, int boot_device, | ||
396 | 396 | ||
397 | register_ioport_write(0xf0, 1, 1, ioportF0_write, NULL); | 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 | rtc_state = rtc_init(0x70, 8); | 412 | rtc_state = rtc_init(0x70, 8); |
403 | register_ioport_read(0x61, 1, 1, speaker_ioport_read, NULL); | 413 | register_ioport_read(0x61, 1, 1, speaker_ioport_read, NULL); |
vl.c
@@ -130,6 +130,7 @@ int audio_enabled = 0; | @@ -130,6 +130,7 @@ int audio_enabled = 0; | ||
130 | int pci_enabled = 0; | 130 | int pci_enabled = 0; |
131 | int prep_enabled = 0; | 131 | int prep_enabled = 0; |
132 | int rtc_utc = 1; | 132 | int rtc_utc = 1; |
133 | +int cirrus_vga_enabled = 0; | ||
133 | 134 | ||
134 | /***********************************************************/ | 135 | /***********************************************************/ |
135 | /* x86 ISA bus support */ | 136 | /* x86 ISA bus support */ |
@@ -2053,6 +2054,7 @@ enum { | @@ -2053,6 +2054,7 @@ enum { | ||
2053 | QEMU_OPTION_pci, | 2054 | QEMU_OPTION_pci, |
2054 | QEMU_OPTION_prep, | 2055 | QEMU_OPTION_prep, |
2055 | QEMU_OPTION_localtime, | 2056 | QEMU_OPTION_localtime, |
2057 | + QEMU_OPTION_cirrusvga, | ||
2056 | }; | 2058 | }; |
2057 | 2059 | ||
2058 | typedef struct QEMUOption { | 2060 | typedef struct QEMUOption { |
@@ -2097,13 +2099,14 @@ const QEMUOption qemu_options[] = { | @@ -2097,13 +2099,14 @@ const QEMUOption qemu_options[] = { | ||
2097 | { "hdachs", HAS_ARG, QEMU_OPTION_hdachs }, | 2099 | { "hdachs", HAS_ARG, QEMU_OPTION_hdachs }, |
2098 | { "L", HAS_ARG, QEMU_OPTION_L }, | 2100 | { "L", HAS_ARG, QEMU_OPTION_L }, |
2099 | { "no-code-copy", 0, QEMU_OPTION_no_code_copy }, | 2101 | { "no-code-copy", 0, QEMU_OPTION_no_code_copy }, |
2100 | - | ||
2101 | - /* temporary options */ | ||
2102 | - { "pci", 0, QEMU_OPTION_pci }, | ||
2103 | #ifdef TARGET_PPC | 2102 | #ifdef TARGET_PPC |
2104 | { "prep", 0, QEMU_OPTION_prep }, | 2103 | { "prep", 0, QEMU_OPTION_prep }, |
2105 | #endif | 2104 | #endif |
2106 | { "localtime", 0, QEMU_OPTION_localtime }, | 2105 | { "localtime", 0, QEMU_OPTION_localtime }, |
2106 | + | ||
2107 | + /* temporary options */ | ||
2108 | + { "pci", 0, QEMU_OPTION_pci }, | ||
2109 | + { "cirrusvga", 0, QEMU_OPTION_cirrusvga }, | ||
2107 | { NULL }, | 2110 | { NULL }, |
2108 | }; | 2111 | }; |
2109 | 2112 | ||
@@ -2383,6 +2386,9 @@ int main(int argc, char **argv) | @@ -2383,6 +2386,9 @@ int main(int argc, char **argv) | ||
2383 | case QEMU_OPTION_localtime: | 2386 | case QEMU_OPTION_localtime: |
2384 | rtc_utc = 0; | 2387 | rtc_utc = 0; |
2385 | break; | 2388 | break; |
2389 | + case QEMU_OPTION_cirrusvga: | ||
2390 | + cirrus_vga_enabled = 1; | ||
2391 | + break; | ||
2386 | } | 2392 | } |
2387 | } | 2393 | } |
2388 | } | 2394 | } |
vl.h
@@ -171,6 +171,7 @@ extern int audio_enabled; | @@ -171,6 +171,7 @@ extern int audio_enabled; | ||
171 | extern int ram_size; | 171 | extern int ram_size; |
172 | extern int bios_size; | 172 | extern int bios_size; |
173 | extern int rtc_utc; | 173 | extern int rtc_utc; |
174 | +extern int cirrus_vga_enabled; | ||
174 | 175 | ||
175 | /* XXX: make it dynamic */ | 176 | /* XXX: make it dynamic */ |
176 | #if defined (TARGET_PPC) | 177 | #if defined (TARGET_PPC) |