[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/61] pc: split out vga initialization from pc_init
From: |
Isaku Yamahata |
Subject: |
[Qemu-devel] [PATCH 15/61] pc: split out vga initialization from pc_init1() into pc_vga_init(). |
Date: |
Wed, 30 Sep 2009 19:17:51 +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 b987b34..5c461a6 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1287,6 +1287,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,
@@ -1342,24 +1364,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.0.2
- [Qemu-devel] [PATCH 06/61] pc: fix file stream leak in multiboot loader., (continued)
- [Qemu-devel] [PATCH 06/61] pc: fix file stream leak in multiboot loader., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 20/61] pci: fix PCI_DPRINTF() wrt variadic macro., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 19/61] pc_piix: initialize ioapic before use., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 31/61] pci: pcie host and mmcfg support., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 02/61] acpi: split out apm register emulation from acpi.c, Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 26/61] pci: 64bit bar support., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 04/61] acpi: split acpi.c into the common part and the piix4 part., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 28/61] pci: factor out while(bus) bus->next loop logic into pci_find_bus_from()., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 21/61] pci: introduce constant PCI_NUM_PINS for the number of interrupt pins, 4., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 17/61] pc: split out pci device init from pc_init1() into pc_pci_device_init(), Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 15/61] pc: split out vga initialization from pc_init1() into pc_vga_init().,
Isaku Yamahata <=
- [Qemu-devel] [PATCH 09/61] pc: remove a global variable, floppy_controller., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 59/61] ioapic: make irr accept more than 32 pins., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 16/61] pc: split out basic device init from pc_init1() into pc_basic_device_init(), Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 14/61] pc: split out memory allocation from pc_init1() into pc_memory_init(), Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 56/61] ioapic: clean up of #ifdef DEBUG_IOAPIC., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 03/61] acpi: add acpi constants from linux header files and use them., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 49/61] pci hot add: pass opaque argument to callback., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 01/61] acpi: split out pc smbus routines from acpi.c into pc_smbus.c, Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 61/61] pc_q35: apic mode for pci interrupt routing., Isaku Yamahata, 2009/09/30
- [Qemu-devel] [PATCH 11/61] pc: introduce a function to allocate cpu irq., Isaku Yamahata, 2009/09/30