mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
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>
This commit is contained in:
parent
c2039bd0ff
commit
8c52c8f320
6 changed files with 29 additions and 32 deletions
|
@ -1121,14 +1121,6 @@ static int pci_e1000_init(PCIDevice *pci_dev)
|
|||
d->dev.qdev.info->name, d->dev.qdev.id, d);
|
||||
|
||||
qemu_format_nic_info_str(&d->nic->nc, macaddr);
|
||||
|
||||
if (!pci_dev->qdev.hotplugged) {
|
||||
static int loaded = 0;
|
||||
if (!loaded) {
|
||||
pci_add_option_rom(&d->dev, "pxe-e1000.bin");
|
||||
loaded = 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1146,6 +1138,7 @@ static PCIDeviceInfo e1000_info = {
|
|||
.qdev.vmsd = &vmstate_e1000,
|
||||
.init = pci_e1000_init,
|
||||
.exit = pci_e1000_uninit,
|
||||
.romfile = "pxe-e1000.bin",
|
||||
.qdev.props = (Property[]) {
|
||||
DEFINE_NIC_PROPERTIES(E1000State, conf),
|
||||
DEFINE_PROP_END_OF_LIST(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue