1
2 #ifndef _ASM_X86_BOOT_H
3 #define _ASM_X86_BOOT_H
4
5
6 #include <asm/pgtable_types.h>
7 #include <uapi/asm/boot.h>
8
9
10 #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
11 + (CONFIG_PHYSICAL_ALIGN - 1)) \
12 & ~(CONFIG_PHYSICAL_ALIGN - 1))
13
14
15 #ifdef CONFIG_X86_64
16 # define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
17 #else
18 # define MIN_KERNEL_ALIGN_LG2 (PAGE_SHIFT + THREAD_SIZE_ORDER)
19 #endif
20 #define MIN_KERNEL_ALIGN (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2)
21
22 #if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \
23 (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN)
24 # error "Invalid value for CONFIG_PHYSICAL_ALIGN"
25 #endif
26
27 #ifdef CONFIG_KERNEL_BZIP2
28 # define BOOT_HEAP_SIZE 0x400000
29 #else
30 # define BOOT_HEAP_SIZE 0x10000
31 #endif
32
33 #ifdef CONFIG_X86_64
34 # define BOOT_STACK_SIZE 0x4000
35
36 # define BOOT_INIT_PGT_SIZE (6*4096)
37 # ifdef CONFIG_RANDOMIZE_BASE
38
39
40
41
42
43
44
45 # ifdef CONFIG_X86_VERBOSE_BOOTUP
46 # define BOOT_PGT_SIZE (19*4096)
47 # else
48 # define BOOT_PGT_SIZE (17*4096)
49 # endif
50 # else
51 # define BOOT_PGT_SIZE BOOT_INIT_PGT_SIZE
52 # endif
53
54 #else
55 # define BOOT_STACK_SIZE 0x1000
56 #endif
57
58 #endif