From: Alex Williamson <[email protected]>

Allow it to be referenced outside of hw/pci.c so we can register
option ROM BARs using the default mapping routine.

Signed-off-by: Alex Williamson <[email protected]>
Acked-by: Chris Wright <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>

diff --git a/hw/pci.c b/hw/pci.c
index 9b1b7a1..e203b9e 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1968,7 +1968,7 @@ static uint8_t pci_find_capability_list(PCIDevice *pdev, 
uint8_t cap_id,
     return next;
 }
 
-static void pci_map_option_rom(PCIDevice *pdev, int region_num, pcibus_t addr, 
pcibus_t size, int type)
+void pci_map_option_rom(PCIDevice *pdev, int region_num, pcibus_t addr, 
pcibus_t size, int type)
 {
     cpu_register_physical_memory(addr, size, pdev->rom_offset);
 }
diff --git a/hw/pci.h b/hw/pci.h
index ed86c57..825ccbe 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -219,6 +219,9 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num,
                             pcibus_t size, int type,
                             PCIMapIORegionFunc *map_func);
 
+void pci_map_option_rom(PCIDevice *pdev, int region_num, pcibus_t addr,
+                        pcibus_t size, int type);
+
 int pci_enable_capability_support(PCIDevice *pci_dev,
                                   uint32_t config_start,
                                   PCICapConfigReadFunc *config_read,
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to