diff --git a/src/bin/shell/commands.c b/src/bin/shell/commands.c index 44bdef6..a7c24d9 100644 --- a/src/bin/shell/commands.c +++ b/src/bin/shell/commands.c @@ -68,10 +68,8 @@ } else { printf("Childs Pid: [%i]\n",cPid); - /* while (pidStatus(cPid) > 0) sched_yield(); - */ } } } diff --git a/src/sys/include/ubixfs/dirCache.h b/src/sys/include/ubixfs/dirCache.h index bd106a5..195b035 100644 --- a/src/sys/include/ubixfs/dirCache.h +++ b/src/sys/include/ubixfs/dirCache.h @@ -1,7 +1,8 @@ #ifndef DIRCACHE_H #define DIRCACHE_H -#include "ubixfs.h" +/* #include "ubixfs.h" */ +#include struct cacheNode { char * name; diff --git a/src/sys/include/ubixfs/ubixfs.h b/src/sys/include/ubixfs/ubixfs.h index f68e28c..80a4b2d 100644 --- a/src/sys/include/ubixfs/ubixfs.h +++ b/src/sys/include/ubixfs/ubixfs.h @@ -145,7 +145,7 @@ //Good Functions //void initUbixFS(struct mountPoints *mp); -int readUbixFS(fileDescriptor *fd,char *data,long offset,long size); +int readUbixFS(fileDescriptor *fd,char *data,uInt32,long size); int writeUbixFS(fileDescriptor *fd,char *data,long offset,long size); void syncBat(vfs_mountPoint_t *mp); int freeBlocks(int block,fileDescriptor *fd); @@ -162,6 +162,11 @@ /*** $Log$ + Revision 1.18 2004/07/23 09:10:06 reddawg + ubixfs: cleaned up some functions played with the caching a bit + vfs: renamed a bunch of functions + cleaned up a few misc bugs + Revision 1.17 2004/07/22 22:37:03 reddawg Caching is working now the FS is extremely fast but needs to be optimized to do 32bit copies over 8bit diff --git a/src/sys/include/vfs/file.h b/src/sys/include/vfs/file.h index 0fb7c8b..285f226 100644 --- a/src/sys/include/vfs/file.h +++ b/src/sys/include/vfs/file.h @@ -25,6 +25,7 @@ #define _FILE_H #include +#include #include #define SEEK_SET 0x0 @@ -45,7 +46,7 @@ uInt32 start; uInt8 fileName[512]; char *buffer; - uInt32 dirBlock; + struct cacheNode *cacheNode; uInt32 perms; } fileDescriptor; diff --git a/src/sys/init/main.c b/src/sys/init/main.c index e1b7f99..37025e3 100644 --- a/src/sys/init/main.c +++ b/src/sys/init/main.c @@ -88,7 +88,6 @@ kpanic("Error: Initializing System.\n"); } } - if (vfs_mount(0x0,0x0,0x0,0x0,"sys","rw") != 0x0) { kprintf("Problem Mounting sys Mount Point\n"); } @@ -113,6 +112,11 @@ /*** $Log$ + Revision 1.62 2004/07/23 09:10:06 reddawg + ubixfs: cleaned up some functions played with the caching a bit + vfs: renamed a bunch of functions + cleaned up a few misc bugs + Revision 1.61 2004/07/21 23:05:05 reddawg last round of fixed main.c: removed kernel stack diff --git a/src/sys/ubixfs/dirCache.c b/src/sys/ubixfs/dirCache.c index 8f225e1..d8cfa47 100644 --- a/src/sys/ubixfs/dirCache.c +++ b/src/sys/ubixfs/dirCache.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include @@ -251,6 +252,9 @@ /*** $Log$ + Revision 1.23 2004/07/27 09:05:43 flameshadow + chg: fixed file not found bug. Still can't find looping issue + Revision 1.22 2004/07/27 04:05:20 flameshadow chg: kinda fixed it. Added bunches of debug info @@ -301,6 +305,9 @@ Revision 1.5 2004/07/20 19:21:30 reddawg You like leaving out $Log$ + You like leaving out Revision 1.23 2004/07/27 09:05:43 flameshadow + You like leaving out chg: fixed file not found bug. Still can't find looping issue + You like leaving out You like leaving out Revision 1.22 2004/07/27 04:05:20 flameshadow You like leaving out chg: kinda fixed it. Added bunches of debug info You like leaving out diff --git a/src/sys/ubixfs/ubixfs.c b/src/sys/ubixfs/ubixfs.c index e9645ae..f625fd4 100644 --- a/src/sys/ubixfs/ubixfs.c +++ b/src/sys/ubixfs/ubixfs.c @@ -131,7 +131,7 @@ fd->start = *cacheNode->startCluster; fd->size = *cacheNode->size; fd->perms = *cacheNode->permissions; - fd->dirBlock = 0x0; /* Directory Start Sector */ + fd->cacheNode = cacheNode; /* Directory Start Sector */ /* if (cacheNode->size != 0x0 && cacheNode->info == NULL) { cacheNode->info = kmalloc(UBIXFS_ALIGN(*cacheNode->size)); @@ -148,7 +148,7 @@ fd->start = dirEntry->startCluster; fd->size = dirEntry->size; fd->perms = dirEntry->permissions; - fd->dirBlock = 0x0; /* Directory Start Sector */ + // fd->dirBlock = 0x0; /* Directory Start Sector */ #endif return(0x1); } @@ -173,7 +173,7 @@ fd->start = dirEntry[x].startCluster; fd->size = dirEntry[x].size; fd->perms = dirEntry[x].permissions; - fd->dirBlock = 0x0; /* Directory Start Sector */ + //fd->dirBlock = 0x0; /* Directory Start Sector */ return((int)1); } } @@ -184,7 +184,7 @@ fd->start = dirEntry[x].startCluster; fd->size = dirEntry[x].size; fd->perms = dirEntry[x].permissions; - fd->dirBlock = 0x0; /* Directory Start Sector */ + //fd->dirBlock = 0x0; /* Directory Start Sector */ return(0x1); } if (dirEntry[x].attributes == 0x0) { @@ -195,7 +195,7 @@ dirEntry[x].permissions = 3754; fd->size = 0x0; fd->start = dirEntry[x].startCluster; - fd->dirBlock = 0x0; + //fd->dirBlock = 0x0; fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fsInfo->rootDir].realSector),8); return(0x1); } @@ -261,13 +261,17 @@ if (offset > fd->size) { fd->size = offset; dirEntry = (struct directoryEntry *)kmalloc(4096); + /* fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),8); + */ for (i=0x0;i<(4096/sizeof(struct directoryEntry));i++) { if ((int)!strcmp(dirEntry[i].fileName,fd->fileName)) break; } dirEntry[i].size = fd->size; +/* fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),8); +*/ kfree(dirEntry); } return(ch); @@ -276,23 +280,21 @@ /* Verified Functions */ -int readUbixFS(fileDescriptor *fd,char *data,long offset,long size) { +int readUbixFS(fileDescriptor *fd,char *data,uInt32 offset,long size) { int i = 0x0; char *buffer = 0x0; struct ubixFSInfo *fsInfo = NULL; - struct cacheNode *cacheNode = NULL; assert(fd); assert(fd->mp); assert(fd->mp->fsInfo); fsInfo = fd->mp->fsInfo; - cacheNode = ubixfs_cacheFind(fsInfo->dirCache, fd->fileName); - if (cacheNode->present != 1) + if (fd->cacheNode->present != 1) kpanic("ERROR with cache node\n"); - buffer = (char *)cacheNode->info; + buffer = (char *)fd->cacheNode->info; for (i=0x0; i fd->size) { @@ -375,14 +377,18 @@ if (offset > fd->size) { fd->size = offset; dirEntry = (struct directoryEntry *)kmalloc(4096); +/* fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),blockSize); +*/ for (i=0x0;i<(4096/sizeof(struct directoryEntry));i++) { if ((int)!strcmp(dirEntry[i].fileName,fd->fileName)) break; } dirEntry[i].size = fd->size; dirEntry[i].startCluster = fd->start; +/* fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),blockSize); +*/ kfree(dirEntry); } /* Return */ @@ -422,7 +428,7 @@ *****************************************************************************************/ static int ubixfs_loadData(fileDescriptor *fd,char *data,uInt32 size,uInt32 batIndex) { - int i = 0x0; + uInt32 i = 0x0; struct ubixFSInfo *fsInfo = NULL; @@ -564,6 +570,9 @@ /*** $Log$ + Revision 1.37 2004/07/27 09:05:43 flameshadow + chg: fixed file not found bug. Still can't find looping issue + Revision 1.36 2004/07/27 04:05:20 flameshadow chg: kinda fixed it. Added bunches of debug info diff --git a/src/sys/vfs/mount.c b/src/sys/vfs/mount.c index b4c0425..7967ab4 100644 --- a/src/sys/vfs/mount.c +++ b/src/sys/vfs/mount.c @@ -49,7 +49,7 @@ struct device_node *device = 0x0; /* Allocate Memory For Mount Point */ - if ((mp = (vfs_mountPoint_t *)kmalloc(sizeof(vfs_mountPoint_t)) == 0x0) + if ((mp = (vfs_mountPoint_t *)kmalloc(sizeof(vfs_mountPoint_t))) == 0x0) kpanic("vfs_mount: failed to allocate mp\n"); /* Copy Mount Point Into Buffer */ @@ -141,6 +141,9 @@ /*** $Log$ + Revision 1.10 2004/07/27 08:42:29 reddawg + chg: vfs_mount now ensures that malloc did not fail + Revision 1.9 2004/07/23 09:10:06 reddawg ubixfs: cleaned up some functions played with the caching a bit vfs: renamed a bunch of functions diff --git a/src/sys/vmm/paging.c b/src/sys/vmm/paging.c index f93925a..c5827bb 100644 --- a/src/sys/vmm/paging.c +++ b/src/sys/vmm/paging.c @@ -383,13 +383,13 @@ if ((uInt32) pageTableSrc[y] == (uInt32) 0x0) { if (count > 1) { for (c = 0; c < count; c++) { - if (y + c >= 1024) - kpanic("hmm?"); - if ((uInt32) pageTableSrc[y + c] != (uInt32) 0x0) { - c = -1; - break; + if (y + c < 1024) { + if ((uInt32) pageTableSrc[y + c] != (uInt32) 0x0) { + c = -1; + break; + } + } } - } if (c != -1) { for (c = 0; c < count; c++) { vmmRemapPage((uInt32) vmmFindFreePage(sysID), ((x * 0x400000) + ((y + c) * 0x1000))); @@ -417,6 +417,9 @@ /*** $Log$ + Revision 1.13 2004/07/27 07:15:21 reddawg + chg: made page 0x0 writeable should boot now + Revision 1.12 2004/07/27 06:48:26 flameshadow chg: fixed ubu's typo