1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_X86_PAGE_32_DEFS_H
3 #define _ASM_X86_PAGE_32_DEFS_H
5 #include <linux/const.h>
8 * This handles the memory map.
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.
14 * If you want more physical memory than this then see the CONFIG_HIGHMEM4G
15 * and CONFIG_HIGHMEM64G options in the kernel configuration.
17 #define __PAGE_OFFSET_BASE _AC(CONFIG_PAGE_OFFSET, UL)
18 #define __PAGE_OFFSET __PAGE_OFFSET_BASE
20 #define __START_KERNEL_map __PAGE_OFFSET
22 #define THREAD_SIZE_ORDER 1
23 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
25 #define DOUBLEFAULT_STACK 1
29 #define N_EXCEPTION_STACKS 1
32 /* 44=32+12, the limit we can fit into an unsigned long pfn */
33 #define __PHYSICAL_MASK_SHIFT 44
34 #define __VIRTUAL_MASK_SHIFT 32
36 #else /* !CONFIG_X86_PAE */
37 #define __PHYSICAL_MASK_SHIFT 32
38 #define __VIRTUAL_MASK_SHIFT 32
39 #endif /* CONFIG_X86_PAE */
42 * Kernel image size is limited to 512 MB (see in arch/x86/kernel/head_32.S)
44 #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024)
49 * This much address space is reserved for vmalloc() and iomap()
50 * as well as fixmap mappings.
52 extern unsigned int __VMALLOC_RESERVE;
53 extern int sysctl_legacy_va_layout;
55 extern void find_low_pfn_range(void);
56 extern void setup_bootmem_allocator(void);
58 #endif /* !__ASSEMBLY__ */
60 #endif /* _ASM_X86_PAGE_32_DEFS_H */