qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Support for Emulated SMSC 911X


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] Support for Emulated SMSC 911X
Date: Tue, 28 Jan 2014 11:18:54 +1000

On Tue, Jan 28, 2014 at 7:40 AM, Peter Maydell <address@hidden> wrote:
> On 27 January 2014 21:05, Romanic Dean <address@hidden> wrote:
>> Just a small a query here,Can we call different Ethernet Controllers like
>> Broadcom or e1000  from VersatilePB board.
>>
>> Is VersatilePB board only supports SMSC series of controllers?
>
> You need to distinguish:
>  * what does the real hardware do?
>  * what can you get QEMU to do?
>  * what can your guest OS do?
>
> The answer to all of these is different.
> (1) Real hardware versatilepb has  the smsc91x, that's what's
> physically present on the board. There is also a PCI controller,
> so you can use a PCI ethernet card.
>
> Knowing what real hardware does is important because
> (a) it's what guest OSes expect
> (b) we generally don't accept changes into QEMU which
> don't correspond to what the hardware does
>
> (2) QEMU has models of a number of PCI ethernet cards,
> which you can use just by saying '-device e1000' or whatever
> on the QEMU command line; this will automatically plug the
> modelled ethernet card into the modelled PCI bus.
>
> QEMU also has models of some memory-mapped ethernet
> controllers (like the 9118 and 91x); you can edit the board
> model source to put those anywhere in the memory map you
> like, and wire them up to interrupts as you see fit. (I don't
> know why you would want to do this, but it is technically
> possible.)
>

Driver development without having to do any baseboard emulation.
Kernel simply boots what its told to via dts so bolting your new
ethernet to someone elses SoC gets you started. An advantage of
virtual machines is you can create non-existant hardware (quite
purposefully) and if that aids in software development that's worth
something. Upstream acceptability is however a different story - we
can't accept these non-existant board models. As for an orphaned
device model (waiting on its machine model to be emulated) its at
least worth posting to the list so someone can take it at a later
date.

We had a similar query over the weekend, check this thread as well for
more information:

https://lists.gnu.org/archive/html/qemu-devel/2014-01/msg03347.html

Regards,
Peter

> For ethernet controllers which QEMU has no model of, you
> can't do anything without writing a model of the device first.
>
> (3) Guest OSes will typically only support the devices the
> real hardware has, because that's all they are written to
> assume. (There is no way to probe for the presence of these
> memory mapped devices; the guest must just know they
> might exist at specific addresses.) Depending on the OS,
> you might be able to modify it or its configuration to make
> it work with a different memory map of devices on the board.
>
> thanks
> -- PMM
>



reply via email to

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