52e6ca670ed0cc6d8c7e4d993cb017c1325dd77d
[cascardo/linux.git] / arch / x86 / include / asm / boot.h
1 #ifndef _ASM_X86_BOOT_H
2 #define _ASM_X86_BOOT_H
3
4
5 #include <asm/pgtable_types.h>
6 #include <uapi/asm/boot.h>
7
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))
12
13 /* Minimum kernel alignment, as a power of two */
14 #ifdef CONFIG_X86_64
15 # define MIN_KERNEL_ALIGN_LG2   PMD_SHIFT
16 #else
17 # define MIN_KERNEL_ALIGN_LG2   (PAGE_SHIFT + THREAD_SIZE_ORDER)
18 #endif
19 #define MIN_KERNEL_ALIGN        (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2)
20
21 #if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \
22         (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN)
23 # error "Invalid value for CONFIG_PHYSICAL_ALIGN"
24 #endif
25
26 #ifdef CONFIG_KERNEL_BZIP2
27 # define BOOT_HEAP_SIZE         0x400000
28 #else /* !CONFIG_KERNEL_BZIP2 */
29 # define BOOT_HEAP_SIZE          0x10000
30 #endif
31
32 #ifdef CONFIG_X86_64
33 # define BOOT_STACK_SIZE        0x4000
34 #else /* !CONFIG_X86_64 */
35 # define BOOT_STACK_SIZE        0x1000
36 #endif
37
38 #endif /* _ASM_X86_BOOT_H */