almost got the term emu working and shell

This commit is contained in:
2026-07-08 21:15:30 -05:00
parent ec3cbb4794
commit 4d98d73f5e
20 changed files with 214 additions and 228 deletions

View File

@@ -99,6 +99,10 @@ void init_task (
process->flags = user ? PROCESS_FLAG_USER : PROCESS_FLAG_KERNEL;
total_processes++;
if (process->kstack_top != 0) {
kfree((void*)process->kstack_top);
}
void* kstack_bottom = kalloc(PAGE_SIZE);
uint32_t kstack_top = (uint32_t)kstack_bottom + PAGE_SIZE;
process->kstack_top = kstack_top;