Luna/kernel/include/memory/VMM.h

21 lines
464 B
C
Raw Normal View History

2022-09-05 14:13:51 +00:00
#pragma once
#include "memory/Paging.h"
namespace Paging
{
class VirtualMemoryManager
{
2022-09-06 11:49:17 +00:00
public:
void init(); // fetch page table from cr3
void init(PageTable* PML4);
2022-09-05 14:13:51 +00:00
2022-09-06 11:49:17 +00:00
void map(uint64_t virtualAddress, uint64_t physicalAddress);
void unmap(uint64_t virtualAddress);
uint64_t getPhysical(uint64_t virtualAddress);
2022-09-05 14:13:51 +00:00
private:
PageTable* PML4;
};
2022-09-06 11:49:17 +00:00
}
extern Paging::VirtualMemoryManager kernelVMM;