Kernel: Add some bareboness functionality to map virtual addresses
This commit is contained in:
@@ -59,8 +59,8 @@ namespace Kernel::Memory
|
||||
static void initialize();
|
||||
static Heap& get();
|
||||
|
||||
paddr_t take_mapped_page(uint8_t);
|
||||
void return_mapped_page(paddr_t);
|
||||
paddr_t take_free_page();
|
||||
void release_page(paddr_t);
|
||||
|
||||
private:
|
||||
Heap() = default;
|
||||
|
||||
@@ -13,6 +13,9 @@ public:
|
||||
UserSupervisor = 4,
|
||||
};
|
||||
|
||||
using vaddr_t = uintptr_t;
|
||||
using paddr_t = uintptr_t;
|
||||
|
||||
public:
|
||||
static void intialize();
|
||||
static MMU& get();
|
||||
@@ -26,6 +29,8 @@ public:
|
||||
void unmap_page(uintptr_t);
|
||||
void unmap_range(uintptr_t, ptrdiff_t);
|
||||
|
||||
void map_page_at(paddr_t, vaddr_t, uint8_t);
|
||||
|
||||
private:
|
||||
uint64_t* m_highest_paging_struct;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user