summaryrefslogtreecommitdiff
path: root/hw/pci.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2009-12-18 12:01:08 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2009-12-19 08:26:24 -0600
commit898829d5c731516c96f9e3cc3cdcbe36cd494fd4 (patch)
tree958672018c9da91c5a540bb6d77848fa09737aa9 /hw/pci.h
parentSupport PCI based option rom loading (diff)
downloadqemu-kvm-898829d5c731516c96f9e3cc3cdcbe36cd494fd4.tar.gz
qemu-kvm-898829d5c731516c96f9e3cc3cdcbe36cd494fd4.tar.bz2
qemu-kvm-898829d5c731516c96f9e3cc3cdcbe36cd494fd4.zip
pci romfiles: add property, add default to PCIDeviceInfo
This patch adds a romfile property to the pci bus. It allows to specify a romfile to load into the rom bar of the pci device. The default value comes from a new field in PCIDeviceInfo. The property allows to change the file and also to disable the rom loading using an empty string. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 8c52c8f320b27684ec3b1a649925b75af376b1f7)
Diffstat (limited to 'hw/pci.h')
-rw-r--r--hw/pci.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/pci.h b/hw/pci.h
index d25fe507e..e52e63238 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -244,6 +244,7 @@ struct PCIDevice {
int32_t version_id;
/* Location of option rom */
+ char *romfile;
ram_addr_t rom_offset;
};
@@ -256,8 +257,6 @@ void pci_register_bar(PCIDevice *pci_dev, int region_num,
pcibus_t size, int type,
PCIMapIORegionFunc *map_func);
-int pci_add_option_rom(PCIDevice *pdev, const char *name);
-
int pci_add_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size);
void pci_del_capability(PCIDevice *pci_dev, uint8_t cap_id, uint8_t cap_size);
@@ -385,6 +384,9 @@ typedef struct {
/* pcie stuff */
int is_express; /* is this device pci express? */
+
+ /* rom bar */
+ const char *romfile;
} PCIDeviceInfo;
void pci_qdev_register(PCIDeviceInfo *info);