diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-24 13:54:41 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-24 13:54:41 +0300 |
| commit | be3696bd5853819212b1240751efd8d85f282c68 (patch) | |
| tree | fd58279b90ce82c073c6f8d9a929ceb00bec5703 /common/proc.c | |
| parent | d4c420689b1872f6fb22f421dfd27704ee94951a (diff) | |
| download | kmi-be3696bd5853819212b1240751efd8d85f282c68.tar.gz kmi-be3696bd5853819212b1240751efd8d85f282c68.zip | |
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?)
Diffstat (limited to 'common/proc.c')
| -rw-r--r-- | common/proc.c | 6 |
1 files changed, 6 insertions, 0 deletions
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); } |
