From 463736887fbb6439fe5e676f6fd7990adc6bb727 Mon Sep 17 00:00:00 2001 From: Michal Idziorek Date: Thu, 23 Oct 2014 08:41:34 +0200 Subject: added execve syscall --- kernel/kernel.c | 6 +----- kernel/syscalls.c | 46 ++++++++++++++++++++++------------------------ 2 files changed, 23 insertions(+), 29 deletions(-) (limited to 'kernel') diff --git a/kernel/kernel.c b/kernel/kernel.c index 23246e1..208d1cd 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -197,11 +197,7 @@ void kernel_main(uint32_t initial_stack, int mp) //vesa_init_doublebuff(); ext2_check(0x80800); - ext2_inode_content(0x80800,15,0x100000,0x100000); - - // autorun "user-space" prog - asm("push $0x100000"); - asm("ret"); + syscall_execve(15,0,0); // Just hang around here, if its reached. // we do our tasks anyway. on the next clock tick. diff --git a/kernel/syscalls.c b/kernel/syscalls.c index 0fe1542..564a604 100644 --- a/kernel/syscalls.c +++ b/kernel/syscalls.c @@ -6,6 +6,7 @@ // int syscall_write(int file, char *buf, int len) { + // ALL output to stdout for(int i=0;i