aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMarvin Borner2020-08-16 15:35:43 +0200
committerMarvin Borner2020-08-16 15:35:43 +0200
commit36e36fae364dec02999f58edbe997780d901b674 (patch)
tree8b06909e475ef84201ca2ef9375880249b1d5e68 /kernel
parentc4a0bc2571162ad83fc51eb823f1c535336041bf (diff)
Added WM and exec parameters
Diffstat (limited to 'kernel')
-rw-r--r--kernel/features/proc.c2
-rw-r--r--kernel/features/syscall.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/kernel/features/proc.c b/kernel/features/proc.c
index f59ff32..f6e1fe6 100644
--- a/kernel/features/proc.c
+++ b/kernel/features/proc.c
@@ -49,7 +49,7 @@ void scheduler(struct regs *regs)
regs->cs = GDT_USER_CODE_OFFSET;
regs->eflags = EFLAGS_ALWAYS | EFLAGS_INTERRUPTS;
}
- printf("%d", current->pid);
+ /* printf("%d", current->pid); */
}
void proc_print()
diff --git a/kernel/features/syscall.c b/kernel/features/syscall.c
index b486deb..e6bcb83 100644
--- a/kernel/features/syscall.c
+++ b/kernel/features/syscall.c
@@ -39,6 +39,10 @@ void syscall_handler(struct regs *r)
case SYS_EXEC: {
char *path = (char *)r->ebx;
struct proc *proc = proc_make();
+ ((u32 *)proc->regs.esp)[0] = r->ecx;
+ ((u32 *)proc->regs.esp)[1] = r->edx;
+ ((u32 *)proc->regs.esp)[2] = r->esi;
+ ((u32 *)proc->regs.esp)[3] = r->edi;
r->eax = bin_load(path, proc);
break;
}