diff --git a/src/sys/Makefile b/src/sys/Makefile index bca6a4b..0a80e95 100644 --- a/src/sys/Makefile +++ b/src/sys/Makefile @@ -68,7 +68,7 @@ (cd compile;make) install: - (cd compile;cp ./ubix.elf /mnts/ubix/ubixos) + (cd compile;cp ./ubix.elf /mnts/ubix/boot/loader) # (cd boot;make install) # (cd ../tools/;make format-dsk) diff --git a/src/sys/pci/hd.c b/src/sys/pci/hd.c index 62a0bdf..c358a33 100644 --- a/src/sys/pci/hd.c +++ b/src/sys/pci/hd.c @@ -76,8 +76,6 @@ data2 = (char *)kmalloc(512); bsdd = (struct bsd_disklabel *)data2; - kprintf("Size: %i %i\n",sizeof(struct bsd_disklabel),sizeof(struct bsd_disklabel)/512); - if (device_add(0,'c',devInfo) == 0x0) { kprintf("ad0 - Start: [0x0], Size: [0x%x/0x%X]\n",hdd->hdSize,hdd->hdSize*512); devfs_makeNode("ad0",'c',0x1,0x0); @@ -106,7 +104,8 @@ hdd2 = (struct driveInfo *)kmalloc(sizeof(struct driveInfo)); memcpy(devInfo2,devInfo,sizeof(struct device_interface)); memcpy(hdd2,hdd,sizeof(struct driveInfo)); - hdd2->parOffset = d[i].dp_start + bsdd->d_partitions[x].p_offset + 1; + //hdd2->parOffset = d[i].dp_start + bsdd->d_partitions[x].p_offset; + hdd2->parOffset = bsdd->d_partitions[x].p_offset; devInfo2->info = hdd2; minor++; device_add(minor,'c',devInfo2); @@ -287,7 +286,6 @@ short transactionCount = 0x0; short *tmp = (short *)baseAddr; startSector += hdd->parOffset; - kprintf("SS: [0x%X], Count: [0x%X]\n",startSector,sectorCount); if (hdd->hdEnable == 0x0) { kprintf("Invalid Drive\n"); return; @@ -317,6 +315,7 @@ retVal >>= 8; retVal &= 0x0F; retVal |= (hdd->hdDev | 0xA0); //Test as per TJ + //retVal |= hdd->hdDev; //retVal |= (hdd->hdDev | 0xA0); //Test as per TJ outportByte(hdd->hdPort + hdHead,(retVal & 0xFF)); if (hdd->hdShift > 0) outportByte(hdd->hdPort + hdCmd,0xC4); @@ -346,6 +345,9 @@ /*** $Log$ + Revision 1.3 2006/10/09 02:58:05 reddawg + Fixing UFS + Revision 1.2 2006/10/06 15:48:01 reddawg Starting to make ubixos work with UFS2 diff --git a/src/sys/ufs/ufs.c b/src/sys/ufs/ufs.c index 58bf7fe..eabdbb6 100644 --- a/src/sys/ufs/ufs.c +++ b/src/sys/ufs/ufs.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -47,12 +48,8 @@ static int dskread(void *buf, u_int64_t block,size_t count,fileDescriptor *fd) { - char *blah = (char *)buf; fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,buf,block,count); - - kprintf("[%s]\n",blah); return(0x0); - //while (1); } struct dmadat { @@ -99,13 +96,10 @@ indbuf = dmadat->indbuf; fs = (struct fs *)dmadat->sbbuf; if (!dsk_meta) { - kprintf("NOT META\n"); inomap = 0; for (n = 0; sblock_try[n] != -1; n++) { - kprintf("a.dskread (%i:%i)\n",sblock_try[n] / DEV_BSIZE, SBLOCKSIZE / DEV_BSIZE); if (dskread(fs, sblock_try[n] / DEV_BSIZE, 16,fd)) return -1; - kprintf("mg: [0x%X]\n",fs->fs_magic); if (( #if defined(UFS1_ONLY) fs->fs_magic == FS_UFS1_MAGIC @@ -215,7 +209,6 @@ ssize_t n; fs_off = 0; - kprintf("FSREAD: [%s:%i]\n",name,ino); while ((n = fsread(*ino, buf, DEV_BSIZE,fd)) > 0) for (s = buf; s < buf + DEV_BSIZE;) { d = (void *)s; @@ -270,7 +263,12 @@ static int ufs_openFile(const char *file, fileDescriptor *fd) { - kprintf("Opening File: [%s][0x%X]\n",file,lookup(file,fd)); + char data[1024]; + int ino = 0; + ino = lookup(file,fd); + //kprintf("Opening File: [%s][0x%X]\n",file,ino); + fsread(ino,&data,4,fd); + kprintf("Data: [%s]\n",data); while (1); return(0x0); } @@ -285,7 +283,6 @@ *****************************************************************************************/ int ufs_initialize(vfs_mountPoint_t *mp) { - kprintf("Mounted\n"); /* Return */ return(0x1); } @@ -295,7 +292,7 @@ struct fileSystem ufs = {NULL, /* prev */ NULL, /* next */ - (void *)ufs_initialize, /* vfsInitFS */ + (void *)ufs_initialize, /* vfsInitFS */ NULL, /* vfsRead */ NULL, /* vfsWrite */ (void *)ufs_openFile, /* vfsOpenFile */ @@ -310,7 +307,7 @@ kpanic("Unable To Enable UFS"); return(0x1); } - + dmadat = (struct dmadat *)kmalloc(sizeof(struct dmadat)); /* Return */ return(0x0); }