From be3696bd5853819212b1240751efd8d85f282c68 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 24 Apr 2022 13:54:41 +0300 Subject: start initial irq handling + Still lots todo, and I'm not entirely sure how I should handle program space switches (mainly since the kernel uses the process' stack, maybe it shouldn't?) --- common/proc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/proc.c') diff --git a/common/proc.c b/common/proc.c index e0b8c70..ea3ab5d 100644 --- a/common/proc.c +++ b/common/proc.c @@ -46,12 +46,18 @@ stat_t init_proc(void *fdt, struct vm_branch *b) if (!t->proc_stack) return ERR_ADDR; + t->proc_stack_top = t->proc_stack + __proc_stack_size; + t->call_stack = setup_call_stack(t, __call_stack_size); if (!t->call_stack) return ERR_ADDR; + t->call_stack_top = t->call_stack + __call_stack_size; flush_tlb(); + /* set current tcb */ + use_tcb(t); + /* TODO: move fdt into process space */ return jump_to_userspace(t, 1, 0); } -- cgit v1.3