GNU Linux-libre 4.9.309-gnu1
[releases.git] / arch / x86 / include / asm / page_32_types.h
1 #ifndef _ASM_X86_PAGE_32_DEFS_H
2 #define _ASM_X86_PAGE_32_DEFS_H
3
4 #include <linux/const.h>
5
6 /*
7  * This handles the memory map.
8  *
9  * A __PAGE_OFFSET of 0xC0000000 means that the kernel has
10  * a virtual address space of one gigabyte, which limits the
11  * amount of physical memory you can use to about 950MB.
12  *
13  * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
14  * and CONFIG_HIGHMEM64G options in the kernel configuration.
15  */
16 #define __PAGE_OFFSET_BASE      _AC(CONFIG_PAGE_OFFSET, UL)
17 #define __PAGE_OFFSET           __PAGE_OFFSET_BASE
18
19 #define __START_KERNEL_map      __PAGE_OFFSET
20
21 #define THREAD_SIZE_ORDER       1
22 #define THREAD_SIZE             (PAGE_SIZE << THREAD_SIZE_ORDER)
23
24 #define DOUBLEFAULT_STACK 1
25 #define NMI_STACK 0
26 #define DEBUG_STACK 0
27 #define MCE_STACK 0
28 #define N_EXCEPTION_STACKS 1
29
30 #ifdef CONFIG_X86_PAE
31 /*
32  * This is beyond the 44 bit limit imposed by the 32bit long pfns,
33  * but we need the full mask to make sure inverted PROT_NONE
34  * entries have all the host bits set in a guest.
35  * The real limit is still 44 bits.
36  */
37 #define __PHYSICAL_MASK_SHIFT   52
38 #define __VIRTUAL_MASK_SHIFT    32
39
40 #else  /* !CONFIG_X86_PAE */
41 #define __PHYSICAL_MASK_SHIFT   32
42 #define __VIRTUAL_MASK_SHIFT    32
43 #endif  /* CONFIG_X86_PAE */
44
45 /*
46  * Kernel image size is limited to 512 MB (see in arch/x86/kernel/head_32.S)
47  */
48 #define KERNEL_IMAGE_SIZE       (512 * 1024 * 1024)
49
50 #ifndef __ASSEMBLY__
51
52 /*
53  * This much address space is reserved for vmalloc() and iomap()
54  * as well as fixmap mappings.
55  */
56 extern unsigned int __VMALLOC_RESERVE;
57 extern int sysctl_legacy_va_layout;
58
59 extern void find_low_pfn_range(void);
60 extern void setup_bootmem_allocator(void);
61
62 #endif  /* !__ASSEMBLY__ */
63
64 #endif /* _ASM_X86_PAGE_32_DEFS_H */