]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - arch/x86/include/asm/boot.h
UBUNTU: Ubuntu-4.13.0-45.50
[mirror_ubuntu-artful-kernel.git] / arch / x86 / include / asm / boot.h
CommitLineData
1965aae3
PA
1#ifndef _ASM_X86_BOOT_H
2#define _ASM_X86_BOOT_H
1da177e4 3
95c4bff0 4
658dbfeb 5#include <asm/pgtable_types.h>
af170c50 6#include <uapi/asm/boot.h>
37ba7ab5 7
beb7dd86 8/* Physical address where kernel should be loaded. */
dd0ec16f
VG
9#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
10 + (CONFIG_PHYSICAL_ALIGN - 1)) \
e69f202d
VG
11 & ~(CONFIG_PHYSICAL_ALIGN - 1))
12
37ba7ab5 13/* Minimum kernel alignment, as a power of two */
22f4319d 14#ifdef CONFIG_X86_64
8665e6ff 15# define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
37ba7ab5 16#else
8665e6ff 17# define MIN_KERNEL_ALIGN_LG2 (PAGE_SHIFT + THREAD_SIZE_ORDER)
37ba7ab5
PA
18#endif
19#define MIN_KERNEL_ALIGN (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2)
20
21#if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \
6fc108a0 22 (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN)
8665e6ff 23# error "Invalid value for CONFIG_PHYSICAL_ALIGN"
37ba7ab5
PA
24#endif
25
95c4bff0 26#ifdef CONFIG_KERNEL_BZIP2
8665e6ff 27# define BOOT_HEAP_SIZE 0x400000
95c4bff0 28#else /* !CONFIG_KERNEL_BZIP2 */
8665e6ff
KC
29# define BOOT_HEAP_SIZE 0x10000
30#endif
ae03c499
AK
31
32#ifdef CONFIG_X86_64
8665e6ff 33# define BOOT_STACK_SIZE 0x4000
3a94707d
KC
34
35# define BOOT_INIT_PGT_SIZE (6*4096)
36# ifdef CONFIG_RANDOMIZE_BASE
37/*
38 * Assuming all cross the 512GB boundary:
39 * 1 page for level4
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).
42 * Total is 19 pages.
43 */
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)
48# endif
49# else /* !CONFIG_RANDOMIZE_BASE */
50# define BOOT_PGT_SIZE BOOT_INIT_PGT_SIZE
51# endif
52
8665e6ff
KC
53#else /* !CONFIG_X86_64 */
54# define BOOT_STACK_SIZE 0x1000
7c539764
AH
55#endif
56
1965aae3 57#endif /* _ASM_X86_BOOT_H */