ne2k.h
ubixos/types.h
sys/device.old.h
src/sys/include/ubixos/init.h
src/sys/isa/ne2k.c
sys/device.old.h
src/sys/include/isa/ne2k.h
ubixos/types.h
sys/_types.h
src/sys/include/isa/ne2k.h
src/sys/init/main.c
src/sys/isa/ne2k.c
src/sys/include/ubixos/init.h
dp_rcvhdr
etheraddr
nicBuffer
DEF_ENABLED
0x200
DP_CNTR0
0xD
ne2k_init
DP_CNTR1
0xE
ne2k_init
DP_CNTR2
0xF
ne2k_init
DP_CURR
0x7
ne2k_init
DP_MAR0
0x8
ne2k_init
DP_MAR1
0x9
ne2k_init
DP_MAR2
0xA
ne2k_init
DP_MAR3
0xB
ne2k_init
DP_MAR4
0xC
ne2k_init
DP_MAR5
0xD
ne2k_init
DP_MAR6
0xE
ne2k_init
DP_MAR7
0xF
ne2k_init
DP_PAGESIZE
256
dp_pkt2user
getblock
E8390_CMD
0x00
E8390_NODMA
0x20
E8390_PAGE0
0x00
E8390_PAGE1
0x40
E8390_RREAD
0x08
getblock
E8390_RWRITE
0x10
PCtoNIC
E8390_RXCONFIG
0x04
E8390_RXOFF
0x20
E8390_START
0x02
getblock
PCtoNIC
E8390_STOP
0x01
E8390_TXCONFIG
0x00
E8390_TXOFF
0x00
EN0_BOUNDARY
0x03
EN0_COUNTER0
0x0d
EN0_DCFG
0x0e
EN0_IMR
0x0f
EN0_ISR
0x07
getblock
NICtoPC
PCtoNIC
EN0_RCNTHI
0x0b
NICtoPC
PCtoNIC
EN0_RCNTLO
0x0a
NICtoPC
PCtoNIC
EN0_RSARHI
0x09
getblock
NICtoPC
PCtoNIC
EN0_RSARLO
0x08
getblock
NICtoPC
PCtoNIC
EN0_RXCR
0x0c
EN0_STARTPG
0x01
EN0_STOPPG
0x02
EN0_TPSR
0x04
EN0_TXCR
0x0D
EN1_CURPAG
0x07
EN1_MULT
0x08
EN1_PHYS
0x01
ENDCFG_WTS
0x01
ENISR_ALL
0x3f
ether_addr
ether_addr_t
NE1SM_START_PG
0x20
NE1SM_STOP_PG
0x40
NE_BNRY
0x03
dp_recv
ne2k_init
NE_CMD
0x00
dp_recv
getblock
ne2k_init
NE_CURRENT
0x07
dp_recv
NE_DATAPORT
0x10
getblock
NICtoPC
PCtoNIC
NE_DCR
0x0E
ne2k_init
NE_DCR_AR
0x10
NE_DCR_FT0
0x20
NE_DCR_FT1
0x40
NE_DCR_LS
0x08
NE_DCR_WTS
0x01
NE_IMR
0x0F
ne2k_init
ne2kHandler
NE_ISR
0x07
ne2k_init
ne2kHandler
NE_PSTART
0x01
ne2k_init
NE_PSTOP
0x02
ne2k_init
NE_RBCR0
0x0A
getblock
ne2k_init
NE_RBCR1
0x0B
getblock
ne2k_init
NE_RCR
0x0C
ne2k_init
NE_TCR
0x0D
ne2k_init
NE_TPSR
0x04
ne2kHandler
NESM_START_PG
0x40
NESM_STOP_PG
0x80
OK
0
dp_pkt2user
dp_recv
RSR_FO
0x08
dp_recv
RSR_PRX
0x01
dp_recv
startPage
0x4C
dp_recv
ne2k_init
stopPage
0x80
dp_pkt2user
dp_recv
ne2k_init
TX_1X_PAGES
6
TX_2X_PAGES
12
TX_PAGES
(dev->priv->pingPong ? TX_2X_PAGES : TX_1X_PAGES)
dp_rcvhdr typedef struct dp_rcvhdr dp_rcvhdr_t dp_rcvhdr_t
etheraddr typedef union etheraddr ether_addr_t ether_addr_t
int int ne2k_init () ne2k_init dDpl0 dInt DP_CNTR0 DP_CNTR1 DP_CNTR2 DP_CURR DP_MAR0 DP_MAR1 DP_MAR2 DP_MAR3 DP_MAR4 DP_MAR5 DP_MAR6 DP_MAR7 dPresent inportByte device::ioAddr device::irq irqEnable kmalloc kprintf mDev mVec ne2kISR NE_BNRY NE_CMD NE_DCR NE_IMR NE_ISR NE_PSTART NE_PSTOP NE_RBCR0 NE_RBCR1 NE_RCR NE_TCR outportByte setVector startPage stopPage x20
nicBuffer * struct nicBuffer* ne2kAllocBuffer (int) ne2kAllocBuffer int nicBuffer::buffer kmalloc nicBuffer::length ne2k_spinLock ne2kBuffer nicBuffer::next spinLock spinUnlock dp_pkt2user
int int ne2kDevInit (struct device *) ne2kDevInit struct device *
void void ne2kFreeBuffer (struct nicBuffer *) ne2kFreeBuffer struct nicBuffer * nicBuffer::buffer kfree
nicBuffer * struct nicBuffer* ne2kGetBuffer () ne2kGetBuffer ne2k_spinLock ne2kBuffer nicBuffer::next x1
void void ne2kHandler () ne2kHandler dp_recv eoi inportByte device::ioAddr irqDisable irqEnable kprintf mDev mPic NE_IMR NE_ISR NE_TPSR outportByte sPic status
void void ne2kISR () ne2kISR ne2k_init
int int ne2kProbe (int, struct device *) ne2kProbe int struct device *
int int NICtoPC (struct device *dev, void *packet, int length, int nic_addr) NICtoPC struct device * dev void * packet int length int nic_addr assert EN0_ISR EN0_RCNTHI EN0_RCNTLO EN0_RSARHI EN0_RSARLO inportWord device::ioAddr NE_DATAPORT outportByte dp_pkt2user
void void NS8390_init (struct device *dev, int startp) NS8390_init struct device * dev int startp
int int PCtoNIC (struct device *dev, void *packet, int length) PCtoNIC struct device * dev void * packet int length assert E8390_RWRITE E8390_START EN0_ISR EN0_RCNTHI EN0_RCNTLO EN0_RSARHI EN0_RSARLO inportByte device::ioAddr kpanic NE_DATAPORT outportByte outportWord
char * char* nicPacket nicPacket
uInt32 uInt32 packetLength packetLength

    /*****************************************************************************************
    Copyright(c)2002-2004TheUbixOSProject
    Allrightsreserved.

    Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,are
    permittedprovidedthatthefollowingconditionsaremet:

    Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistof
    conditions,thefollowingdisclaimerandthelistofauthors.Redistributionsinbinary
    formmustreproducetheabovecopyrightnotice,thislistofconditions,thefollowing
    disclaimerandthelistofauthorsinthedocumentationand/orothermaterialsprovided
    withthedistribution.NeitherthenameoftheUbixOSProjectnorthenamesofits
    contributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftware
    withoutspecificpriorwrittenpermission.

    THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANY
    EXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF
    MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALL
    THECOPYRIGHTOWNERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,
    SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENT
    OFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,OR
    TORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHIS
    SOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.

    $Id: ne2k_8h.xml 88 2016-01-12 00:11:29Z reddawg $

    *****************************************************************************************/

    #ifndef_NE2K_H
    #define_NE2K_H

    #include<ubixos/types.h>
    #include<sys/device.old.h>

    #defineether_addrether_addr_t
    typedefstructdp_rcvhdr
    {
    uInt8dr_status;/*Copyofrsr*/
    uInt8dr_next;/*Pointertonextpacket*/
    uInt8dr_rbcl;/*ReceiveByteCountLow*/
    uInt8dr_rbch;/*ReceiveByteCountHigh*/
    }dp_rcvhdr_t;

    typedefunionetheraddr{
    unsignedcharbytes[6];/*byteordersafeinitialization*/
    unsignedshortshorts[3];/*force2-bytealignment*/
    }ether_addr;

    structnicBuffer{
    structnicBuffer*next;
    intlength;
    char*buffer;
    };

    #defineRSR_FO0x08
    #defineRSR_PRX0x01
    #defineDEF_ENABLED0x200

    #defineOK0

    #definestartPage0x4C
    #definestopPage0x80

    #defineNE_CMD0x00
    #defineNE_PSTART0x01
    #defineNE_PSTOP0x02
    #defineNE_BNRY0x03
    #defineNE_TPSR0x04
    #defineNE_ISR0x07
    #defineNE_CURRENT0x07
    #defineNE_RBCR00x0A
    #defineNE_RBCR10x0B
    #defineNE_RCR0x0C
    #defineNE_TCR0x0D
    #defineNE_DCR0x0E
    #defineNE_IMR0x0F

    #defineNE_DCR_WTS0x01
    #defineNE_DCR_LS0x08
    #defineNE_DCR_AR0x10
    #defineNE_DCR_FT10x40
    #defineNE_DCR_FT00x20

    #defineE8390_STOP0x01
    #defineE8390_NODMA0x20
    #defineE8390_PAGE00x00
    #defineE8390_PAGE10x40
    #defineE8390_CMD0x00
    #defineE8390_START0x02
    #defineE8390_RREAD0x08
    #defineE8390_RWRITE0x10
    #defineE8390_RXOFF0x20
    #defineE8390_TXOFF0x00
    #defineE8390_RXCONFIG0x04
    #defineE8390_TXCONFIG0x00

    #defineEN0_COUNTER00x0d
    #defineEN0_DCFG0x0e
    #defineEN0_RCNTLO0x0a
    #defineEN0_RCNTHI0x0b
    #defineEN0_ISR0x07
    #defineEN0_IMR0x0f
    #defineEN0_RSARLO0x08
    #defineEN0_RSARHI0x09
    #defineEN0_TPSR0x04
    #defineEN0_RXCR0x0c
    #defineEN0_TXCR0x0D
    #defineEN0_STARTPG0x01
    #defineEN0_STOPPG0x02
    #defineEN0_BOUNDARY0x03

    #defineEN1_PHYS0x01
    #defineEN1_CURPAG0x07
    #defineEN1_MULT0x08

    #defineNE1SM_START_PG0x20
    #defineNE1SM_STOP_PG0x40
    #defineNESM_START_PG0x40
    #defineNESM_STOP_PG0x80

    #defineENISR_ALL0x3f

    #defineENDCFG_WTS0x01

    #defineNE_DATAPORT0x10

    #defineTX_2X_PAGES12
    #defineTX_1X_PAGES6
    #defineTX_PAGES(dev->priv->pingPong?TX_2X_PAGES:TX_1X_PAGES)

    #defineDP_CURR0x7/*CurrentPageRegister*/
    #defineDP_MAR00x8/*MulticastAddressRegister0*/
    #defineDP_MAR10x9/*MulticastAddressRegister1*/
    #defineDP_MAR20xA/*MulticastAddressRegister2*/
    #defineDP_MAR30xB/*MulticastAddressRegister3*/
    #defineDP_MAR40xC/*MulticastAddressRegister4*/
    #defineDP_MAR50xD/*MulticastAddressRegister5*/
    #defineDP_MAR60xE/*MulticastAddressRegister6*/
    #defineDP_MAR70xF/*MulticastAddressRegister7*/

    #defineDP_CNTR00xD/*TallyCounter0*/
    #defineDP_CNTR10xE/*TallyCounter1*/
    #defineDP_CNTR20xF/*TallyCounter2*/

    #defineDP_PAGESIZE256

    externchar*nicPacket;
    externuInt32packetLength;

    intne2k_init();
    intne2kProbe(int,structdevice*);
    intne2kDevInit(structdevice*);
    voidNS8390_init(structdevice*dev,intstartp);

    voidne2kISR();
    voidne2kHandler();

    intNICtoPC(structdevice*dev,void*packet,intlength,intnic_addr);
    intPCtoNIC(structdevice*dev,void*packet,intlength);

    structnicBuffer*ne2kAllocBuffer(int);
    structnicBuffer*ne2kGetBuffer();
    voidne2kFreeBuffer(structnicBuffer*);

    #endif

    /***
    $Log: ne2k_8h.xml,v $
    Revision 1.6  2006/12/19 14:12:52  reddawg
    rtld-elf almost workign

    Revision1.1.1.12006/06/0112:46:14reddawg
    ubix2

    Revision1.22005/10/1200:13:36reddawg
    Removed

    Revision1.1.1.12005/09/2617:23:39reddawg
    nomessage

    Revision1.62004/07/1412:03:49reddawg
    ne2k:ne2kInittone2k_init
    ChangedStartupRoutines

    Revision1.52004/05/2114:57:16reddawg
    Cleanedup

    END
    ***/