1 /* SPDX-License-Identifier: GPL-2.0 */ 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 */ 17 #define __PAGE_OFFSET_BASE _AC(CONFIG_PAGE_OFFSET, UL) 18 #define __PAGE_OFFSET __PAGE_OFFSET_BASE 19 20 #define __START_KERNEL_map __PAGE_OFFSET 21 22 #define THREAD_SIZE_ORDER 1 23 #define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) 24 25 #define IRQ_STACK_SIZE THREAD_SIZE 26 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 * User space process size: 3GB (default). 46 */ 47 #define IA32_PAGE_OFFSET __PAGE_OFFSET 48 #define TASK_SIZE __PAGE_OFFSET 49 #define TASK_SIZE_LOW TASK_SIZE 50 #define TASK_SIZE_MAX TASK_SIZE 51 #define DEFAULT_MAP_WINDOW TASK_SIZE 52 #define STACK_TOP TASK_SIZE 53 #define STACK_TOP_MAX STACK_TOP 54 55 /* 56 * In spite of the name, KERNEL_IMAGE_SIZE is a limit on the maximum virtual 57 * address for the kernel image, rather than the limit on the size itself. On 58 * 32-bit, this is not a strict limit, but this value is used to limit the 59 * link-time virtual address range of the kernel, and by KASLR to limit the 60 * randomized address from which the kernel is executed. A relocatable kernel 61 * can be loaded somewhat higher than KERNEL_IMAGE_SIZE as long as enough space 62 * remains for the vmalloc area. 63 */ 64 #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024) 65 66 #ifndef __ASSEMBLY__ 67 68 /* 69 * This much address space is reserved for vmalloc() and iomap() 70 * as well as fixmap mappings. 71 */ 72 extern unsigned int __VMALLOC_RESERVE; 73 extern int sysctl_legacy_va_layout; 74 75 extern void find_low_pfn_range(void); 76 extern void setup_bootmem_allocator(void); 77 78 #endif /* !__ASSEMBLY__ */ 79 80 #endif /* _ASM_X86_PAGE_32_DEFS_H */ 81