Thanks Stefan for your kind response. I am OK with C programming and wrote couple of LKM related to FPGA device.
But my understanding of QEMU is very limited. Let me ask some specific question on what I wanted to do. I am looking forward to emulate single-chip Ethernet controller. I can find some of its source code online and it has two main part Ethernet PHY (any 1GB SGMII compatible) and Ethernet MAC . So ,DO I need to simply put the corresponding source files of PHY and MAC in hw/net directory of QEMU? Also ,do I need to take care of underlying Ethernet controller(of my machine where I am trying to do this) from Broadcom in any way? Thanks Rajan On Wed, Jan 15, 2014 at 10:29 PM, Stefan Hajnoczi <stefa...@gmail.com>wrote: > On Wed, Jan 15, 2014 at 01:27:41PM +0530, rajan pathak wrote: > > I am new QEMU development and wanted to Simulate Atheros Network > controller. > > > > > > I am Running QEMU on x86 machine with underlaying network controller from > > Broadcom and > > compiled linux kernel based on ARM having Atheros driver support. > > > > I guess there must be mapping at QEMU level calls for Atheros driver maps > > to Broadcom. > > Have no idea where to start looking in to QEMU code and what files to > look > > into. > > > > Can anyone let me know how in general mapping mapping between two > different > > network vendors takes plave at QEMU level. > > QEMU emulates hardware (network cards, graphics cards, sound cards, > etc). What you are asking about is adding a new emulated device for an > Atheros NIC. > > Usually that involves reviewing the datasheet from the hardware vendor > to understand the programming interface that the hardware provides (e.g. > hardware registers accessible over PCI). > > In some cases no datasheet is available so you have to look at existing > open source drivers to understand how the device is supposed to behave. > > Then you can implement the device in QEMU. See the hw/net/ directory. > > If you're not already familiar with device drivers/device emulation and > C programming then this can be a big undertaking. The main requirement > is to understand how the hardware is supposed to behave, it can be very > difficult if the vendor does not provide a datasheet. > > Perhaps you can modify your guest to use one of the NICs that QEMU > already has support for (rtl8139, e1000, virtio-net, etc)? > > Stefan >