summaryrefslogtreecommitdiff
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/rtl8139.c
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/rtl8139.c')
-rw-r--r--hw/rtl8139.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c
index 2cee97bb7..fcdcd1d55 100644
--- a/hw/rtl8139.c
+++ b/hw/rtl8139.c
@@ -3353,14 +3353,6 @@ static int pci_rtl8139_init(PCIDevice *dev)
qemu_mod_timer(s->timer,
rtl8139_get_next_tctr_time(s,qemu_get_clock(vm_clock)));
#endif /* RTL8139_ONBOARD_TIMER */
-
- if (!dev->qdev.hotplugged) {
- static int loaded = 0;
- if (!loaded) {
- pci_add_option_rom(&s->dev, "pxe-rtl8139.bin");
- loaded = 1;
- }
- }
return 0;
}
@@ -3371,6 +3363,7 @@ static PCIDeviceInfo rtl8139_info = {
.qdev.vmsd = &vmstate_rtl8139,
.init = pci_rtl8139_init,
.exit = pci_rtl8139_uninit,
+ .romfile = "pxe-rtl8139.bin",
.qdev.props = (Property[]) {
DEFINE_NIC_PROPERTIES(RTL8139State, conf),
DEFINE_PROP_END_OF_LIST(),