Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 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 | |
Kees Cook | a021506 | 2013-07-08 09:15:17 -0700 | [diff] [blame] | 18 | #define __START_KERNEL_map __PAGE_OFFSET |
| 19 | |
Thomas Gleixner | 38e7c57 | 2012-05-05 15:05:42 +0000 | [diff] [blame] | 20 | #define THREAD_SIZE_ORDER 1 |
| 21 | #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) |
Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 22 | |
Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 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 | /* 44=32+12, the limit we can fit into an unsigned long pfn */ |
| 31 | #define __PHYSICAL_MASK_SHIFT 44 |
| 32 | #define __VIRTUAL_MASK_SHIFT 32 |
Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 33 | |
| 34 | #else /* !CONFIG_X86_PAE */ |
| 35 | #define __PHYSICAL_MASK_SHIFT 32 |
| 36 | #define __VIRTUAL_MASK_SHIFT 32 |
Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 37 | #endif /* CONFIG_X86_PAE */ |
| 38 | |
Yinghai Lu | 7543c1d | 2009-03-12 16:04:42 -0700 | [diff] [blame] | 39 | /* |
| 40 | * Kernel image size is limited to 512 MB (see in arch/x86/kernel/head_32.S) |
| 41 | */ |
| 42 | #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024) |
| 43 | |
Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 44 | #ifndef __ASSEMBLY__ |
| 45 | |
Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 46 | /* |
| 47 | * This much address space is reserved for vmalloc() and iomap() |
| 48 | * as well as fixmap mappings. |
| 49 | */ |
| 50 | extern unsigned int __VMALLOC_RESERVE; |
| 51 | extern int sysctl_legacy_va_layout; |
| 52 | |
| 53 | extern void find_low_pfn_range(void); |
Jeremy Fitzhardinge | 51c78eb | 2009-02-08 22:52:14 -0800 | [diff] [blame] | 54 | extern void setup_bootmem_allocator(void); |
| 55 | |
| 56 | #endif /* !__ASSEMBLY__ */ |
| 57 | |
| 58 | #endif /* _ASM_X86_PAGE_32_DEFS_H */ |