Hardware Datasheets?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post 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 :)
Last edited by Brynet-Inc on Thu Apr 19, 2007 3:25 pm, edited 2 times in total.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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.
User avatar
omin0us
Member
Member
Posts: 49
Joined: Tue Oct 17, 2006 6:53 pm
Location: Los Angeles, CA
Contact:

Post 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.
http://ominos.sourceforge.net - my kernel
#ominos @ irc.freenode.net
http://dtors.ath.cx - my blog
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Post 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..
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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...
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post 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?
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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)...
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post by mystran »

Code: Select all

        {"Via 86C926", ONLY_16BIT_IO},
From Linux again. Don't try to do 32-bit IO on that one. ;)
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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 :?
User avatar
omin0us
Member
Member
Posts: 49
Joined: Tue Oct 17, 2006 6:53 pm
Location: Los Angeles, CA
Contact:

Post 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.
http://ominos.sourceforge.net - my kernel
#ominos @ irc.freenode.net
http://dtors.ath.cx - my blog
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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.
User avatar
B.E
Member
Member
Posts: 275
Joined: Sat Oct 21, 2006 5:29 pm
Location: Brisbane Australia
Contact:

Post 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.
Image
Microsoft: "let everyone run after us. We'll just INNOV~1"
User avatar
mystran
Member
Member
Posts: 670
Joined: Thu Mar 08, 2007 11:08 am

Post 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?
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post 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.
Post Reply