aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/kernel.c
diff options
context:
space:
mode:
authorMarvin Borner2019-12-21 12:25:14 +0100
committerMarvin Borner2019-12-21 12:25:14 +0100
commit38610cd06dc0b5a3a4ee46f5fe7c341191aa2bc1 (patch)
tree759378766ee6b22d72a0f2fded1b0dd530376a6e /src/kernel/kernel.c
parent07530dd08e0b29573712b54543a7fc42672bb34b (diff)
Some userspace improvements
GAS is bad, NASM is awesome.
Diffstat (limited to 'src/kernel/kernel.c')
-rw-r--r--src/kernel/kernel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c
index 27f5ad9..196b44e 100644
--- a/src/kernel/kernel.c
+++ b/src/kernel/kernel.c
@@ -18,7 +18,7 @@
#include <kernel/pci/pci.h>
#include <kernel/net/network.h>
-extern void jump_userspace();
+extern void jump_userspace(uintptr_t location, uintptr_t stack);
void kernel_main()
{
@@ -66,10 +66,10 @@ void kernel_main()
if (!user_e) panic("Userspace binary not found!");
ATAPI_granular_read(1 + (user_e->length / 2048), user_e->lba, (uint8_t *) (userspace + 4096));
kfree(user_e);
- jump_userspace(userspace + 4096);
+ jump_userspace(userspace + 4096, (uintptr_t) umalloc(4096));
} else {
marfs_read_whole_file(4, (uint8_t *) (userspace + 4096));
- jump_userspace(userspace + 4096);
+ jump_userspace(userspace + 4096, (uintptr_t) umalloc(4096));
}
panic("This should NOT happen!");