31 UINT64 UserSupervisor : 1;
32 UINT64 WriteThrough : 1;
34 UINT64 CacheDisabled : 1;
38 UINT64 MustBeZero : 2;
40 UINT64 PageTableBaseAddress : 40;
41 UINT64 AvabilableHigh : 11;
55 UINT64 UserSupervisor : 1;
56 UINT64 WriteThrough : 1;
58 UINT64 CacheDisabled : 1;
67 UINT64 PageTableBaseAddress : 40;
68 UINT64 AvabilableHigh : 11;
83 UINT64 UserSupervisor : 1;
84 UINT64 WriteThrough : 1;
86 UINT64 CacheDisabled : 1;
96 UINT64 MustBeZero : 8;
97 UINT64 PageTableBaseAddress : 31;
98 UINT64 AvabilableHigh : 11;
112 UINT64 ReadWrite : 1;
113 UINT64 UserSupervisor : 1;
114 UINT64 WriteThrough : 1;
116 UINT64 CacheDisabled : 1;
124 UINT64 Available : 3;
126 UINT64 MustBeZero : 17;
127 UINT64 PageTableBaseAddress : 22;
128 UINT64 AvabilableHigh : 11;
137#define IA32_PG_P BIT0
138#define IA32_PG_RW BIT1
139#define IA32_PG_PS BIT7
141#define PAGING_PAE_INDEX_MASK 0x1FF
143#define PAGING_4K_ADDRESS_MASK_64 0x000FFFFFFFFFF000ull
144#define PAGING_2M_ADDRESS_MASK_64 0x000FFFFFFFE00000ull
145#define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull
147#define PAGING_L1_ADDRESS_SHIFT 12
148#define PAGING_L2_ADDRESS_SHIFT 21
149#define PAGING_L3_ADDRESS_SHIFT 30
150#define PAGING_L4_ADDRESS_SHIFT 39
152#define PAGING_PML4E_NUMBER 4
154#define PAGETABLE_ENTRY_MASK ((1UL << 9) - 1)
155#define PML4_OFFSET(x) ( (x >> 39) & PAGETABLE_ENTRY_MASK)
156#define PDP_OFFSET(x) ( (x >> 30) & PAGETABLE_ENTRY_MASK)
157#define PDE_OFFSET(x) ( (x >> 21) & PAGETABLE_ENTRY_MASK)
158#define PTE_OFFSET(x) ( (x >> 12) & PAGETABLE_ENTRY_MASK)
159#define PAGING_1G_ADDRESS_MASK_64 0x000FFFFFC0000000ull