[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH V10 15/27] pc: split out vga initialization from pc_
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH V10 15/27] pc: split out vga initialization from pc_init1() into pc_vga_init(). |
Date: |
Thu, 24 Dec 2009 17:09:08 +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 32e27dd..3774e0e 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1111,6 +1111,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,
@@ -1169,24 +1191,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 V10 00/27] split out piix specific part from pc emulator and some clean ups, Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 12/27] pc: make pc_init1() not refer ferr_irq directly., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 17/27] pc: split out pci device init from pc_init1() into pc_pci_device_init(), Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 19/27] pc: move rtc declarations from pc.h into a dedicated header file., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 27/27] mc146818rtc: remove #ifdef DEBUG_CMOS., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 21/27] acpi_piix4: qdevfy., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 04/27] acpi: split acpi.c into the common part and the piix4 part., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 22/27] pci hotplug: add argument to pci hot plug callback., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 09/27] pc: remove a global variable, floppy_controller., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 20/27] rtc: make rtc_xxx accept/return ISADevice instead of RTCState., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 15/27] pc: split out vga initialization from pc_init1() into pc_vga_init().,
Isaku Yamahata <=
- [Qemu-devel] [PATCH V10 11/27] pc: introduce a function to allocate cpu irq., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 23/27] pci hotadd, acpi_piix4: remove global variables., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 01/27] acpi: split out pc smbus routines from acpi.c into pc_smbus.c, Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 08/27] pc: make an unnecessary global variable, pit, local., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 25/27] acpi_piix4: remove #ifdef DEBUG., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 13/27] pc: split out cpu initialization from pc_init1() into pc_cpus_init()., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 24/27] pc_smbus: remove #ifdef DEBUG., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 26/27] pc_apm: remove #ifdef DEBUG., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 07/27] pc, i440fx: Make smm enable/disable function i440fx independent., Isaku Yamahata, 2009/12/24
- [Qemu-devel] [PATCH V10 02/27] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2009/12/24