* [Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom"
@ 2014-12-11 16:18 Maciej W. Rozycki
2014-12-11 19:07 ` Leon Alrae
0 siblings, 1 reply; 4+ messages in thread
From: Maciej W. Rozycki @ 2014-12-11 16:18 UTC (permalink / raw)
To: qemu-devel; +Cc: Leon Alrae, Aurelien Jarno
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 <marcel.a@redhat.com>
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 <marcel.a@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
-- 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;
}
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom"
2014-12-11 16:18 [Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom" Maciej W. Rozycki
@ 2014-12-11 19:07 ` Leon Alrae
2014-12-11 20:41 ` Maciej W. Rozycki
0 siblings, 1 reply; 4+ messages in thread
From: Leon Alrae @ 2014-12-11 19:07 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: qemu-devel, Aurelien Jarno
Hi Maciej,
On 11/12/14 16:18, Maciej W. Rozycki wrote:
> 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'm not able to reproduce your problem. Could you please double check
your QEMU installation? (looks like efi-pcnet.rom is missing for some
reason)
I've just tried the same command on the fresh build of the latest QEMU:
$ install/bin/qemu-system-mips64 -M malta -m 256 -k /dev/null -kernel
images/vmlinux-3.2.0-4-5kc-malta -nographic -monitor null
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.0-4-5kc-malta
(debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) )
#1 Debian 3.2.51-1
...
Regards,
Leon
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom"
2014-12-11 19:07 ` Leon Alrae
@ 2014-12-11 20:41 ` Maciej W. Rozycki
2014-12-12 11:43 ` Gerd Hoffmann
0 siblings, 1 reply; 4+ messages in thread
From: Maciej W. Rozycki @ 2014-12-11 20:41 UTC (permalink / raw)
To: Leon Alrae; +Cc: qemu-devel, Aurelien Jarno
On Thu, 11 Dec 2014, Leon Alrae wrote:
> > 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'm not able to reproduce your problem. Could you please double check
> your QEMU installation? (looks like efi-pcnet.rom is missing for some
> reason)
I see the file in the source tree, but that does not address my concern.
The Malta board does not include any x86 firmware and so requiring one is
IMHO the wrong way to go. The setup should specify the onboard NIC has no
ROM and should not require an image for it. Having to distribute x86
firmware with a MIPS simulator and toolchain makes no sense to me (OK, we
could probably `dd' /dev/zero to substitute a dummy image, but that is
more like a hack to me than a proper solution).
Maciej
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom"
2014-12-11 20:41 ` Maciej W. Rozycki
@ 2014-12-12 11:43 ` Gerd Hoffmann
0 siblings, 0 replies; 4+ messages in thread
From: Gerd Hoffmann @ 2014-12-12 11:43 UTC (permalink / raw)
To: Maciej W. Rozycki; +Cc: Leon Alrae, qemu-devel, Aurelien Jarno
Hi,
> I see the file in the source tree, but that does not address my concern.
> The Malta board does not include any x86 firmware and so requiring one is
> IMHO the wrong way to go. The setup should specify the onboard NIC has no
> ROM and should not require an image for it. Having to distribute x86
> firmware with a MIPS simulator and toolchain makes no sense to me (OK, we
> could probably `dd' /dev/zero to substitute a dummy image, but that is
> more like a hack to me than a proper solution).
You can set the romfile property to the empty string, using compat
properties for the malta board.
cheers,
Gerd
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-12 11:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-11 16:18 [Qemu-devel] MIPS/Malta: pci_add_option_rom: failed to find romfile "efi-pcnet.rom" Maciej W. Rozycki
2014-12-11 19:07 ` Leon Alrae
2014-12-11 20:41 ` Maciej W. Rozycki
2014-12-12 11:43 ` Gerd Hoffmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).