Luna/kernel/include/memory/VMM.h
apio 69a9f7f06a Kernel: Move VMM from a class to a namespace
Also, rename the ugly Paging::VirtualMemoryManager name to just 'VMM'. Which is now used instead of kernelVMM.
2022-10-12 20:02:25 +02:00

21 lines
486 B
C++

#pragma once
#include "memory/Paging.h"
enum Flags
{
ReadWrite = 1 << 0,
User = 1 << 1,
Execute = 1 << 2
};
namespace VMM
{
void init(); // fetch page table from cr3
void init(PageTable* cr3);
void map(uint64_t virtualAddress, uint64_t physicalAddress, int flags);
void remap(uint64_t virtualAddress, int flags);
void unmap(uint64_t virtualAddress);
uint64_t getPhysical(uint64_t virtualAddress);
uint64_t getFlags(uint64_t virtualAddress);
};