Commit Graph

13 Commits

Author SHA1 Message Date
Drew Galbraith 2eefda6114 add a class to allocate and manage user space stacks 2023-05-30 22:35:57 -07:00
Drew Galbraith 1db93e5b12 Move PML4 initialization into the VirtualMemory class. 2023-05-30 21:39:19 -07:00
Drew Galbraith f22dd66c8d Manage KernelStacks separately rather than just allocing bytes.
Create a global KernelStackManager that will handle the relevant allocs.
2023-05-30 21:28:44 -07:00
Drew Galbraith b9b45c5e45 Add the ability to copy memory to non resident process.
Use/Test this by loading the user space elf from the kernel process
before it starts rather than as a part of the first thread.

This simplifies thread start a fair bit.
2023-05-30 01:27:47 -07:00
Drew Galbraith de49dcc01a Move scheduler to new global class format. 2023-05-29 23:48:32 -07:00
Drew Galbraith 80d2bf1aaa Move Processes and Threads to be stored in SharedPtr
Reference counting lets us pass these around a bit more easily.

SharedPtr was lightly tested using uint64_t in the main zion funcion.

Also add a sleep functionality instead of panicking. Functionally the
same right now since we don't preempt.
2023-05-29 15:50:38 -07:00
Drew Galbraith a06c9dced4 Add thread and process states.
Add a thread exit call.
2023-05-29 13:51:03 -07:00
Drew Galbraith 7184f527a0 Jump to user mode.
This instantly creates a page fault as we always map pages with ring 0
permissions.
2023-05-29 13:06:08 -07:00
Drew Galbraith aefb4f082b Add a kernel ELF module and load it in a new process.
Don't yet jump to userspace.
2023-05-29 00:32:54 -07:00
Drew Galbraith f86bbe6ea9 Wireframe for syscalls in place 2023-05-18 16:03:09 -07:00
Drew Galbraith d3024211a7 Cycle through multiple tasks in multiple processes 2023-05-18 13:56:54 -07:00
Drew Galbraith cb41953354 Scheduler with working threads.
Currently only one process but it is a start.
2023-05-18 13:24:02 -07:00
Drew Galbraith 960cbf9519 Add Scheduler wireframe.
Right now does nothing but has containing classes for process and thread
information.
2023-05-18 12:43:53 -07:00