You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
483 B
22 lines
483 B
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#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);
|
|
|