[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V9 15/20] pc: split out vga initialization from pc_i
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V9 15/20] pc: split out vga initialization from pc_init1() into pc_vga_init(). |
Date: |
Tue, 8 Dec 2009 17:33:34 +0900 |
Split out vga initialization which is independent of piix
from pc_init1() as pc_vga_init().
Later it will be used.
Signed-off-by: Isaku Yamahata <address@hidden>
---
hw/pc.c | 41 +++++++++++++++++++++++------------------
1 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index b741770..34a2337 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1109,6 +1109,28 @@ static void pc_memory_init(ram_addr_t ram_size,
}
}
+static void pc_vga_init(PCIBus *pci_bus)
+{
+ if (cirrus_vga_enabled) {
+ if (pci_bus) {
+ pci_cirrus_vga_init(pci_bus);
+ } else {
+ isa_cirrus_vga_init();
+ }
+ } else if (vmsvga_enabled) {
+ if (pci_bus)
+ pci_vmsvga_init(pci_bus);
+ else
+ fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
+ } else if (std_vga_enabled) {
+ if (pci_bus) {
+ pci_vga_init(pci_bus, 0, 0);
+ } else {
+ isa_vga_init();
+ }
+ }
+}
+
/* PC hardware initialisation */
static void pc_init1(ram_addr_t ram_size,
const char *boot_device,
@@ -1166,24 +1188,7 @@ static void pc_init1(ram_addr_t ram_size,
register_ioport_write(0xf0, 1, 1, ioportF0_write, NULL);
- if (cirrus_vga_enabled) {
- if (pci_enabled) {
- pci_cirrus_vga_init(pci_bus);
- } else {
- isa_cirrus_vga_init();
- }
- } else if (vmsvga_enabled) {
- if (pci_enabled)
- pci_vmsvga_init(pci_bus);
- else
- fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
- } else if (std_vga_enabled) {
- if (pci_enabled) {
- pci_vga_init(pci_bus, 0, 0);
- } else {
- isa_vga_init();
- }
- }
+ pc_vga_init(pci_enabled? pci_bus: NULL);
rtc_state = rtc_init(2000);
cmos_set_s3_resume_init(rtc_state);
--
1.6.5.4
- [Qemu-devel] [PATCH V9 00/20] split out piix specific part from pc emulator, Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 17/20] pc: split out pci device init from pc_init1() into pc_pci_device_init(), Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 12/20] pc: make pc_init1() not refer ferr_irq directly., Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 03/20] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 15/20] pc: split out vga initialization from pc_init1() into pc_vga_init().,
Isaku Yamahata <=
- [Qemu-devel] [PATCH V9 10/20] pc: Remove reference to a global variable, RTCState *rtc_state., Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 07/20] pc, i440fx: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 19/20] pc: move rtc declarations from pc.h into a dedicated header file., Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 02/20] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 08/20] pc: make an unnecessary global variable, pit, local., Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 18/20] pc: split out piix specific part from pc.c into pc_piix.c, Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 09/20] pc: remove a global variable, floppy_controller., Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 11/20] pc: introduce a function to allocate cpu irq., Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 14/20] pc: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2009/12/08
- [Qemu-devel] [PATCH V9 06/20] pc: initialize ioapic before use., Isaku Yamahata, 2009/12/08