diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-12-18 12:01:08 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-18 11:26:34 -0600 |
commit | 8c52c8f320b27684ec3b1a649925b75af376b1f7 (patch) | |
tree | 3319fe6f7e835d0a718000ae04be89f380d72406 /hw/pci.h | |
parent | c2039bd0ffce8807e0eaac55254fde790825fa92 (diff) |
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.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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); |