diff --git a/Kernel/Makefile.BuildNum b/Kernel/Makefile.BuildNum index 188cc18d98f95bba4c0672f23d3ea95b64533958..65deeabc7301ea193f90c4bc6aa0d66c093de835 100644 --- a/Kernel/Makefile.BuildNum +++ b/Kernel/Makefile.BuildNum @@ -1 +1 @@ -BUILD_NUM = 1080 +BUILD_NUM = 1084 diff --git a/Kernel/drv/dma.c b/Kernel/drv/dma.c index 0fae172bf709c33f535c21753fba51690ba924bd..246ab46b54997c90d740943d491c8c628ced4b52 100644 --- a/Kernel/drv/dma.c +++ b/Kernel/drv/dma.c @@ -32,7 +32,7 @@ t_dmaChannel dma_channels[8]; */ void DMA_Install() { - int i; + Uint i; for(i=8;i--;) { outb( cMASKPORT[i], 0x04 | (i & 0x3) ); // mask channel @@ -49,32 +49,32 @@ void DMA_Install() dma_channels[i].mode = 0; dma_addresses[i] = (char*)DMA_ADDRESS(i); - dma_addresses[i] += 0xC0000000; + dma_addresses[i] += KERNEL_BASE; } } /** - * \fn void DMA_SetChannel(int channel, int length, int read) + * \fn void DMA_SetChannel(int Channel, int length, int read) * \brief Set DMA Channel Length and RW */ -void DMA_SetChannel(int channel, int length, int read) +void DMA_SetChannel(int Channel, int length, int read) { - channel &= 7; - read = read && 1; + Uint chan = Channel & 7; + read = !!read; if(length > DMA_SIZE) length = DMA_SIZE; length --; //Adjust for DMA //__asm__ __volatile__ ("cli"); - outb( cMASKPORT[channel], 0x04 | (channel & 0x3) ); // mask channel - outb( cCLEARPORT[channel], 0x00 ); - outb( cMODEPORT[channel], (0x44 + (!read)*4) | (channel & 0x3) ); - outb( cADDRPORT[channel], LOWB(DMA_ADDRESS(channel)) ); // send address - outb( cADDRPORT[channel], HIB(DMA_ADDRESS(channel)) ); // send address - outb( cPAGEPORT[channel], HIW(DMA_ADDRESS(channel)) ); // send page - outb( cCOUNTPORT[channel], LOWB(length) ); // send size - outb( cCOUNTPORT[channel], HIB(length) ); // send size - outb( cMASKPORT[channel], channel & 0x3 ); // unmask channel - dma_addresses[channel] = (char*)DMA_ADDRESS(channel); - dma_addresses[channel] += 0xC0000000; + outb( cMASKPORT[chan], 0x04 | (chan & 0x3) ); // mask channel + outb( cCLEARPORT[chan], 0x00 ); + outb( cMODEPORT[chan], (0x44 + (!read)*4) | (chan & 0x3) ); + outb( cADDRPORT[chan], LOWB(DMA_ADDRESS(chan)) ); // send address + outb( cADDRPORT[chan], HIB(DMA_ADDRESS(chan)) ); // send address + outb( cPAGEPORT[chan], HIW(DMA_ADDRESS(chan)) ); // send page + outb( cCOUNTPORT[chan], LOWB(length) ); // send size + outb( cCOUNTPORT[chan], HIB(length) ); // send size + outb( cMASKPORT[chan], chan & 0x3 ); // unmask channel + dma_addresses[chan] = (char*)DMA_ADDRESS(chan); + dma_addresses[chan] += KERNEL_BASE; //__asm__ __volatile__ ("sti"); } diff --git a/Kernel/vfs/nodecache.c b/Kernel/vfs/nodecache.c index c503e9cb5b18a2a6235c301ad2511e2ec4bc461c..b1b1b61cee04067b15c707726074645b3d6c817f 100644 --- a/Kernel/vfs/nodecache.c +++ b/Kernel/vfs/nodecache.c @@ -158,7 +158,7 @@ void Inode_UncacheNode(int Handle, Uint64 Inode) void Inode_ClearCache(int Handle) { tInodeCache *cache; - tInodeCache *prev = (tInodeCache*) &gVFS_InodeCache; + tInodeCache *prev = NULL; tCachedInode *ent, *next; // Find the cache @@ -184,7 +184,10 @@ void Inode_ClearCache(int Handle) } // Free Cache - prev->Next = cache->Next; + if(prev == NULL) + gVFS_InodeCache = cache->Next; + else + prev->Next = cache->Next; free(cache); } diff --git a/Makefile.cfg b/Makefile.cfg index 3875828f539ef603dea5a49f522ce14d8be14810..3f06360fb9c7c3a74e3c0a96efda696ded4bf5ce 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -26,4 +26,4 @@ MODULES = UDI FS_Ext2 FDD NE2000 BochsGA #DISTROOT = /mnt/AcessHDD/Acess2 #DISTROOT = ~/Projects/Acess2/Filesystem DISTROOT = a:/Acess2 -ACESSDIR = /home/hodgeja/Projects/Acess2 +ACESSDIR = /home/tpg/Projects/Acess2 diff --git a/README b/README index fa3fd3e7a1791e7880f7fe78ec96f548bdc48cb7..4fb8be16fe9f4f46d02667bdd2f6c56bfed5fe31 100644 --- a/README +++ b/README @@ -42,6 +42,8 @@ MODULES defines what modules should be statically linked with the kernel Set the source root directory (ACESSDIR) and the destination directory (DISTROOT). +To be able to build usermode programs, Usermode/Libraries/acess.ld needs + to be edited to change the SEARCH_DIR directive to the correct path. You may also want to edit Usermode/Filesystem/Conf/BootConf.cfg before installing. diff --git a/Usermode/Applications/Makefile.cfg b/Usermode/Applications/Makefile.cfg index 146177dd256f9312c2ff8e6da3ae5a81ef8738e7..fd8bc45121d0961d89ed9bd1fac075d0d770341b 100644 --- a/Usermode/Applications/Makefile.cfg +++ b/Usermode/Applications/Makefile.cfg @@ -6,9 +6,9 @@ if $(ACESSDIR) == "" then -include ../../../../Makefile.cfg #endif -ACESSDIR := $(ACESSDIR)/Usermode +ACESSUSERDIR := $(ACESSDIR)/Usermode ASFLAGS = -felf -CPPFLAGS = -I$(ACESSDIR)/include/ +CPPFLAGS = -I$(ACESSUSERDIR)/include/ CFLAGS = -fno-stack-protector $(CPPFLAGS) -LDFLAGS = -T $(ACESSDIR)/Libraries/acess.ld -L $(ACESSDIR)/Libraries -I /Acess/Libs/ld-acess.so -lc +LDFLAGS = -T $(ACESSUSERDIR)/Libraries/acess.ld -L $(ACESSUSERDIR)/Libraries -I /Acess/Libs/ld-acess.so -lc diff --git a/Usermode/Filesystem/Conf/BootConf.cfg b/Usermode/Filesystem/Conf/BootConf.cfg old mode 100755 new mode 100644 diff --git a/Usermode/Libraries/acess.ld b/Usermode/Libraries/acess.ld index adf7b2a0a91552d3a3763d7c30c7bda7b4549da5..aa2edd3f3f7006c215655b20d9a52ca8d21aad1e 100644 --- a/Usermode/Libraries/acess.ld +++ b/Usermode/Libraries/acess.ld @@ -1,7 +1,7 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) ENTRY(start) -SEARCH_DIR(/home/hodgeja/Projects/Acess2/Usermode/Libraries) +SEARCH_DIR(/home/tpg/Projects/Acess2/Usermode/Libraries) INPUT(-lacess crt0.o) SECTIONS {