blob: ade619ff9e2a414c918c7ba3c38352ee72a79254 [file] [log] [blame]
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -08001#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
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -080018#define THREAD_ORDER 1
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -080019#define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER)
20
21#define STACKFAULT_STACK 0
22#define DOUBLEFAULT_STACK 1
23#define NMI_STACK 0
24#define DEBUG_STACK 0
25#define MCE_STACK 0
26#define N_EXCEPTION_STACKS 1
27
28#ifdef CONFIG_X86_PAE
29/* 44=32+12, the limit we can fit into an unsigned long pfn */
30#define __PHYSICAL_MASK_SHIFT 44
31#define __VIRTUAL_MASK_SHIFT 32
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -080032
33#else /* !CONFIG_X86_PAE */
34#define __PHYSICAL_MASK_SHIFT 32
35#define __VIRTUAL_MASK_SHIFT 32
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -080036#endif /* CONFIG_X86_PAE */
37
Yinghai Lu7543c1d2009-03-12 16:04:42 -070038/*
39 * Kernel image size is limited to 512 MB (see in arch/x86/kernel/head_32.S)
40 */
41#define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
42
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -080043#ifndef __ASSEMBLY__
44
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -080045/*
46 * This much address space is reserved for vmalloc() and iomap()
47 * as well as fixmap mappings.
48 */
49extern unsigned int __VMALLOC_RESERVE;
50extern int sysctl_legacy_va_layout;
51
52extern void find_low_pfn_range(void);
Jeremy Fitzhardinge51c78eb2009-02-08 22:52:14 -080053extern void setup_bootmem_allocator(void);
54
55#endif /* !__ASSEMBLY__ */
56
57#endif /* _ASM_X86_PAGE_32_DEFS_H */