aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/fs
diff options
context:
space:
mode:
authorMarvin Borner2020-05-16 16:21:42 +0200
committerMarvin Borner2020-05-16 16:21:42 +0200
commitf0ceac4c2e11a8cfd62ccb0a693178cae7c44d82 (patch)
treeb066967d068a6a686e42049b958a4e90c1f90202 /src/kernel/fs
parentffb7cb87593a5de58f7c5183020576dac9d50fc4 (diff)
Added page-aligned allocation for page-fix
Not completely finished!
Diffstat (limited to 'src/kernel/fs')
-rw-r--r--src/kernel/fs/elf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/kernel/fs/elf.c b/src/kernel/fs/elf.c
index ba9251a..3279784 100644
--- a/src/kernel/fs/elf.c
+++ b/src/kernel/fs/elf.c
@@ -51,8 +51,11 @@ struct process *elf_load(char *path)
strcpy(proc->name, path);
proc->registers.eip = header->entry;
+ log("1");
paging_switch_directory(proc->cr3);
+ log("2");
u32 stk = (u32)malloc(PAGE_SIZE);
+ log("3");
proc->registers.useresp = 0x40000000 - (PAGE_SIZE / 2);
proc->registers.ebp = proc->registers.useresp;
proc->registers.esp = proc->registers.useresp;
@@ -79,4 +82,4 @@ struct process *elf_load(char *path)
paging_switch_directory(prev_dir);
return proc;
-}
+} \ No newline at end of file