Setup kernel stack; but process is failing

This commit is contained in:
2026-02-17 23:01:32 +01:00
parent 458ba375f3
commit ac7216d84a
15 changed files with 136 additions and 21 deletions

View File

@@ -142,6 +142,6 @@ void kfree(void* ptr)
// Should return a pointer to top of the stack (as stack grows DOWNWARDS)
void* kalloc_stack()
{
uint8_t* ptr = kmalloc(PROCESS_STACK_SIZE);
uint8_t* ptr = kmalloc(PROCESS_STACK_SIZE); // As it's out of kmalloc, stack is already mapped into kernel space
return ptr ? ptr+PROCESS_STACK_SIZE : NULL;
}