[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 33/35] target-alpha: Properly select the VGA control
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 33/35] target-alpha: Properly select the VGA controler to use. |
Date: |
Mon, 9 May 2011 14:34:47 -0700 |
The existing code for this really shouldn't be in pc.c.
Signed-off-by: Richard Henderson <address@hidden>
---
hw/alpha_dp264.c | 2 +-
hw/alpha_pci.c | 33 ++++++++++++++++++++++++++++++++-
hw/alpha_sys.h | 2 ++
3 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c
index c061b0a..dea0ef6 100644
--- a/hw/alpha_dp264.c
+++ b/hw/alpha_dp264.c
@@ -83,7 +83,7 @@ static void clipper_init(ram_addr_t ram_size,
pit_init(0x40, 0);
/* VGA setup. Don't bother loading the bios. */
- pci_vga_init(pci_bus);
+ alpha_pci_vga_setup(pci_bus);
/* Serial code setup. */
for (i = 0; i < MAX_SERIAL_PORTS; ++i) {
diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c
index d0d727c..b321772 100644
--- a/hw/alpha_pci.c
+++ b/hw/alpha_pci.c
@@ -1,8 +1,15 @@
-/* There's nothing in here that's Alpha specific, really. */
+/*
+ * QEMU Alpha PCI support functions.
+ *
+ * Some of this isn't very Alpha specific at all. Some of this is specific
+ * to sparse PCI access support for older Alpha systems.
+ */
#include "config.h"
#include "alpha_sys.h"
#include "qemu-log.h"
+#include "sysemu.h"
+#include "vmware_vga.h"
/* PCI IO reads, to byte-word addressable memory. */
@@ -325,3 +332,27 @@ CPUWriteMemoryFunc * const alpha_pci_special_writes[] = {
unassigned_mem_writew,
special_writel,
};
+
+void alpha_pci_vga_setup(PCIBus *pci_bus)
+{
+ switch (vga_interface_type) {
+#ifdef CONFIG_SPICE
+ case VGA_QXL:
+ pci_create_simple(pci_bus, -1, "qxl-vga");
+ return;
+#endif
+ case VGA_CIRRUS:
+ pci_cirrus_vga_init(pci_bus);
+ return;
+ case VGA_VMWARE:
+ if (pci_vmsvga_init(pci_bus)) {
+ return;
+ }
+ break;
+ }
+ /* If VGA is enabled at all, and one of the above didn't work, then
+ fallback to Standard VGA. */
+ if (vga_interface_type != VGA_NONE) {
+ pci_vga_init(pci_bus);
+ }
+}
diff --git a/hw/alpha_sys.h b/hw/alpha_sys.h
index 272a107..98e5351 100644
--- a/hw/alpha_sys.h
+++ b/hw/alpha_sys.h
@@ -39,4 +39,6 @@ extern void alpha_sparse_mem_write(PCIBus *,
target_phys_addr_t, uint32_t);
extern uint32_t alpha_sparse_conf1_read(PCIBus *, target_phys_addr_t);
extern void alpha_sparse_conf1_write(PCIBus *, target_phys_addr_t, uint32_t);
+void alpha_pci_vga_setup(PCIBus *pci_bus);
+
#endif
--
1.7.4.4
- [Qemu-devel] [PATCH 20/35] target-alpha: Disable interrupts properly., (continued)
- [Qemu-devel] [PATCH 20/35] target-alpha: Disable interrupts properly., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 21/35] target-alpha: Implement more CALL_PAL values inline., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 19/35] target-alpha: All ISA checks to use TB->FLAGS., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 22/35] target-alpha: Implement cpu_alpha_handle_mmu_fault for system mode., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 23/35] target-alpha: Remap PIO space for 43-bit KSEG for EV6., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 24/35] target-alpha: Trap for unassigned and unaligned addresses., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 25/35] target-alpha: Include the PCC_OFS in the RPCC return value., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 26/35] target-alpha: Use a fixed frequency for the RPCC in system mode., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 27/35] target-alpha: Implement TLB flush primitives., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 30/35] target-alpha: Implement WAIT IPR., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 33/35] target-alpha: Properly select the VGA controler to use.,
Richard Henderson <=
- [Qemu-devel] [PATCH 29/35] target-alpha: Add CLIPPER emulation., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 34/35] target-alpha: Enable PCI IDE, Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 35/35] target-alpha: Add ps2 keyboard., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 31/35] target-alpha: Implement HALT IPR., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 32/35] target-alpha: Add high-resolution access to wall clock and an alarm., Richard Henderson, 2011/05/09
- [Qemu-devel] [PATCH 28/35] target-alpha: Add custom PALcode image for CLIPPER emulation., Richard Henderson, 2011/05/09
- Re: [Qemu-devel] [PATCH 00/35] Alpha system emulation, v4, Paul Brook, 2011/05/10