aboutsummaryrefslogtreecommitdiff
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-18 11:26:34 -0600
commit8c52c8f320b27684ec3b1a649925b75af376b1f7 (patch)
tree3319fe6f7e835d0a718000ae04be89f380d72406 /hw/pci.h
parentc2039bd0ffce8807e0eaac55254fde790825fa92 (diff)
downloadqemu-8c52c8f320b27684ec3b1a649925b75af376b1f7.zip
qemu-8c52c8f320b27684ec3b1a649925b75af376b1f7.tar.gz
qemu-8c52c8f320b27684ec3b1a649925b75af376b1f7.tar.bz2
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>
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 d25fe50..e52e632 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);