[Zion] Access the KernelStackManager through the VMM.

This commit is contained in:
Drew Galbraith 2023-11-15 15:38:25 -08:00
parent c5b9d20c7e
commit 07e6e3028d
11 changed files with 46 additions and 38 deletions

View file

@ -3,15 +3,25 @@
#include <stdint.h>
#include "memory/constants.h"
#include "memory/kernel_heap.h"
#include "memory/kernel_stack_manager.h"
class KernelVmm {
public:
KernelVmm();
// TODO: Create a "MemoryRegion" style class to hold the return
// types from this object.
static uint64_t AcquireSlabHeapRegion(uint64_t slab_size_bytes);
static uint64_t AcquireKernelStack();
static void FreeKernelStack(uint64_t);
private:
uint64_t next_slab_heap_page_ = kKernelSlabHeapStart;
KernelHeap heap_;
glcr::UniquePtr<KernelStackManager> stack_manager_;
uint64_t AcquireSlabHeapRegionInternal(uint64_t slab_size_bytes);
};