a question for ne2000

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.
Post Reply
shindow
Member
Member
Posts: 26
Joined: Thu Feb 25, 2010 7:35 am

a question for ne2000

Post by shindow »

I was reading the papersheet of DP8390D and here are some question:
1.I konw that the io base is between 0x280 and 0x380,you can configure it in virtual machine.

Code: Select all

#define NE_NOVELL_NIC_OFFSET    0x00
#define NE_NOVELL_ASIC_OFFSET   0x10
 unsigned short asic_addr;             // ASIC I/O bus address
 unsigned short nic_addr;              // NIC (DP8390) I/O bus address

 iobase=0x280;
 ne->iobase = iobase;

 ne->nic_addr = ne->iobase + NE_NOVELL_NIC_OFFSET;
 ne->asic_addr = ne->iobase + NE_NOVELL_ASIC_OFFSET;
I can't understand why there are two kinds address(nic , asic) and what is the ASIC I/O bus address ,what difference between them.

2.and there are pages of registers ,using ps0(=0 or 1) and ps1(=0 or 1) to address them,but i see the code like this:

Code: Select all

_outp(ne->nic_addr + NE_P0_CR, NE_CR_RD2 | NE_CR_STA);
................
................
_outp(ne->nic_addr + NE_P1_CURR, ne->next_pkt);
i don't see any code to set the ps0 and ps1 before using them

thank you in advance
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: a question for ne2000

Post by gerryg400 »

Shindow,

It's a very long time since I wrote nic code. If I remember though, the nic offset is where the control registers are while the asic offset is where data is read and written.

There are 2 sets of registers at the same address to save IO space. If you set bit 6 (0x40) in DP_CR you address the 2nd set of registers.

I hope this helps. If your still stuck I may be able to dig up some old (>10 years) code and send it to you.

- gerryg400
Post Reply