aboutsummaryrefslogtreecommitdiff
path: root/src/proc.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-07-07 14:34:39 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-07-07 14:34:39 +0300
commitd592abd8ccc4026c51e196777031eb65c4acc4de (patch)
treebfcffec608ede13653a21a56a5b731a4178ecda3 /src/proc.c
parentd1c5e2700add7627e22c49a6021f200f03e8a62b (diff)
downloadkmi-d592abd8ccc4026c51e196777031eb65c4acc4de.tar.gz
kmi-d592abd8ccc4026c51e196777031eb65c4acc4de.zip
misc fixes
+ Align kernel to 2MiB boundary in u-boot + Optimize alignment functions a little bit, should still have to check on real hardware but 'feels' more clean + Add early boot debugging + Put extra cores we aren't ready to account for to sleep if/when they boot. + Make BASE_PAGE_SIZE constant on riscv64/32, helps the compiler with some alignment checks among other things.
Diffstat (limited to 'src/proc.c')
-rw-r--r--src/proc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/proc.c b/src/proc.c
index 3d2d5bd..eaa25d8 100644
--- a/src/proc.c
+++ b/src/proc.c
@@ -18,8 +18,6 @@
#include <libfdt.h>
-static vm_t entry;
-
stat_t prepare_proc(struct tcb *t, vm_t bin, vm_t interp)
{
vm_t entry = load_elf(t, bin, interp);
@@ -60,7 +58,8 @@ stat_t init_proc(void *fdt, vm_t *proc_fdt, vm_t *proc_initrd)
/* allocate stacks etc after ELF file to make sure nothing of importance
* clashes */
- prepare_proc(t, get_init_base(fdt), 0);
+ stat_t ret = prepare_proc(t, get_init_base(fdt), 0);
+ assert(ret == OK);
/** In the init process, can the entry be the callback? Is that too
* unergonomic? */