• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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		_AC(CONFIG_PAGE_OFFSET, UL)
17 
18 #define __START_KERNEL_map	__PAGE_OFFSET
19 
20 #define THREAD_SIZE_ORDER	1
21 #define THREAD_SIZE		(PAGE_SIZE << THREAD_SIZE_ORDER)
22 
23 #define DOUBLEFAULT_STACK 1
24 #define NMI_STACK 0
25 #define DEBUG_STACK 0
26 #define MCE_STACK 0
27 #define N_EXCEPTION_STACKS 1
28 
29 #ifdef CONFIG_X86_PAE
30 /*
31  * This is beyond the 44 bit limit imposed by the 32bit long pfns,
32  * but we need the full mask to make sure inverted PROT_NONE
33  * entries have all the host bits set in a guest.
34  * The real limit is still 44 bits.
35  */
36 #define __PHYSICAL_MASK_SHIFT	52
37 #define __VIRTUAL_MASK_SHIFT	32
38 
39 #else  /* !CONFIG_X86_PAE */
40 #define __PHYSICAL_MASK_SHIFT	32
41 #define __VIRTUAL_MASK_SHIFT	32
42 #endif	/* CONFIG_X86_PAE */
43 
44 /*
45  * Kernel image size is limited to 512 MB (see in arch/x86/kernel/head_32.S)
46  */
47 #define KERNEL_IMAGE_SIZE	(512 * 1024 * 1024)
48 
49 #ifndef __ASSEMBLY__
50 
51 /*
52  * This much address space is reserved for vmalloc() and iomap()
53  * as well as fixmap mappings.
54  */
55 extern unsigned int __VMALLOC_RESERVE;
56 extern int sysctl_legacy_va_layout;
57 
58 extern void find_low_pfn_range(void);
59 extern void setup_bootmem_allocator(void);
60 
61 #endif	/* !__ASSEMBLY__ */
62 
63 #endif /* _ASM_X86_PAGE_32_DEFS_H */
64