diff --git a/src/sys/include/ubixos/init.h b/src/sys/include/ubixos/init.h index 86c84ec..53aeaab 100644 --- a/src/sys/include/ubixos/init.h +++ b/src/sys/include/ubixos/init.h @@ -61,8 +61,10 @@ pit_init, atkbd_init, time_init, + /* net_init, ne2k_init, + */ devfs_init, pci_init, ubixfs_init, @@ -76,6 +78,9 @@ /*** $Log$ + Revision 1.37 2004/09/14 21:51:24 reddawg + Debug info + Revision 1.36 2004/09/11 22:17:52 reddawg hmm.. diff --git a/src/sys/init/main.c b/src/sys/init/main.c index a5dba3a..fe106fc 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -106,7 +106,7 @@ } */ - /* initHardDisk(); */ + initHardDisk(); /* Initialize the system */ //kprintf("0"); @@ -137,6 +137,9 @@ /*** $Log$ + Revision 1.85 2004/09/14 21:51:24 reddawg + Debug info + Revision 1.84 2004/09/11 12:26:07 reddawg We now initialize all needed daemons diff --git a/src/sys/isa/ne2k.c b/src/sys/isa/ne2k.c index a4b85ca..dd8c239 100644 --- a/src/sys/isa/ne2k.c +++ b/src/sys/isa/ne2k.c @@ -113,10 +113,10 @@ } int PCtoNIC(struct device *dev,void *packet,int length) { - int i; + int i = 0x0; uInt16 *packet16 = (uInt16 *)packet; uInt8 *packet8 = (uInt8 *)packet; - uInt8 word16 = 1; + uInt8 word16 = 0x1; if ((inportByte(dev->ioAddr) & 0x04) == 0x04) { kpanic("Device Not Ready\n"); @@ -162,7 +162,7 @@ } int NICtoPC(struct device *dev,void *packet,int length,int nic_addr) { - int i; + int i = 0x0; uInt16 *packet16 = (uInt16 *)packet; assert(length); @@ -210,6 +210,7 @@ } outportByte(mDev->ioAddr + NE_ISR, 0x05); } + outportByte(mDev->ioAddr + NE_IMR,0x0); outportByte(mDev->ioAddr + NE_IMR,0x0B); @@ -221,9 +222,9 @@ static int dp_recv(struct device *dev) { dp_rcvhdr_t header; - unsigned int pageno, curr, next; - int packet_processed = 0x0, r; - uInt16 eth_type; + unsigned int pageno = 0x0, curr = 0x0, next = 0x0; + int packet_processed = 0x0, r = 0x0; + uInt16 eth_type = 0x0; uInt32 length = 0x0; @@ -276,8 +277,8 @@ } static void getblock(struct device *dev,int page,size_t offset,size_t size,void *dst) { - uInt16 *ha; - int i; + uInt16 *ha = 0x0; + int i = 0x0; ha = (uInt16 *) dst; offset = page * DP_PAGESIZE + offset; @@ -294,7 +295,7 @@ } static int dp_pkt2user(struct device *dev,int page,int length) { - int last; + int last = 0x0; struct nicBuffer *tmpBuf = 0x0; last = page + (length - 1) / DP_PAGESIZE; @@ -358,6 +359,9 @@ /*** $Log$ + Revision 1.22 2004/09/15 21:25:33 reddawg + Fixens + Revision 1.21 2004/09/11 19:15:37 reddawg here you go irq 10 io 240 for your ne2k nic diff --git a/src/sys/kernel/sched.c b/src/sys/kernel/sched.c index 919a22a..5c06d9b 100644 --- a/src/sys/kernel/sched.c +++ b/src/sys/kernel/sched.c @@ -118,12 +118,14 @@ if (_current->state > 0x0) { if (_current->oInfo.v86Task == 0x1) irqDisable(0x0); + asm("cli"); memAddr = (uInt32)&(_current->tss); ubixGDT[4].descriptor.baseLow = (memAddr & 0xFFFF); ubixGDT[4].descriptor.baseMed = ((memAddr >> 16) & 0xFF); ubixGDT[4].descriptor.baseHigh = (memAddr >> 24); ubixGDT[4].descriptor.access = '\x89'; spinUnlock(&schedulerSpinLock); + asm("sti"); asm("ljmp $0x20,$0\n"); } else @@ -275,6 +277,9 @@ /*** $Log$ + Revision 1.61 2004/09/15 21:25:33 reddawg + Fixens + Revision 1.60 2004/09/11 22:21:11 reddawg oInfo.cwd is now an array no longer a pointer.. diff --git a/src/sys/vfs/file.c b/src/sys/vfs/file.c index 0dccbf2..c2b6e61 100644 --- a/src/sys/vfs/file.c +++ b/src/sys/vfs/file.c @@ -189,7 +189,9 @@ //kprintf("fd->fileName: %s:%i\n",fd->fileName,_current->id); assert(fd->mp); assert(fd->mp->fs); + spinLock(&fdTable_lock); fd->mp->fs->vfsRead(fd,ptr,fd->offset,size * nmemb); + spinUnlock(&fdTable_lock); fd->offset += size * nmemb; return(size * nmemb); } @@ -249,8 +251,10 @@ int ch = 0x0; /* If Found Return Next Char */ if (fd != 0x0) { + spinLock(&fdTable_lock); fd->mp->fs->vfsRead(fd,(char *)&ch,fd->offset,1); fd->offset++; + spinUnlock(&fdTable_lock); return(ch); } @@ -485,6 +489,9 @@ /*** $Log$ + Revision 1.25 2004/09/14 21:51:24 reddawg + Debug info + Revision 1.24 2004/09/11 13:12:56 reddawg Removed kernel/file.c all in the vfs now