#define KERNEL_IMAGE_PADDR 0x400000 #define KERNEL_STAGE1_PADDR 0x001000 #define KERNEL_PML4 0x002000 #define KERNEL_PDPT_PHYS_MAPPING 0x003000 #define KERNEL_PDPT_KERNEL_SPACE 0x004000 #define KERNEL_PD_KIMAGE 0x005000 #define KERNEL_PT_KIMAGE 0x006000 #define KERNEL_PD_STRUCT_PAGE_ARR 0x007000 #define EMPTY_PAGE_PFN 0x008000 #define KERNEL_BSS_HUGE_PAGE 0x200000 #define PA_P 0x0000000000000001 #define PA_RW 0x0000000000000002 #define PA_US 0x0000000000000004 #define PA_PWT 0x0000000000000008 #define PA_PCD 0x0000000000000010 #define PA_A 0x0000000000000020 #define PA_D 0x0000000000000040 #define PA_PS 0x0000000000000080 #define PA_G 0x0000000000000100 #define PA_COW 0x0000000000000200 #define PA_MMAP 0x0000000000000400 #define PA_ANON 0x0000000000000800 #define PA_NXE 0x8000000000000000 #define PA_MASK 0xfff0000000000fff