tree-wide: replace config_enabled() with IS_ENABLED()
[deliverable/linux.git] / arch / x86 / include / asm / pgtable_64_types.h
1 #ifndef _ASM_X86_PGTABLE_64_DEFS_H
2 #define _ASM_X86_PGTABLE_64_DEFS_H
3
4 #include <asm/sparsemem.h>
5
6 #ifndef __ASSEMBLY__
7 #include <linux/types.h>
8 #include <asm/kaslr.h>
9
10 /*
11 * These are used to make use of C type-checking..
12 */
13 typedef unsigned long pteval_t;
14 typedef unsigned long pmdval_t;
15 typedef unsigned long pudval_t;
16 typedef unsigned long pgdval_t;
17 typedef unsigned long pgprotval_t;
18
19 typedef struct { pteval_t pte; } pte_t;
20
21 #endif /* !__ASSEMBLY__ */
22
23 #define SHARED_KERNEL_PMD 0
24
25 /*
26 * PGDIR_SHIFT determines what a top-level page table entry can map
27 */
28 #define PGDIR_SHIFT 39
29 #define PTRS_PER_PGD 512
30
31 /*
32 * 3rd level page
33 */
34 #define PUD_SHIFT 30
35 #define PTRS_PER_PUD 512
36
37 /*
38 * PMD_SHIFT determines the size of the area a middle-level
39 * page table can map
40 */
41 #define PMD_SHIFT 21
42 #define PTRS_PER_PMD 512
43
44 /*
45 * entries per page directory level
46 */
47 #define PTRS_PER_PTE 512
48
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))
55
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_SIZE_TB _AC(32, UL)
59 #define __VMALLOC_BASE _AC(0xffffc90000000000, UL)
60 #define VMEMMAP_START _AC(0xffffea0000000000, UL)
61 #ifdef CONFIG_RANDOMIZE_MEMORY
62 #define VMALLOC_START vmalloc_base
63 #else
64 #define VMALLOC_START __VMALLOC_BASE
65 #endif /* CONFIG_RANDOMIZE_MEMORY */
66 #define VMALLOC_END (VMALLOC_START + _AC((VMALLOC_SIZE_TB << 40) - 1, UL))
67 #define MODULES_VADDR (__START_KERNEL_map + KERNEL_IMAGE_SIZE)
68 #define MODULES_END _AC(0xffffffffff000000, UL)
69 #define MODULES_LEN (MODULES_END - MODULES_VADDR)
70 #define ESPFIX_PGD_ENTRY _AC(-2, UL)
71 #define ESPFIX_BASE_ADDR (ESPFIX_PGD_ENTRY << PGDIR_SHIFT)
72 #define EFI_VA_START ( -4 * (_AC(1, UL) << 30))
73 #define EFI_VA_END (-68 * (_AC(1, UL) << 30))
74
75 #define EARLY_DYNAMIC_PAGE_TABLES 64
76
77 #endif /* _ASM_X86_PGTABLE_64_DEFS_H */
This page took 0.044483 seconds and 5 git commands to generate.