Page 2 of 2

Posted: Thu Apr 19, 2007 3:07 pm
by Brynet-Inc
mystran wrote:Bochs and QEMU both have support for NE2k and 8139 but that's it.
Actually, QEMU supports the AMD PC-Net PCI chipset as well.. :wink:

Code: Select all

-M isapc -net nic,model=nek2_isa
-net nic,model=ne2k_pci
-net nic,model=rtl8139
-net nic,model=pcnet
As for the VIA Rhine II Fast Ethernet Adapter I have a surprise for ya pcmattman.. :wink:
http://www.viaarena.com/default.aspx?Pa ... bCatID=147

While source code is definitely no replacement for proper documentation, Maybe it'll be a good read over for implementing chipset support (It looks sophisticated..)

I'm not 100% on that NE DM-1001 card though, You might want to boot up BSD or Linux and see if it uses a common chipset or something (If it's detected..)

Good luck :)

Posted: Thu Apr 19, 2007 3:24 pm
by pcmattman
Wow. Free code is good. Very good. :D

I've been able to get the maximum packet size of the 3Com cards by reading the registers. At least that means I understand the datasheet... Now to do something useful :D.

Posted: Thu Apr 19, 2007 3:32 pm
by pcmattman
Combuster wrote:Contribute to Bochs :D
I would. I don't understand the hardware enough yet. I just want to write a driver for my OS that I can test without a reboot.

Posted: Thu Apr 19, 2007 11:03 pm
by omin0us
Wow, I didn't know they had an opensource driver. :]
good to see. I will put that on the list of items to port in the future.

Posted: Fri Apr 20, 2007 5:05 am
by Brynet-Inc
omin0us wrote:Wow, I didn't know they had an opensource driver. :]
good to see. I will put that on the list of items to port in the future.
They have source for some of their 3d graphics cards too.. Some other hardware as well, Kind of neat.. Documentation would be nice too..

Posted: Fri Apr 20, 2007 5:00 pm
by pcmattman
Haha... I boot my OS on my testbed and it tells me I have an NE2K compatible card! I'm still coding a 3C90xC card driver, but I find it interesting that I can use an NE2K driver in my OS on real hardware...

Posted: Fri Apr 20, 2007 5:17 pm
by mystran
What MOBO chipset you have? It could be if you have an integrated mobo it's Ne2k compatible? What makes me wonder though... what PCI IDs you actually detect?

Code: Select all

static struct pci_device_id ne2k_pci_tbl[] = {
        { 0x10ec, 0x8029, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_RealTek_RTL_8029 },
        { 0x1050, 0x0940, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Winbond_89C940 },
        { 0x11f6, 0x1401, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Compex_RL2000 },
        { 0x8e2e, 0x3000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_KTI_ET32P2 },
        { 0x4a14, 0x5000, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_NetVin_NV5000SC },
        { 0x1106, 0x0926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Via_86C926 },
        { 0x10bd, 0x0e34, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_SureCom_NE34 },
        { 0x1050, 0x5a5a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Winbond_W89C940F },
        { 0x12c3, 0x0058, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Holtek_HT80232 },
        { 0x12c3, 0x5598, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_Holtek_HT80229 },
        { 0, }
};
MODULE_DEVICE_TABLE(pci, ne2k_pci_tbl);
The above is from Linux ne2k-pci.c and the VIA in the list is integrated in chipset, so that's what you have?

Posted: Fri Apr 20, 2007 5:21 pm
by pcmattman
Well for a start it's not onboard, it's a PCI card.

And the card I'm talking about is a Novell card, pretty old. Still has a coaxial cable jack...

I think it didn't detect it earlier but now I've blown some cobwebs out (and added another 3 network cards to my testbed/server)...

Posted: Fri Apr 20, 2007 5:22 pm
by mystran

Code: Select all

        {"Via 86C926", ONLY_16BIT_IO},
From Linux again. Don't try to do 32-bit IO on that one. ;)

Posted: Sat Apr 21, 2007 11:52 pm
by pcmattman
I just found out I have an RTL8029... Ironic, that's the only card my OS supports so far :D.

I have trouble with the 3Com implementation, can't even get an interrupt from the card :?

Posted: Sun Apr 22, 2007 9:33 am
by omin0us
pcmattman wrote:I just found out I have an RTL8029... Ironic, that's the only card my OS supports so far :D.

I have trouble with the 3Com implementation, can't even get an interrupt from the card :?
Did you test it out on there? I'm curious to see my code work on a real life machine.

Posted: Sun Apr 22, 2007 2:52 pm
by pcmattman
omin0us wrote:
pcmattman wrote:I just found out I have an RTL8029... Ironic, that's the only card my OS supports so far :D.

I have trouble with the 3Com implementation, can't even get an interrupt from the card :?
Did you test it out on there? I'm curious to see my code work on a real life machine.
I'm testing and modifying to make it work. ATM I use a sniffer on my main PC that can view the network data coming into it. All packets coming from my OS are malformed, so I'm working to try to figure out why. Basically in each packet every legit byte is followed by some other byte.

Posted: Sun Apr 22, 2007 11:10 pm
by B.E
pcmattman wrote: All packets coming from my OS are malformed, so I'm working to try to figure out why. Basically in each packet every legit byte is followed by some other byte.
Have you tried packing the structures?, A could place to start would be packet_t and ethernet_t.

Posted: Sun Apr 22, 2007 11:17 pm
by mystran
pcmattman wrote: I'm testing and modifying to make it work. ATM I use a sniffer on my main PC that can view the network data coming into it. All packets coming from my OS are malformed, so I'm working to try to figure out why. Basically in each packet every legit byte is followed by some other byte.
Are you saying that if you drop every other byte, you get the correct packet?

Maybe you've configured the card for 16-bit I/O and you are doing 8-bit I/O and it thinks you're doing 16-bit?

edit: oh ok, I checked your CVS and this doesn't seem to be the case. Your packet receive loop still looks a bit suspicious to me, I hope you know what your logic is supposed to do.... anyway... could be it doesn't support 8-bit?

Posted: Sun Apr 22, 2007 11:57 pm
by pcmattman
B.E wrote:
pcmattman wrote: All packets coming from my OS are malformed, so I'm working to try to figure out why. Basically in each packet every legit byte is followed by some other byte.
Have you tried packing the structures?, A could place to start would be packet_t and ethernet_t.
I'll make sure that they do get packed...

I had a similar problem with UDP packets, the structure wasn't packed.