qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 12/14] Add a PCI BAR for the VGA ROM which is mapped


From: Zachary Amsden
Subject: [Qemu-devel] [PATCH 12/14] Add a PCI BAR for the VGA ROM which is mapped into cirrus_vga. This makes the cirrus device complete under some X servers which require the V_BIOS mapping.
Date: Thu, 30 Jul 2009 00:15:10 -1000

Signed-off-by: Zachary Amsden <address@hidden>
---
 hw/cirrus_vga.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index 9623820..d7874f0 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -3288,6 +3288,12 @@ static void cirrus_pci_mmio_map(PCIDevice *d, int 
region_num,
                                 s->cirrus_mmio_io_addr);
 }
 
+static void cirrus_pci_rom_map(PCIDevice *d, int region_num,
+                               uint32_t addr, uint32_t size, int type)
+{
+    cpu_register_physical_memory(addr, 0x10000, 0xc0000 | IO_MEM_ROM);
+}
+
 static void pci_cirrus_write_config(PCIDevice *d,
                                     uint32_t address, uint32_t val, int len)
 {
@@ -3341,5 +3347,6 @@ void pci_cirrus_vga_init(PCIBus *bus)
         pci_register_bar((PCIDevice *)d, 1, CIRRUS_PNPMMIO_SIZE,
                                PCI_ADDRESS_SPACE_MEM, cirrus_pci_mmio_map);
     }
-    /* XXX: ROM BIOS */
+    pci_register_bar((PCIDevice *)d, PCI_ROM_SLOT, 0x10000,
+                               PCI_ADDRESS_SPACE_MEM, cirrus_pci_rom_map);
 }
-- 
1.6.2.5





reply via email to

[Prev in Thread] Current Thread [Next in Thread]