qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Strange behaviour in network device initialization.


From: Marc Bommert
Subject: Re: [Qemu-devel] Strange behaviour in network device initialization.
Date: Sun, 19 Mar 2017 14:41:01 +0100 (CET)

> Peter Maydell <address@hidden> hat am 18. März 2017 um 23:22 geschrieben:
> 
> This is expected, because you're creating two devices.
> Device 1 is the one that's created by calling
> mydevice_init() here in the board code.
> Device 2 is created because you say "-device mydevice"
> on the command line.

I see. Already played around with omitting it, but I also have sporadic 
connectivity issues with the tap device, so I thought I would need it to link 
the device with the NIC on the command line. Oops.
 
> The slightly odd thing is that -device mydevice
> doesn't fail for you -- if you try that for smc91c111 it
> will complain:
>  "Device smc91c111 cannot be dynamically instantiated"
> to let you know that the command line option is wrong.

I suppose this is the output of add_fdt_node() in hw/arm/sysbus-fdt.c, so I'll 
try to reverse why that succeeds for my platform. That's a good pointer.

> PS: smc91c111 is not a very good model to copy,
> because that device code is very old, and doesn't
> necessarily follow current QEMU coding practices.
> Looking at a device that's been added to QEMU
> more recently may be a better idea.

I'll stick with it for prototyping. Probably I picked versatilepb as a 
blueprint because it is better understandable and complete, with lesser 
indirections.

Still, so many opportunities to make errors when you work your way into this 
stuff.
Thank you for your time, Peter.

- Marc



reply via email to

[Prev in Thread] Current Thread [Next in Thread]