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