about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-09-14 09:10:02 -0700
committerKartik Agaram <vc@akkartik.com>2019-09-14 09:10:02 -0700
commit852d31cf05d970dbf9d5eada89e6658116d04f5b (patch)
tree548d05b90d577160cc99b25ce804ca58166cac19
parent6614f9a2d88ca72591802bd370d9d7dd719f6f0f (diff)
downloadmu-852d31cf05d970dbf9d5eada89e6658116d04f5b.tar.gz
5654
https://github.com/ozkl/soso/commit/86e5ff58721c0bef0bb5688609b63876a7ea4279
-rw-r--r--kernel.soso/alloc.c12
-rw-r--r--kernel.soso/fatfilesystem.c28
-rw-r--r--kernel.soso/fs.c20
-rw-r--r--kernel.soso/isr.c4
-rw-r--r--kernel.soso/keyboard.c2
-rw-r--r--kernel.soso/process.c14
-rw-r--r--kernel.soso/random.c6
-rw-r--r--kernel.soso/syscalls.c28
-rw-r--r--kernel.soso/systemfs.c8
-rw-r--r--kernel.soso/ttydriver.c6
-rw-r--r--kernel.soso/vmm.c12
11 files changed, 70 insertions, 70 deletions
diff --git a/kernel.soso/alloc.c b/kernel.soso/alloc.c
index eceb3aa5..775bef40 100644
--- a/kernel.soso/alloc.c
+++ b/kernel.soso/alloc.c
@@ -27,7 +27,7 @@ void *ksbrkPage(int n)
     int i;
 
     if ((gKernelHeap + (n * PAGESIZE_4M)) > (char *) KERN_HEAP_END) {
-        //Screen_PrintF("ERROR: ksbrk(): no virtual memory left for kernel heap !\n");
+        //printkf("ERROR: ksbrk(): no virtual memory left for kernel heap !\n");
         return (char *) -1;
     }
 
@@ -37,7 +37,7 @@ void *ksbrkPage(int n)
     {
         p_addr = getPageFrame4M();
 
-        //Screen_PrintF("DEBUG: ksbrkPage(): got 4M on physical %x\n", p_addr);
+        //printkf("DEBUG: ksbrkPage(): got 4M on physical %x\n", p_addr);
 
         if ((int)(p_addr) < 0)
         {
@@ -208,14 +208,14 @@ void *sbrk(Process* process, int nBytes)
     {
         int remainingInThePage = process->heapNextUnallocatedPageBegin - process->heapEnd;
 
-        //Screen_PrintF("sbrk:2: remainingInThePage:%d\n", remainingInThePage);
+        //printkf("sbrk:2: remainingInThePage:%d\n", remainingInThePage);
 
         if (nBytes > remainingInThePage)
         {
             int bytesNeededInNewPages = nBytes - remainingInThePage;
             int neededNewPageCount = (bytesNeededInNewPages / PAGESIZE_4M) + 1;
 
-            //Screen_PrintF("sbrk:3: neededNewPageCount:%d\n", neededNewPageCount);
+            //printkf("sbrk:3: neededNewPageCount:%d\n", neededNewPageCount);
 
             uint32 freePages = getFreePageCount();
             if ((uint32)neededNewPageCount + 1 > freePages)
@@ -232,14 +232,14 @@ void *sbrk(Process* process, int nBytes)
 
         int remainingInThePage = process->heapEnd - currentPageBegin;
 
-        //Screen_PrintF("sbrk:4: remainingInThePage:%d\n", remainingInThePage);
+        //printkf("sbrk:4: remainingInThePage:%d\n", remainingInThePage);
 
         if (-nBytes > remainingInThePage)
         {
             int bytesInPreviousPages = -nBytes - remainingInThePage;
             int neededNewPageCount = (bytesInPreviousPages / PAGESIZE_4M) + 1;
 
-            //Screen_PrintF("sbrk:5: neededNewPageCount:%d\n", neededNewPageCount);
+            //printkf("sbrk:5: neededNewPageCount:%d\n", neededNewPageCount);
 
             sbrkPage(process, -neededNewPageCount);
         }
diff --git a/kernel.soso/fatfilesystem.c b/kernel.soso/fatfilesystem.c
index 9704824e..cb163d19 100644
--- a/kernel.soso/fatfilesystem.c
+++ b/kernel.soso/fatfilesystem.c
@@ -92,11 +92,11 @@ static BOOL mount(const char* sourcePath, const char* targetPath, uint32 flags,
                 FATFS* fatFs = (FATFS*)kmalloc(sizeof(FATFS));
                 //uint8 work[512];
                 //FRESULT fr = f_mkfs("", FM_FAT | FM_SFD, 512, work, 512);
-                //Screen_PrintF("f_mkfs: %d\n", fr);
+                //printkf("f_mkfs: %d\n", fr);
                 char path[8];
                 sprintf(path, "%d:", volume);
                 FRESULT fr = f_mount(fatFs, path, 1);
-                //Screen_PrintF("f_mount: fr:%d drv:%d\n", fr, fatFs->pdrv);
+                //printkf("f_mount: fr:%d drv:%d\n", fr, fatFs->pdrv);
 
                 if (FR_OK == fr)
                 {
@@ -143,7 +143,7 @@ static FileSystemDirent* readdir(FileSystemNode *node, uint32 index)
     //when node is the root of mounted filesystem,
     //node->mountSource is the source node (eg. disk partition /dev/hd1p1)
 
-    //Screen_PrintF("readdir1: node->name:%s\n", node->name);
+    //printkf("readdir1: node->name:%s\n", node->name);
 
     uint8 targetPath[128];
 
@@ -182,7 +182,7 @@ static FileSystemDirent* readdir(FileSystemNode *node, uint32 index)
     strcpyNonNull((char*)(targetPath + charIndex), number);
     uint8* target = targetPath + charIndex;
 
-    //Screen_PrintF("readdir: targetpath:[%s]\n", target);
+    //printkf("readdir: targetpath:[%s]\n", target);
 
     DIR dir;
     FRESULT fr = f_opendir(&dir, (TCHAR*)target);
@@ -226,7 +226,7 @@ static FileSystemNode* finddir(FileSystemNode *node, char *name)
     //when node is the root of mounted filesystem,
     //node->mountSource is the source node (eg. disk partition /dev/hd1p1)
 
-    //Screen_PrintF("finddir1: node->name:%s name:%s\n", node->name, name);
+    //printkf("finddir1: node->name:%s name:%s\n", node->name, name);
 
     FileSystemNode* child = node->firstChild;
     while (NULL != child)
@@ -283,7 +283,7 @@ static FileSystemNode* finddir(FileSystemNode *node, char *name)
     strcpyNonNull((char*)(targetPath + charIndex), number);
     uint8* target = targetPath + charIndex;
 
-    //Screen_PrintF("finddir: targetpath:[%s]\n", target);
+    //printkf("finddir: targetpath:[%s]\n", target);
 
     FILINFO fileInfo;
     memset((uint8*)&fileInfo, 0, sizeof(FILINFO));
@@ -328,12 +328,12 @@ static FileSystemNode* finddir(FileSystemNode *node, char *name)
             child->nextSibling = newNode;
         }
 
-        //Screen_PrintF("finddir: returning [%s]\n", name);
+        //printkf("finddir: returning [%s]\n", name);
         return newNode;
     }
     else
     {
-        //Screen_PrintF("finddir error: fr: %d]\n", fr);
+        //printkf("finddir error: fr: %d]\n", fr);
     }
 
     return NULL;
@@ -351,7 +351,7 @@ static int32 read(File *file, uint32 size, uint8 *buffer)
     UINT br = 0;
     FRESULT fr = f_read(f, buffer, size, &br);
     file->offset = f->fptr;
-    //Screen_PrintF("fat read: name:%s size:%d hasRead:%d, fr:%d\n", file->node->name, size, br, fr);
+    //printkf("fat read: name:%s size:%d hasRead:%d, fr:%d\n", file->node->name, size, br, fr);
     if (FR_OK == fr)
     {
         return br;
@@ -419,7 +419,7 @@ static int32 lseek(File *file, int32 offset, int32 whence)
 
 static int32 stat(FileSystemNode *node, struct stat* buf)
 {
-    //Screen_PrintF("fat stat [%s]\n", node->name);
+    //printkf("fat stat [%s]\n", node->name);
 
     uint8 targetPath[128];
 
@@ -457,7 +457,7 @@ static int32 stat(FileSystemNode *node, struct stat* buf)
     strcpyNonNull((char*)(targetPath + charIndex), number);
     uint8* target = targetPath + charIndex;
 
-    //Screen_PrintF("fat stat target:[%s]\n", target);
+    //printkf("fat stat target:[%s]\n", target);
 
     FILINFO fileInfo;
     memset((uint8*)&fileInfo, 0, sizeof(FILINFO));
@@ -483,7 +483,7 @@ static int32 stat(FileSystemNode *node, struct stat* buf)
 
 static BOOL open(File *file, uint32 flags)
 {
-    //Screen_PrintF("fat open %s\n", file->node->name);
+    //printkf("fat open %s\n", file->node->name);
 
     FileSystemNode *node = file->node;
 
@@ -528,7 +528,7 @@ static BOOL open(File *file, uint32 flags)
     strcpyNonNull((char*)(targetPath + charIndex), number);
     uint8* target = targetPath + charIndex;
 
-    //Screen_PrintF("fat open %s\n", target);
+    //printkf("fat open %s\n", target);
 
     int fatfsMode = FA_READ;
 
@@ -597,7 +597,7 @@ DRESULT disk_read (
     UINT count			/* Number of sectors to read */
 )
 {
-    //Screen_PrintF("disk_read() drv:%d sector:%d count:%d\n", pdrv, sector, count);
+    //printkf("disk_read() drv:%d sector:%d count:%d\n", pdrv, sector, count);
 
     if (gMountedBlockDevices[pdrv] == NULL) return RES_NOTRDY;
 
diff --git a/kernel.soso/fs.c b/kernel.soso/fs.c
index d284b88f..b681ba3a 100644
--- a/kernel.soso/fs.c
+++ b/kernel.soso/fs.c
@@ -88,7 +88,7 @@ int getFileSystemNodePath(FileSystemNode *node, char* buffer, uint32 bufferSize)
 
     int len = 127 - charIndex;
 
-    //Screen_PrintF("getFileSystemNodePath: len:[%s] %d\n", targetPath + charIndex, len);
+    //printkf("getFileSystemNodePath: len:[%s] %d\n", targetPath + charIndex, len);
 
     if (bufferSize < len)
     {
@@ -238,7 +238,7 @@ File *open_fs_forProcess(Thread* thread, FileSystemNode *node, uint32 flags)
 
         if (success)
         {
-            //Screen_PrintF("Opened:%s\n", file->node->name);
+            //printkf("Opened:%s\n", file->node->name);
             int32 fd = addFileToProcess(file->process, file);
 
             if (fd < 0)
@@ -361,7 +361,7 @@ int32 stat_fs(FileSystemNode *node, struct stat *buf)
 
 FileSystemDirent *readdir_fs(FileSystemNode *node, uint32 index)
 {
-    //Screen_PrintF("readdir_fs: node->name:%s index:%d\n", node->name, index);
+    //printkf("readdir_fs: node->name:%s index:%d\n", node->name, index);
 
     if ( (node->nodeType & FT_MountPoint) == FT_MountPoint && node->mountPoint != NULL )
     {
@@ -384,7 +384,7 @@ FileSystemDirent *readdir_fs(FileSystemNode *node, uint32 index)
 
 FileSystemNode *finddir_fs(FileSystemNode *node, char *name)
 {
-    //Screen_PrintF("finddir_fs: name:%s\n", name);
+    //printkf("finddir_fs: name:%s\n", name);
 
     if ( (node->nodeType & FT_MountPoint) == FT_MountPoint && node->mountPoint != NULL )
     {
@@ -444,7 +444,7 @@ BOOL munmap_fs(File* file, void* address, uint32 size)
 
 FileSystemNode *getFileSystemNode(const char *path)
 {
-    //Screen_PrintF("getFileSystemNode:%s *0\n", path);
+    //printkf("getFileSystemNode:%s *0\n", path);
 
     if (path[0] != '/')
     {
@@ -472,7 +472,7 @@ FileSystemNode *getFileSystemNode(const char *path)
 
 
 
-    //Screen_PrintF("getFileSystemNode:%s *1\n", path);
+    //printkf("getFileSystemNode:%s *1\n", path);
 
     FileSystemNode* root = getFileSystemRootNode();
 
@@ -485,7 +485,7 @@ FileSystemNode *getFileSystemNode(const char *path)
 
     FileSystemNode* node = root;
 
-    //Screen_PrintF("getFileSystemNode:%s *2\n", path);
+    //printkf("getFileSystemNode:%s *2\n", path);
 
     char buffer[64];
 
@@ -514,11 +514,11 @@ FileSystemNode *getFileSystemNode(const char *path)
             strcpy(buffer, inputPath);
         }
 
-        //Screen_PrintF("getFileSystemNode:%s *3\n", path);
+        //printkf("getFileSystemNode:%s *3\n", path);
 
         node = finddir_fs(node, buffer);
 
-        //Screen_PrintF("getFileSystemNode:%s *4\n", path);
+        //printkf("getFileSystemNode:%s *4\n", path);
 
         if (NULL == node)
         {
@@ -559,7 +559,7 @@ FileSystemNode* getFileSystemNodeAbsoluteOrRelative(const char* path, Process* p
                     strcat(buffer, "/");
                     strcat(buffer, path);
 
-                    //Screen_PrintF("getFileSystemNodeAbsoluteOrRelative:[%s]\n", buffer);
+                    //printkf("getFileSystemNodeAbsoluteOrRelative:[%s]\n", buffer);
 
                     node = getFileSystemNode(buffer);
                 }
diff --git a/kernel.soso/isr.c b/kernel.soso/isr.c
index b5fe81f0..0d031d1e 100644
--- a/kernel.soso/isr.c
+++ b/kernel.soso/isr.c
@@ -13,7 +13,7 @@ void registerInterruptHandler(uint8 n, IsrFunction handler)
 
 void handleISR(Registers regs)
 {
-    //Screen_PrintF("handleISR interrupt no:%d\n", regs.int_no);
+    //printkf("handleISR interrupt no:%d\n", regs.int_no);
 
     uint8 int_no = regs.interruptNumber & 0xFF;
 
@@ -41,7 +41,7 @@ void handleIRQ(Registers regs)
 
     outb(0x20, 0x20);
 
-    //Screen_PrintF("irq: %d\n", regs.int_no);
+    //printkf("irq: %d\n", regs.int_no);
 
     if (gInterruptHandlers[regs.interruptNumber] != 0)
     {
diff --git a/kernel.soso/keyboard.c b/kernel.soso/keyboard.c
index 8e34ca0e..affd70a5 100644
--- a/kernel.soso/keyboard.c
+++ b/kernel.soso/keyboard.c
@@ -76,7 +76,7 @@ static BOOL keyboard_open(File *file, uint32 flags)
 
 static void keyboard_close(File *file)
 {
-    //Screen_PrintF("keyboard_close\n");
+    //printkf("keyboard_close\n");
 
     Reader* reader = (Reader*)file->privateData;
 
diff --git a/kernel.soso/process.c b/kernel.soso/process.c
index 469269f0..b57ada46 100644
--- a/kernel.soso/process.c
+++ b/kernel.soso/process.c
@@ -149,16 +149,16 @@ static void copyArgvEnvToProcess(char *const argv[], char *const envp[])
     char** destination = (char**)USER_ARGV_ENV_LOC;
     int destinationIndex = 0;
 
-    //Screen_PrintF("ARGVENV: destination:%x\n", destination);
+    //printkf("ARGVENV: destination:%x\n", destination);
 
     int argvCount = getStringArrayItemCount(argv);
     int envpCount = getStringArrayItemCount(envp);
 
-    //Screen_PrintF("ARGVENV: argvCount:%d envpCount:%d\n", argvCount, envpCount);
+    //printkf("ARGVENV: argvCount:%d envpCount:%d\n", argvCount, envpCount);
 
     char* stringTable = (char*)USER_ARGV_ENV_LOC + sizeof(char*) * (argvCount + envpCount + 2);
 
-    //Screen_PrintF("ARGVENV: stringTable:%x\n", stringTable);
+    //printkf("ARGVENV: stringTable:%x\n", stringTable);
 
     for (int i = 0; i < argvCount; ++i)
     {
@@ -453,7 +453,7 @@ void threadStateToString(ThreadState state, uint8* buffer, uint32 bufferSize)
 
 void waitForSchedule()
 {
-    //Screen_PrintF("Waiting for a schedule()\n");
+    //printkf("Waiting for a schedule()\n");
 
     enableInterrupts();
     while (TRUE)
@@ -502,11 +502,11 @@ int32 addFileToProcess(Process* process, File* file)
 
     beginCriticalSection();
 
-    //Screen_PrintF("addFileToProcess: pid:%d\n", process->pid);
+    //printkf("addFileToProcess: pid:%d\n", process->pid);
 
     for (int i = 0; i < MAX_OPENED_FILES; ++i)
     {
-        //Screen_PrintF("addFileToProcess: i:%d fd[%d]:%x\n", i, i, process->fd[i]);
+        //printkf("addFileToProcess: i:%d fd[%d]:%x\n", i, i, process->fd[i]);
         if (process->fd[i] == NULL)
         {
             result = i;
@@ -739,7 +739,7 @@ void schedule(TimerInt_Registers* registers)
     /*
     if (gCurrentThread->threadId == 5)
     {
-        Screen_PrintF("I am scheduling to %d and its EIP is %x\n", gCurrentThread->threadId, gCurrentThread->regs.eip);
+        printkf("I am scheduling to %d and its EIP is %x\n", gCurrentThread->threadId, gCurrentThread->regs.eip);
     }
     */
 
diff --git a/kernel.soso/random.c b/kernel.soso/random.c
index 0c231793..2238f1a1 100644
--- a/kernel.soso/random.c
+++ b/kernel.soso/random.c
@@ -32,11 +32,11 @@ static int32 random_read(File *file, uint32 size, uint8 *buffer)
         return 0;
     }
 
-    //Screen_PrintF("random_read: calling sleep\n");
+    //printkf("random_read: calling sleep\n");
 
     //sleep(10000);
 
-    //Screen_PrintF("random_read: returned from sleep\n");
+    //printkf("random_read: returned from sleep\n");
 
     uint32 number = rand();
 
@@ -52,7 +52,7 @@ static int32 random_read(File *file, uint32 size, uint8 *buffer)
     }
     else if (size >= 4)
     {
-        //Screen_PrintF("random_read: buffer is %x, writing %x to buffer\n", buffer, number);
+        //printkf("random_read: buffer is %x, writing %x to buffer\n", buffer, number);
 
         *((uint32*)buffer) = number;
         return 4;
diff --git a/kernel.soso/syscalls.c b/kernel.soso/syscalls.c
index a213525a..d1e8ffd1 100644
--- a/kernel.soso/syscalls.c
+++ b/kernel.soso/syscalls.c
@@ -127,7 +127,7 @@ static void handleSyscall(Registers* regs)
         return;
     }
 
-    //Screen_PrintF("We are in syscall_handler\n");
+    //printkf("We are in syscall_handler\n");
     //Screen_PrintInterruptsEnabled();
 
     //I think it is better to enable interrupts in syscall implementations if it is needed.
@@ -154,11 +154,11 @@ int syscall_open(const char *pathname, int flags)
     Process* process = getCurrentThread()->owner;
     if (process)
     {
-        //Screen_PrintF("open():[%s]\n", pathname);
+        //printkf("open():[%s]\n", pathname);
         FileSystemNode* node = getFileSystemNodeAbsoluteOrRelative(pathname, process);
         if (node)
         {
-            //Screen_PrintF("open():node:[%s]\n", node->name);
+            //printkf("open():node:[%s]\n", node->name);
             File* file = open_fs(node, flags);
 
             if (file)
@@ -206,7 +206,7 @@ int syscall_close(int fd)
 
 int syscall_read(int fd, void *buf, int nbytes)
 {
-    //Screen_PrintF("syscall_read: begin - nbytes:%d\n", nbytes);
+    //printkf("syscall_read: begin - nbytes:%d\n", nbytes);
 
     Process* process = getCurrentThread()->owner;
     if (process)
@@ -249,7 +249,7 @@ int syscall_write(int fd, void *buf, int nbytes)
     Process* process = getCurrentThread()->owner;
     if (process)
     {
-        //Screen_PrintF("syscall_write() called from process: %d. fd:%d\n", process->pid, fd);
+        //printkf("syscall_write() called from process: %d. fd:%d\n", process->pid, fd);
 
         if (fd < MAX_OPENED_FILES)
         {
@@ -291,7 +291,7 @@ int syscall_lseek(int fd, int offset, int whence)
     Process* process = getCurrentThread()->owner;
     if (process)
     {
-        //Screen_PrintF("syscall_lseek() called from process: %d. fd:%d\n", process->pid, fd);
+        //printkf("syscall_lseek() called from process: %d. fd:%d\n", process->pid, fd);
 
         if (fd < MAX_OPENED_FILES)
         {
@@ -324,7 +324,7 @@ int syscall_stat(const char *path, struct stat *buf)
     Process* process = getCurrentThread()->owner;
     if (process)
     {
-        //Screen_PrintF("syscall_stat() called from process: %d. path:%s\n", process->pid, path);
+        //printkf("syscall_stat() called from process: %d. path:%s\n", process->pid, path);
 
         FileSystemNode* node = getFileSystemNodeAbsoluteOrRelative(path, process);
 
@@ -432,7 +432,7 @@ int syscall_exit(int status)
 
 void* syscall_sbrk(uint32 increment)
 {
-    //Screen_PrintF("syscall_sbrk() !!! inc:%d\n", increment);
+    //printkf("syscall_sbrk() !!! inc:%d\n", increment);
 
     Process* process = getCurrentThread()->owner;
     if (process)
@@ -488,11 +488,11 @@ int syscall_execute(const char *path, char *const argv[], char *const envp[])
                 printkf("file found\n");
                 void* image = kmalloc(node->length);
 
-                //Screen_PrintF("executing %s and its %d bytes\n", filename, node->length);
+                //printkf("executing %s and its %d bytes\n", filename, node->length);
 
                 int32 bytesRead = read_fs(f, node->length, image);
 
-                //Screen_PrintF("syscall_execute: read_fs returned %d bytes\n", bytesRead);
+                //printkf("syscall_execute: read_fs returned %d bytes\n", bytesRead);
 
                 if (bytesRead > 0)
                 {
@@ -535,11 +535,11 @@ int syscall_executeOnTTY(const char *path, char *const argv[], char *const envp[
             {
                 void* image = kmalloc(node->length);
 
-                //Screen_PrintF("executing %s and its %d bytes\n", filename, node->length);
+                //printkf("executing %s and its %d bytes\n", filename, node->length);
 
                 int32 bytesRead = read_fs(f, node->length, image);
 
-                //Screen_PrintF("syscall_execute: read_fs returned %d bytes\n", bytesRead);
+                //printkf("syscall_execute: read_fs returned %d bytes\n", bytesRead);
 
                 if (bytesRead > 0)
                 {
@@ -743,7 +743,7 @@ int syscall_mkdir(const char *path, uint32 mode)
         return -1;
     }
 
-    //Screen_PrintF("mkdir: parent:[%s] name:[%s]\n", parentPath, name);
+    //printkf("mkdir: parent:[%s] name:[%s]\n", parentPath, name);
 
     FileSystemNode* targetNode = getFileSystemNode(parentPath);
 
@@ -778,7 +778,7 @@ int syscall_getdents(int fd, char *buf, int nbytes)
 
             if (file)
             {
-                //Screen_PrintF("syscall_getdents(%d): %s\n", process->pid, buf);
+                //printkf("syscall_getdents(%d): %s\n", process->pid, buf);
 
                 int byteCounter = 0;
 
diff --git a/kernel.soso/systemfs.c b/kernel.soso/systemfs.c
index 537c015d..4765868f 100644
--- a/kernel.soso/systemfs.c
+++ b/kernel.soso/systemfs.c
@@ -139,11 +139,11 @@ static FileSystemDirent *systemfs_readdir(FileSystemNode *node, uint32 index)
 
     FileSystemNode* child = node->firstChild;
 
-    //Screen_PrintF("systemfs_readdir-main:%s index:%d\n", node->name, index);
+    //printkf("systemfs_readdir-main:%s index:%d\n", node->name, index);
 
     while (NULL != child)
     {
-        //Screen_PrintF("systemfs_readdir-child:%s\n", child->name);
+        //printkf("systemfs_readdir-child:%s\n", child->name);
         if (counter == index)
         {
             strcpy(gDirent.name, child->name);
@@ -162,14 +162,14 @@ static FileSystemDirent *systemfs_readdir(FileSystemNode *node, uint32 index)
 
 static FileSystemNode *systemfs_finddir(FileSystemNode *node, char *name)
 {
-    //Screen_PrintF("systemfs_finddir-main:%s requestedName:%s\n", node->name, name);
+    //printkf("systemfs_finddir-main:%s requestedName:%s\n", node->name, name);
 
     FileSystemNode* child = node->firstChild;
     while (NULL != child)
     {
         if (strcmp(name, child->name) == 0)
         {
-            //Screen_PrintF("systemfs_finddir-found:%s\n", name);
+            //printkf("systemfs_finddir-found:%s\n", name);
             return child;
         }
 
diff --git a/kernel.soso/ttydriver.c b/kernel.soso/ttydriver.c
index e125a051..b2f19542 100644
--- a/kernel.soso/ttydriver.c
+++ b/kernel.soso/ttydriver.c
@@ -390,7 +390,7 @@ void sendKeyInputToTTY(Tty* tty, uint8 scancode)
 
 static BOOL tty_open(File *file, uint32 flags)
 {
-    //Screen_PrintF("tty_open: pid:%d\n", file->process->pid);
+    //printkf("tty_open: pid:%d\n", file->process->pid);
 
     Tty* tty = (Tty*)file->node->privateNodeData;
 
@@ -642,7 +642,7 @@ static void processScancode(uint8 scancode)
             break;
         }
 
-        //Screen_PrintF("released: %x (%d)\n", scancode, scancode);
+        //printkf("released: %x (%d)\n", scancode, scancode);
     }
     else
     {
@@ -664,7 +664,7 @@ static void processScancode(uint8 scancode)
             break;
         }
 
-        //Screen_PrintF("pressed: %x (%d)\n", scancode, scancode);
+        //printkf("pressed: %x (%d)\n", scancode, scancode);
 
         applyModifierKeys(gKeyModifier, scancode);
     }
diff --git a/kernel.soso/vmm.c b/kernel.soso/vmm.c
index 43d28110..740763b3 100644
--- a/kernel.soso/vmm.c
+++ b/kernel.soso/vmm.c
@@ -114,7 +114,7 @@ uint32* getPdFromReservedArea4K()
     int byte, bit;
     int page = -1;
 
-    //Screen_PrintF("DEBUG: getPdFromReservedArea4K() begin\n");
+    //printkf("DEBUG: getPdFromReservedArea4K() begin\n");
 
     for (byte = 0; byte < RAM_AS_4K_PAGES / 8; byte++)
     {
@@ -126,7 +126,7 @@ uint32* getPdFromReservedArea4K()
                 {
                     page = 8 * byte + bit;
                     SET_PAGEHEAP_USED(page);
-                    //Screen_PrintF("DEBUG: getPdFromReservedArea4K() found pageIndex:%d\n", page);
+                    //printkf("DEBUG: getPdFromReservedArea4K() found pageIndex:%d\n", page);
                     return (uint32 *) (page * PAGESIZE_4K);
                 }
             }
@@ -212,7 +212,7 @@ uint32 *copyPd(uint32* pd)
 
             uint32 vAddr =  (i * 4) << 20;
 
-            //Screen_PrintF("Copied page virtual %x\n", vAddr);
+            //printkf("Copied page virtual %x\n", vAddr);
 
             addPageToPd(newPd, (char*)vAddr, newPagePhysical, PG_USER);
         }
@@ -230,7 +230,7 @@ BOOL addPageToPd(uint32* pd, char *v_addr, char *p_addr, int flags)
 {
     uint32 *pde = NULL;
 
-    //Screen_PrintF("DEBUG: addPageToPd(): v_addr:%x p_addr:%x flags:%x\n", v_addr, p_addr, flags);
+    //printkf("DEBUG: addPageToPd(): v_addr:%x p_addr:%x flags:%x\n", v_addr, p_addr, flags);
 
 
     int index = (((uint32) v_addr & 0xFFC00000) >> 22);
@@ -242,10 +242,10 @@ BOOL addPageToPd(uint32* pd, char *v_addr, char *p_addr, int flags)
         return FALSE;
     }
 
-    //Screen_PrintF("addPageToPd(): index:%d pde:%x\n", index, pde);
+    //printkf("addPageToPd(): index:%d pde:%x\n", index, pde);
 
     *pde = ((uint32) p_addr) | (PG_PRESENT | PG_4MB | PG_WRITE | flags);
-    //Screen_PrintF("pde:%x *pde:%x\n", pde, *pde);
+    //printkf("pde:%x *pde:%x\n", pde, *pde);
 
     SET_PAGEFRAME_USED(gPhysicalPageFrameBitmap, PAGE_INDEX_4M((uint32)p_addr));