openbios / openbios

First published Open Source implementation of OpenFirmware
http://www.openbios.org/
GNU General Public License v2.0
354 stars 77 forks source link

qemuppc: Cannot manage 'undefined' PCI device type '<NULL>' #2

Open jackiehjm opened 7 years ago

jackiehjm commented 7 years ago

There is an annoying error message when run qemuppc with option "-device virtio-rng-pci":

>> Cannot manage 'undefined' PCI device type '<NULL>':
>>  1af4 1005 (0 ff 0)

We found this in yocto project and the detail logs:

$ runqemu qemuppc core-image-minimal nographic slirp
runqemu - INFO - Running MACHINE=qemuppc bitbake -e...
runqemu - INFO - Continuing with the following parameters:

KERNEL: [tmp/deploy/images/qemuppc/vmlinux]
MACHINE: [qemuppc]
FSTYPE: [ext4]
ROOTFS: [tmp/deploy/images/qemuppc/core-image-minimal-qemuppc.ext4]
CONFFILE: [/myproject/tmp/deploy/images/qemuppc/core-image-minimal-qemuppc.qemuboot.conf]

runqemu - INFO - Port forward: hostfwd=tcp::2222-:22 hostfwd=tcp::2323-:23
runqemu - INFO - Running tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin//qemu-system-ppc -device virtio-net-pci,netdev=net0,mac=52:54:00:12:35:02 -netdev user,id=net0,hostfwd=tcp::2222-:22,hostfwd=tcp::2323-:23,tftp=tmp/deploy/images/qemuppc -drive file=tmp/deploy/images/qemuppc/core-image-minimal-qemuppc.ext4,if=virtio,format=raw -show-cursor -usb -device usb-tablet -device virtio-rng-pci  -nographic -machine mac99 -cpu G4 -m 256 -serial mon:stdio -serial null -kernel tmp/deploy/images/qemuppc/vmlinux -append 'root=/dev/vda rw highres=off  console=ttyS0 mem=256M ip=dhcp console=tty console=ttyS0 '

C>> annot manage 'undefined' PCI device type '<NULL>':
>>  1af4 1005 (0 ff 0)

>> =============================================================
>> OpenBIOS 1.1 [Jul 13 2017 18:28]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 1
>> Memory: 256M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,G4
milliseconds isn't unique.
Welcome to OpenBIOS v1.1 built on Jul 13 2017 18:28
>> [ppc] Kernel already loaded (0x01000000 + 0x00c1368c) (initrd 0x00000000 + 0x00000000)
>> [ppc] Kernel command line: root=/dev/vda rw highres=off  console=ttyS0 mem=256M ip=dhcp console=tty console=ttyS0
----snip----

It was reported in Yocto but is suggested to be reported in openbios: https://bugzilla.yoctoproject.org/show_bug.cgi?id=12209

Comments from yocto:

Saul Wold 2017-10-17 22:35:29 UTC

After messing around with qemu source and enabling qemu tracing, I am convinced that the problem > here is the openbios when it enumerates the PCI devices, it does find the VIRTIO_RNG device in it's tables.

Currently, the openbios code is not rebuilt, we purely use the upstream binary from the qemu tarball. > An entry would be needed in the pci_database.c code in the rom/openbios code for the Virtio_rng.

I did verify via the tracing, that while the openbios does not know how to handle the virtio-rng PCI > entry, the kernel correctly identifies it and I see correct tracing output when the device is accessed.

I would suggest you report it upstream and then close this bug as reported upstream.

mcayland commented 7 years ago

Looking at this issue, I agree that the analysis from yocto is correct.

The message itself is just a warning that the device can't be found in OpenBIOS's PCI database but it will still generate the device with appropriate vendor/device properties which is enough for OSs to still detect and use the device.

If you can find out what the name in the device tree should be then I can easily add it to the PCI database. Given that the device isn't preset on any Sun hardware then I'm happy to accept the name as used in the FDT representation to keep things consistent.

InfoLibre commented 4 years ago

Hello,

I've got a similar error when startting Debian 10 fo PowerPC with this command :

/usr/bin/qemu-system-ppc -monitor stdio -M mac99 -k fr -machine accel=tcg -m 512 -cdrom /home/david/Bureau/debian-10.0.0-powerpc-NETINST-1.iso -hda /home/david/Documents/Informatique et téléphone/Documentation informatique/Macintosh/Debian_10_LXDE -virtfs local,id=shared_folder_dev_0,path=/home/david/Bureau,security_model=none,mount_tag=shared0 -boot order=dc,menu=on -net nic,macaddr=00:a2:6d:80:10:8f,model=rtl8139 -net user -net user,smb=/home/david/Bureau -rtc base=localtime -name "Debian + LXDE sur iMac G3" -M mac99

C>> annot manage 'undefined' PCI device type '<NULL>':
>>  1af4 1009 (0 2 0)

I found this : https://devicehunt.com/view/type/pci/vendor/1AF4/device/1009 How could I help ?