* Re: [Qemu-devel] [patch] More PCI ethernet emulations
[not found] <23179021.1174880111656.JavaMail.root@eastrmwml08.mgt.cox.net>
@ 2007-03-26 20:33 ` Stefan Weil
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Weil @ 2007-03-26 20:33 UTC (permalink / raw)
To: QEMU Developers
[-- Attachment #1: Type: text/plain, Size: 2811 bytes --]
Hi,
File eepro100.tar.bz2 (added to this mail) contains everything
needed to add 3 new PCI network device (all similar to EEPRO100):
eepro100.patch:
Makefile.target:
added two binaries needed for EEPRO100
split entries for PCI network devices (1 line / entry, better
merging with CVS)
vl.h:
added prototypes for EEPRO100
hw/pci.c:
added new PCI network models: i82551, i82557b, i82559er
hw/eepro100.c:
EEPRO100 PCI network emulation
hw/eeprom93xx.c, hw/eeprom93xx.h:
EEPROM emulation, needed for EEPRO100 (and others)
I just finished running these tests using a PC host running Debian GNU
Linux:
* compilation for all QEMU target architectures: ok
* cross compilation (Windows) for all QEMU target architectures: ok
* functional test: ok
The last test was started like this:
i386-softmmu/qemu -L pc-bios --net nic,model=i82559er --net tap /dev/hda
--snapshot
Networking was tested using ping and ssh connection from emulated system
to host.
I did not apply your patch, because I cannot test it (it needs a system with
different endianess). Your feedback is welcome
Stefan
Ben Taylor wrote:
> ---- Stefan Weil <berlios@weilnetz.de> wrote:
>> Hello,
>>
>> these new ethernet drivers for QEMU are now available:
>>
>> Intel 8255x ("E100", "EEPRO100"):
>> http://svn.berlios.de/wsvn/ar7-firmware/qemu/trunk/hw/eepro100.c?op=file
>
> Having been through this with the rlt8139.c driver,
>
> I can expect that the area around:
>
> static void nic_selective_reset(EEPRO100State * s)
> {
> size_t i;
> uint16_t *eeprom_contents = eeprom93xx_data(s->eeprom);
> //~ eeprom93xx_reset(s->eeprom);
> memcpy(eeprom_contents, s->macaddr, 6);
>
> will need to change the memcpy to something like:
>
> s->macaddr[0] = eeprom_contents[0] || eeprom_contents[1]<<8;
> s->macaddr[2] = eeprom_contents[2] || eeprom_contents[3]<<8;
> s->macaddr[4] = eeprom_contents[4] || eeprom_contents[5]<<8;
>
> I'll try to give it whack tommorow. Do you have some glue on the
> Makefile.target?
>
> Ben
>
>
> Both drivers use a new EEPROM driver:
> http://svn.berlios.de/wsvn/ar7-firmware/qemu/trunk/hw/eeprom93xx.c?op=file
> http://svn.berlios.de/wsvn/ar7-firmware/qemu/trunk/hw/eeprom93xx.h?op=file
>
> This EEPROM driver can be shared by any other device which needs
> an EEPROM, for example replace the driver for RTL8139 or add an
> EEPROM to cirrus vga or other ethernet cards.
>
> I estimate the status of the EEPROM driver to be stable.
> Fabrice, maybe this part can be integrated in QEMU head.
>
> Both ethernet drivers work with QEMU head and Linux on x86 host / guest,
> but have known endianess issues (they will at least need fixes for big
> endian hosts) and are experimental. I am still working on them.
>
> Feedback and bug fixes are welcome.
>
> Regards
> Stefan
[-- Attachment #2: eepro100.tar.bz2 --]
[-- Type: application/octet-stream, Size: 14485 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [patch] More PCI ethernet emulations
@ 2007-03-27 7:16 Ben Taylor
2007-03-28 20:56 ` Stefan Weil
0 siblings, 1 reply; 4+ messages in thread
From: Ben Taylor @ 2007-03-27 7:16 UTC (permalink / raw)
To: qemu-devel
---- Stefan Weil <weil@mail.berlios.de> wrote:
> Hi,
>
> File eepro100.tar.bz2 (added to this mail) contains everything
> needed to add 3 new PCI network device (all similar to EEPRO100):
>
> eepro100.patch:
> Makefile.target:
> added two binaries needed for EEPRO100
> split entries for PCI network devices (1 line / entry, better
> merging with CVS)
> vl.h:
> added prototypes for EEPRO100
> hw/pci.c:
> added new PCI network models: i82551, i82557b, i82559er
>
> hw/eepro100.c:
> EEPRO100 PCI network emulation
>
> hw/eeprom93xx.c, hw/eeprom93xx.h:
> EEPROM emulation, needed for EEPRO100 (and others)
>
> I just finished running these tests using a PC host running Debian GNU
> Linux:
>
> * compilation for all QEMU target architectures: ok
> * cross compilation (Windows) for all QEMU target architectures: ok
> * functional test: ok
>
> The last test was started like this:
>
> i386-softmmu/qemu -L pc-bios --net nic,model=i82559er --net tap /dev/hda
> --snapshot
>
> Networking was tested using ping and ssh connection from emulated system
> to host.
>
> I did not apply your patch, because I cannot test it (it needs a system with
> different endianess). Your feedback is welcome
>
I have a question. in eepro100_write2, I see a word (16-bits) being
passed in, but only the low part of the word gets written to the eeprom.
Since it's a word write, shouldn't it be writing both bytes to the eeprom?
Ben
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [patch] More PCI ethernet emulations
2007-03-27 7:16 Ben Taylor
@ 2007-03-28 20:56 ` Stefan Weil
2007-04-02 12:32 ` Thiemo Seufer
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Weil @ 2007-03-28 20:56 UTC (permalink / raw)
To: sol10x86, QEMU Developers
Good question. I stumbled about this, too, when I looked
at the code how I could apply your patch. Some months
had past since I wrote it :-)
The code writes to a serial EEPROM, so the 16 bits are
sent using only a clock and a single data bit. The
EEPROM emulation then takes the single bits and puts
them together.
The function gets a byte which contains clock, data and
two other significant bits, and 4 bits which are always 0.
When called with a word, only one byte is needed.
Maybe it is the wrong one - if you work with different
endianess.
I'l have a look at the other problems next weekend.
Stefan
Ben Taylor wrote:
> I have a question. in eepro100_write2, I see a word (16-bits) being
> passed in, but only the low part of the word gets written to the eeprom.
> Since it's a word write, shouldn't it be writing both bytes to the eeprom?
>
> Ben
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [patch] More PCI ethernet emulations
2007-03-28 20:56 ` Stefan Weil
@ 2007-04-02 12:32 ` Thiemo Seufer
0 siblings, 0 replies; 4+ messages in thread
From: Thiemo Seufer @ 2007-04-02 12:32 UTC (permalink / raw)
To: Stefan Weil; +Cc: QEMU Developers
Stefan Weil wrote:
> Good question. I stumbled about this, too, when I looked
> at the code how I could apply your patch. Some months
> had past since I wrote it :-)
>
> The code writes to a serial EEPROM, so the 16 bits are
> sent using only a clock and a single data bit. The
> EEPROM emulation then takes the single bits and puts
> them together.
>
> The function gets a byte which contains clock, data and
> two other significant bits, and 4 bits which are always 0.
>
> When called with a word, only one byte is needed.
> Maybe it is the wrong one - if you work with different
> endianess.
The card is detected on ppc/Linux emulating mipsel/Linux, but
no interface is configured. It works on x86/Linux emulating
mipsel/Linux.
Thiemo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-02 12:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <23179021.1174880111656.JavaMail.root@eastrmwml08.mgt.cox.net>
2007-03-26 20:33 ` [Qemu-devel] [patch] More PCI ethernet emulations Stefan Weil
2007-03-27 7:16 Ben Taylor
2007-03-28 20:56 ` Stefan Weil
2007-04-02 12:32 ` Thiemo Seufer
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).