From dec16faf32e75d613e20cac175b8a0c2d3612b94 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 25 Feb 2021 23:32:18 +0100 Subject: Added some debugging features I've tried to track down the bugs with kvm and q35 but I didn't manage to do it - yet! I'll probably look into it soon. --- kernel/features/load.c | 1 + kernel/features/proc.c | 2 ++ 2 files changed, 3 insertions(+) (limited to 'kernel/features') diff --git a/kernel/features/load.c b/kernel/features/load.c index f79e6b4..9024c82 100644 --- a/kernel/features/load.c +++ b/kernel/features/load.c @@ -12,6 +12,7 @@ void proc_load(struct proc *proc, void *data) proc->regs.ebp = (u32)stack; proc->regs.useresp = (u32)stack; proc->regs.eip = (u32)data; + proc->entry = (u32)data; } int bin_load(const char *path, struct proc *proc) diff --git a/kernel/features/proc.c b/kernel/features/proc.c index 48bde72..35c0fa7 100644 --- a/kernel/features/proc.c +++ b/kernel/features/proc.c @@ -162,6 +162,8 @@ void proc_yield(struct regs *r) void proc_enable_waiting(u32 id, enum proc_wait_type type) { struct proc *proc_bak = proc_current(); + if (!proc_bak) + return; struct node *iterator = proc_list->head; while (iterator) { -- cgit v1.2.3