1 #ifndef _ASM_X86_PGTABLE_64_DEFS_H
2 #define _ASM_X86_PGTABLE_64_DEFS_H
4 #include <asm/sparsemem.h>
7 #include <linux/types.h>
10 * These are used to make use of C type-checking..
12 typedef unsigned long pteval_t;
13 typedef unsigned long pmdval_t;
14 typedef unsigned long pudval_t;
15 typedef unsigned long pgdval_t;
16 typedef unsigned long pgprotval_t;
18 typedef struct { pteval_t pte; } pte_t;
20 #endif /* !__ASSEMBLY__ */
22 #define SHARED_KERNEL_PMD 0
23 #define PAGETABLE_LEVELS 4
26 * PGDIR_SHIFT determines what a top-level page table entry can map
28 #define PGDIR_SHIFT 39
29 #define PTRS_PER_PGD 512
35 #define PTRS_PER_PUD 512
38 * PMD_SHIFT determines the size of the area a middle-level
42 #define PTRS_PER_PMD 512
45 * entries per page directory level
47 #define PTRS_PER_PTE 512
49 #define PMD_SIZE (_AC(1, UL) << PMD_SHIFT)
50 #define PMD_MASK (~(PMD_SIZE - 1))
51 #define PUD_SIZE (_AC(1, UL) << PUD_SHIFT)
52 #define PUD_MASK (~(PUD_SIZE - 1))
53 #define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT)
54 #define PGDIR_MASK (~(PGDIR_SIZE - 1))
56 /* See Documentation/x86/x86_64/mm.txt for a description of the memory map. */
57 #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL)
58 #define VMALLOC_START _AC(0xffffc90000000000, UL)
59 #define VMALLOC_END _AC(0xffffe8ffffffffff, UL)
60 #define VMEMMAP_START _AC(0xffffea0000000000, UL)
61 #define MODULES_VADDR _AC(0xffffffffa0000000, UL)
62 #define MODULES_END _AC(0xffffffffff000000, UL)
63 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
65 #define EARLY_DYNAMIC_PAGE_TABLES 64
67 #endif /* _ASM_X86_PGTABLE_64_DEFS_H */