#pragma once #include #define PAGE_PRESENT 0x01 #define PAGE_WRITABLE 0x02 #define PAGE_USER 0x04 #define PAGE_PWT 0x08 #define PAGE_PCD 0x10 #define PAGE_ACCESSED 0x20 #define PAGE_DIRTY 0x40 #define PAGE_HUGE 0x80 #define PAGE_GLOBAL 0x100 #define PAGE_NX (1ULL << 63) void *memory_page_allocate(); void memory_page_free(void *page); void memory_page_map(uint64_t *pml4, void *virt, void *phys, uint64_t flags); void memory_page_unmap(uint64_t *pml4, void *virt);