Luna/kernel/include/memory/Paging.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

28 lines
519 B
C

#pragma once
#include <stdint.h>
#ifndef PAGE_SIZE
#define PAGE_SIZE 4096
#endif
struct PageDirectoryEntry
{
bool Present : 1;
bool ReadWrite : 1;
bool UserSuper : 1;
bool WriteThrough : 1;
bool CacheDisabled : 1;
bool Accessed : 1;
bool ignore0 : 1;
bool LargerPages : 1;
bool ignore1 : 1;
uint8_t Available : 3;
uint64_t Address : 52;
void set_address(uint64_t addr);
};
struct PageTable
{
PageDirectoryEntry entries[512];
} __attribute__((aligned(PAGE_SIZE)));