@@ -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) {
@@ -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);
+ }
+}
@@ -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
The existing code for this really shouldn't be in pc.c. Signed-off-by: Richard Henderson <rth@twiddle.net> --- hw/alpha_dp264.c | 2 +- hw/alpha_pci.c | 33 ++++++++++++++++++++++++++++++++- hw/alpha_sys.h | 2 ++ 3 files changed, 35 insertions(+), 2 deletions(-)