/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_X86_PAGE_64_DEFS_H #define _ASM_X86_PAGE_64_DEFS_H #ifndef __ASSEMBLY__ #include <asm/kaslr.h> #endif #ifdef CONFIG_KASAN #define KASAN_STACK_ORDER … #else #define KASAN_STACK_ORDER … #endif #define THREAD_SIZE_ORDER … #define THREAD_SIZE … #define EXCEPTION_STACK_ORDER … #define EXCEPTION_STKSZ … #define IRQ_STACK_ORDER … #define IRQ_STACK_SIZE … /* * The index for the tss.ist[] array. The hardware limit is 7 entries. */ #define IST_INDEX_DF … #define IST_INDEX_NMI … #define IST_INDEX_DB … #define IST_INDEX_MCE … #define IST_INDEX_VC … /* * Set __PAGE_OFFSET to the most negative possible address + * PGDIR_SIZE*17 (pgd slot 273). * * The gap is to allow a space for LDT remap for PTI (1 pgd slot) and space for * a hypervisor (16 slots). Choosing 16 slots for a hypervisor is arbitrary, * but it's what Xen requires. */ #define __PAGE_OFFSET_BASE_L5 … #define __PAGE_OFFSET_BASE_L4 … #ifdef CONFIG_DYNAMIC_MEMORY_LAYOUT #define __PAGE_OFFSET … #else #define __PAGE_OFFSET … #endif /* CONFIG_DYNAMIC_MEMORY_LAYOUT */ #define __START_KERNEL_map … /* See Documentation/arch/x86/x86_64/mm.rst for a description of the memory map. */ #define __PHYSICAL_MASK_SHIFT … #ifdef CONFIG_X86_5LEVEL #define __VIRTUAL_MASK_SHIFT … /* See task_size_max() in <asm/page_64.h> */ #else #define __VIRTUAL_MASK_SHIFT … #define task_size_max … #endif #define TASK_SIZE_MAX … #define DEFAULT_MAP_WINDOW … /* This decides where the kernel will search for a free chunk of vm * space during mmap's. */ #define IA32_PAGE_OFFSET … #define TASK_SIZE_LOW … #define TASK_SIZE … #define TASK_SIZE_OF(child) … #define STACK_TOP … #define STACK_TOP_MAX … /* * In spite of the name, KERNEL_IMAGE_SIZE is a limit on the maximum virtual * address for the kernel image, rather than the limit on the size itself. * This can be at most 1 GiB, due to the fixmap living in the next 1 GiB (see * level2_kernel_pgt in arch/x86/kernel/head_64.S). * * On KASLR use 1 GiB by default, leaving 1 GiB for modules once the * page tables are fully set up. * * If KASLR is disabled we can shrink it to 0.5 GiB and increase the size * of the modules area to 1.5 GiB. */ #ifdef CONFIG_RANDOMIZE_BASE #define KERNEL_IMAGE_SIZE … #else #define KERNEL_IMAGE_SIZE … #endif #endif /* _ASM_X86_PAGE_64_DEFS_H */