diff options
author | Thomas Huth <thuth@redhat.com> | 2017-06-07 10:20:27 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-06-08 14:38:27 +1000 |
commit | 4871dd4c3f70f528147f426fe42676b4193cb3b7 (patch) | |
tree | b2ad0d5460e70be18581b1fe9bee26a280d47998 /hw | |
parent | a4d4edce7ae23b9136cb9e243d6eab866609315d (diff) | |
download | qemu-4871dd4c3f70f528147f426fe42676b4193cb3b7.zip qemu-4871dd4c3f70f528147f426fe42676b4193cb3b7.tar.gz qemu-4871dd4c3f70f528147f426fe42676b4193cb3b7.tar.bz2 |
hw/ppc/spapr: Adjust firmware name for PCI bridges
SLOF uses "pci" as name for PCI bridges nodes in the device tree instead
of "pci-bridges", so booting via bootindex from a device behind a PCI
bridge currently does not work since QEMU passes the wrong name in the
"qemu,boot-list" property. Fix it by changing the name of the PCI bridge
nodes to "pci" instead.
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1459170
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/spapr.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e340ff3..01dda9e 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2441,6 +2441,12 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p, BusState *bus, return g_strdup_printf("disk@%"PRIX64, (uint64_t)id << 32); } + if (g_str_equal("pci-bridge", qdev_fw_name(dev))) { + /* SLOF uses "pci" instead of "pci-bridge" for PCI bridges */ + PCIDevice *pcidev = CAST(PCIDevice, dev, TYPE_PCI_DEVICE); + return g_strdup_printf("pci@%x", PCI_SLOT(pcidev->devfn)); + } + return NULL; } |