[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 07/17] isa: add a isa_vga_init() function
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [PATCH v3 07/17] isa: add a isa_vga_init() function |
Date: |
Tue, 11 Sep 2012 21:10:32 +0200 |
This function create a ISA VGA device according to the value of
vga_interface_type. It returns a ISADevice (and not a DeviceState).
Signed-off-by: Aurelien Jarno <address@hidden>
---
hw/isa-bus.c | 20 ++++++++++++++++++++
hw/isa.h | 2 ++
2 files changed, 22 insertions(+)
diff --git a/hw/isa-bus.c b/hw/isa-bus.c
index f9b2373..00de20a 100644
--- a/hw/isa-bus.c
+++ b/hw/isa-bus.c
@@ -19,6 +19,7 @@
#include "hw.h"
#include "monitor.h"
#include "sysbus.h"
+#include "sysemu.h"
#include "isa.h"
#include "exec-memory.h"
@@ -166,6 +167,25 @@ ISADevice *isa_create_simple(ISABus *bus, const char *name)
return dev;
}
+ISADevice *isa_vga_init(ISABus *bus)
+{
+ switch (vga_interface_type) {
+ case VGA_CIRRUS:
+ return isa_create_simple(bus, "isa-cirrus-vga");
+ case VGA_QXL:
+ fprintf(stderr, "%s: qxl: no PCI bus\n", __func__);
+ return NULL;
+ case VGA_STD:
+ return isa_create_simple(bus, "isa-vga");
+ case VGA_VMWARE:
+ fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __func__);
+ return NULL;
+ case VGA_NONE:
+ default:
+ return NULL;
+ }
+}
+
static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent)
{
ISADevice *d = ISA_DEVICE(dev);
diff --git a/hw/isa.h b/hw/isa.h
index dc97052..8fb498a 100644
--- a/hw/isa.h
+++ b/hw/isa.h
@@ -47,6 +47,8 @@ ISADevice *isa_create(ISABus *bus, const char *name);
ISADevice *isa_try_create(ISABus *bus, const char *name);
ISADevice *isa_create_simple(ISABus *bus, const char *name);
+ISADevice *isa_vga_init(ISABus *bus);
+
/**
* isa_register_ioport: Install an I/O port region on the ISA bus.
*
--
1.7.10.4
- [Qemu-devel] [PATCH v3 10/17] ppc/newworld: use the new pci_vga_init() function, (continued)
- [Qemu-devel] [PATCH v3 10/17] ppc/newworld: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 09/17] alpha: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 08/17] mips/malta: use the new pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 17/17] vga: cleanup after isa_vga_init() and pci_vga_init() conversion, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 01/17] vga: rename pci_vga_init() into pci_std_vga_init(), Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 03/17] vl.c: convert *vga_enabled functions to QOM, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 06/17] pci: add a pci_vga_init() function, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 05/17] vl.c: default to std if cirrus is not available, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 04/17] vl.c: check for qxl availability, Aurelien Jarno, 2012/09/11
- [Qemu-devel] [PATCH v3 07/17] isa: add a isa_vga_init() function,
Aurelien Jarno <=