From 8c52c8f320b27684ec3b1a649925b75af376b1f7 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 18 Dec 2009 12:01:08 +0100 Subject: 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 Signed-off-by: Anthony Liguori --- hw/pci.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hw/pci.h') 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); -- cgit v1.1