#pragma once #include #ifdef ARCH_X86_64 #include "arch/x86_64/MMU.h" #else #error "Unknown architecture." #endif namespace MMU { enum Flags { None = 0, ReadWrite = 1, User = 2, NoExecute = 4, WriteThrough = 8, CacheDisable = 16, }; Result map(u64 virt, u64 phys, int flags); Result unmap(u64 virt); Result get_physical(u64 virt); Result get_flags(u64 virt); Result remap(u64 virt, int flags); void switch_page_directory(PageDirectory* dir); PageDirectory* get_page_directory(); void flush_all(); Result create_page_directory_for_userspace(); void setup_initial_page_directory(); }