[Zion] Map user stacks in as regular MemoryObjects.

This allows us to easily track the physical memory so it
can be freed when the thread exits. It also simplifies the page fault
handler as it just needs to check regular mappings to find a user stack.
This commit is contained in:
Drew Galbraith 2023-11-24 16:51:35 -08:00
parent ba1b4df702
commit 2dd69f5844
6 changed files with 29 additions and 42 deletions

View file

@ -78,9 +78,9 @@ class Thread : public KernelObject, public glcr::IntrusiveListNode<Thread> {
uint64_t id_;
State state_ = CREATED;
bool is_kernel_ = false;
uint64_t user_stack_base_;
// Startup Context for the thread.
uint64_t rsp_;
uint64_t rip_;
uint64_t arg1_;
uint64_t arg2_;