From 0ec5b4d78c0fa1e256577f22e4265fd8a9e12197 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Mon, 1 Dec 2014 00:03:04 +0100 Subject: Paging between 2 'tasks' loaded from ELF files. Both files are loaded at: 0x08048000 virutal! --- kernel/syscalls.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kernel/syscalls.c') diff --git a/kernel/syscalls.c b/kernel/syscalls.c index 0f06479..f328248 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -96,6 +96,7 @@ int syscall_lseek(int file,int ptr,int dir) int syscall_write(int file, char *buf, int len) { + //x86_int_disable(); #ifdef LOG_SYSCALLS log(FOOLOS_MODULE_NAME,FOOLOS_LOG_INFO,"write(file=%d, buf=0x%08X, len=%d)", file,buf,len); #endif @@ -107,6 +108,7 @@ int syscall_write(int file, char *buf, int len) { console_put_char_green(buf[i]); } + //x86_int_enable(); return len; } @@ -189,6 +191,7 @@ int syscall_fork() int syscall_execve(char *name, char **argv, char **env) { + //x86_int_disable(); // watchout this is called with esp in virtual memory of running process! #ifdef LOG_SYSCALLS @@ -308,6 +311,8 @@ int syscall_execve(char *name, char **argv, char **env) // push addr and return to it asm("push %0"::"r"(elf->e_entry)); + +// x86_int_enable(); asm("ret"); // this is never reached! -- cgit v1.2.3