Page 1 of 1

a question for ne2000

Posted: Tue Mar 09, 2010 12:55 am
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

Re: a question for ne2000

Posted: Wed Apr 14, 2010 6:53 am
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