[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi
From: |
Maciej W. Rozycki |
Subject: |
[Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom" |
Date: |
Thu, 11 Dec 2014 16:18:58 +0000 |
User-agent: |
Alpine 1.10 (DEB 962 2008-03-14) |
Hi,
The current trunk QEMU fails to run in the system emulation mode for
the MIPS/Malta (mips64-softmmu) target. It fails right away:
$ qemu-system -M malta -m 256 -k /dev/null -kernel vmlinux-3.2.0-4-4kc-malta
-nographic -monitor null
qemu-system: pci_add_option_rom: failed to find romfile "efi-pcnet.rom"
qemu-system: Device initialization failed.
$
I have tracked down the immediate cause of the failure to be this
change:
commit 178e785fb4507ec3462dc772bbe08303416ece47
Author: Marcel Apfelbaum <address@hidden>
Date: Mon Oct 27 19:34:41 2014 +0200
hw/pci: fixed error flow in pci_qdev_init
Verify return code for pci_add_option_rom.
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
-- previously these issues were reported:
qemu-system: pci_add_option_rom: failed to find romfile "efi-pcnet.rom"
qemu-system: pci_add_option_rom: failed to find romfile "vgabios-cirrus.bin"
but the emulator continued successfully. So this is a regression, quite
a fatal one IMO as the emulator simply does not work at all anymore for
this platform.
Now I think there are two issues here:
1. The AMD Am79C973 aka PCNet NIC is a Malta onboard device, the chip is
soldered on to the motherboard and there is no ROM attached to it nor
a way to attach one. So the emulator shouldn't be asking for one in
the first place, not at least by default. The board has 4 PCI
connectors so if configured for additional NICs plugged in there QEMU
might assume they have an option ROM present each. However...
2. The Malta is a development system built around MIPS processors, one
or more can be present on a daughter card (aka core card). The
notion of EFI is therefore inexistent for the platform and therefore I
think anything that has to do with EFI should simply be globally
disabled. The platform uses YAMON (Yet Another MONitor) as its
firmware and it does not interpret option ROMs, so supplying one make
no sense (there's a copyright issue here involved too, I believe, you
can't just dump an image of random firmware and use it for a different
purpose).
Regrettably I won't be able to look into this issue anytime soon and I
have been simply using the change below to revert the offending commit and
make the platform work at all. I am writing this as a heads-up, perhaps
you can sort it out somehow while I am busy with other stuff. Perhaps the
original commit should be reverted upstream too, until a more flexible
solution has been found.
Maciej
qemu-pci-option-rom-revert.diff
Index: qemu-git-trunk/hw/pci/pci.c
===================================================================
--- qemu-git-trunk.orig/hw/pci/pci.c 2014-11-08 17:40:22.000000000 +0000
+++ qemu-git-trunk/hw/pci/pci.c 2014-11-08 18:59:49.857674259 +0000
@@ -1776,12 +1776,7 @@ static int pci_qdev_init(DeviceState *qd
pci_dev->romfile = g_strdup(pc->romfile);
is_default_rom = true;
}
-
- rc = pci_add_option_rom(pci_dev, is_default_rom);
- if (rc != 0) {
- pci_unregister_device(DEVICE(pci_dev));
- return rc;
- }
+ pci_add_option_rom(pci_dev, is_default_rom);
return 0;
}
- [Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom",
Maciej W. Rozycki <=