1 #ifndef _ASM_X86_BOOT_H
2 #define _ASM_X86_BOOT_H
5 #include <asm/pgtable_types.h>
6 #include <uapi/asm/boot.h>
8 /* Physical address where kernel should be loaded. */
9 #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
10 + (CONFIG_PHYSICAL_ALIGN - 1)) \
11 & ~(CONFIG_PHYSICAL_ALIGN - 1))
13 /* Minimum kernel alignment, as a power of two */
15 # define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
17 # define MIN_KERNEL_ALIGN_LG2 (PAGE_SHIFT + THREAD_SIZE_ORDER)
19 #define MIN_KERNEL_ALIGN (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2)
21 #if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \
22 (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN)
23 # error "Invalid value for CONFIG_PHYSICAL_ALIGN"
26 #ifdef CONFIG_KERNEL_BZIP2
27 # define BOOT_HEAP_SIZE 0x400000
28 #else /* !CONFIG_KERNEL_BZIP2 */
29 # define BOOT_HEAP_SIZE 0x10000
33 # define BOOT_STACK_SIZE 0x4000
35 # define BOOT_INIT_PGT_SIZE (6*4096)
36 # ifdef CONFIG_RANDOMIZE_BASE
38 * Assuming all cross the 512GB boundary:
40 * (2+2)*4 pages for kernel, param, cmd_line, and randomized kernel
41 * 2 pages for first 2M (video RAM: CONFIG_X86_VERBOSE_BOOTUP).
44 # ifdef CONFIG_X86_VERBOSE_BOOTUP
45 # define BOOT_PGT_SIZE (19*4096)
46 # else /* !CONFIG_X86_VERBOSE_BOOTUP */
47 # define BOOT_PGT_SIZE (17*4096)
49 # else /* !CONFIG_RANDOMIZE_BASE */
50 # define BOOT_PGT_SIZE BOOT_INIT_PGT_SIZE
53 #else /* !CONFIG_X86_64 */
54 # define BOOT_STACK_SIZE 0x1000
57 #endif /* _ASM_X86_BOOT_H */