apio
69a9f7f06a
Also, rename the ugly Paging::VirtualMemoryManager name to just 'VMM'. Which is now used instead of kernelVMM.
21 lines
486 B
C++
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);
|
|
|
|
}; |