[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V11 15/27] pc: split out vga initialization from pc_
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V11 15/27] pc: split out vga initialization from pc_init1() into pc_vga_init(). |
Date: |
Tue, 5 Jan 2010 15:27:38 +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 e5bd712..386f730 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1120,6 +1120,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,
@@ -1178,24 +1200,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);
--
1.6.5.4
- [Qemu-devel] [PATCH V11 17/27] pc: split out pci device init from pc_init1() into pc_pci_device_init(), (continued)
- [Qemu-devel] [PATCH V11 17/27] pc: split out pci device init from pc_init1() into pc_pci_device_init(), Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 08/27] pc: make an unnecessary global variable, pit, local., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 04/27] acpi: split acpi.c into the common part and the piix4 part., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 18/27] pc: split out piix specific part from pc.c into pc_piix.c, Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 16/27] pc: split out basic device init from pc_init1() into pc_basic_device_init(), Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 05/27] acpi_piix4: remove unused variable in get_pmsts()., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 23/27] pci hotadd, acpi_piix4: remove global variables., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 07/27] pc, i440fx: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 10/27] pc: remove global variable rtc_state by using qemu_irq., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 20/27] rtc: make rtc_xxx accept/return ISADevice instead of RTCState., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 15/27] pc: split out vga initialization from pc_init1() into pc_vga_init().,
Isaku Yamahata <=
- [Qemu-devel] [PATCH V11 12/27] pc: make pc_init1() not refer ferr_irq directly., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 14/27] pc: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 03/27] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 02/27] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 06/27] pc: initialize ioapic before use., Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 01/27] acpi: split out pc smbus routines from acpi.c into pc_smbus.c, Isaku Yamahata, 2010/01/05
- [Qemu-devel] [PATCH V11 22/27] pci hotplug: add argument to pci hot plug callback., Isaku Yamahata, 2010/01/05