0001
0002 #ifndef _ASM_X86_BOOT_H
0003 #define _ASM_X86_BOOT_H
0004
0005
0006 #include <asm/pgtable_types.h>
0007 #include <uapi/asm/boot.h>
0008
0009
0010 #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
0011 + (CONFIG_PHYSICAL_ALIGN - 1)) \
0012 & ~(CONFIG_PHYSICAL_ALIGN - 1))
0013
0014
0015 #ifdef CONFIG_X86_64
0016 # define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
0017 #else
0018 # define MIN_KERNEL_ALIGN_LG2 (PAGE_SHIFT + THREAD_SIZE_ORDER)
0019 #endif
0020 #define MIN_KERNEL_ALIGN (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2)
0021
0022 #if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \
0023 (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN)
0024 # error "Invalid value for CONFIG_PHYSICAL_ALIGN"
0025 #endif
0026
0027 #if defined(CONFIG_KERNEL_BZIP2)
0028 # define BOOT_HEAP_SIZE 0x400000
0029 #elif defined(CONFIG_KERNEL_ZSTD)
0030
0031
0032
0033
0034
0035 # define BOOT_HEAP_SIZE 0x30000
0036 #else
0037 # define BOOT_HEAP_SIZE 0x10000
0038 #endif
0039
0040 #ifdef CONFIG_X86_64
0041 # define BOOT_STACK_SIZE 0x4000
0042
0043 # define BOOT_INIT_PGT_SIZE (6*4096)
0044 # ifdef CONFIG_RANDOMIZE_BASE
0045
0046
0047
0048
0049
0050
0051
0052 # ifdef CONFIG_X86_VERBOSE_BOOTUP
0053 # define BOOT_PGT_SIZE (19*4096)
0054 # else
0055 # define BOOT_PGT_SIZE (17*4096)
0056 # endif
0057 # else
0058 # define BOOT_PGT_SIZE BOOT_INIT_PGT_SIZE
0059 # endif
0060
0061 #else
0062 # define BOOT_STACK_SIZE 0x1000
0063 #endif
0064
0065 #endif