blob: 4fa687a47a62d85d4fd84062c2a5fc7c622c1cc7 [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_BOOT_H
2#define _ASM_X86_BOOT_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +03004
H. Peter Anvin658dbfe2009-06-25 15:16:06 -07005#include <asm/pgtable_types.h>
David Howellsaf170c52012-12-14 22:37:13 +00006#include <uapi/asm/boot.h>
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -07007
Robert P. J. Daybeb7dd82007-05-09 07:14:03 +02008/* Physical address where kernel should be loaded. */
Vivek Goyaldd0ec162007-01-05 16:36:30 -08009#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
10 + (CONFIG_PHYSICAL_ALIGN - 1)) \
Vivek Goyale69f2022006-12-07 02:14:04 +010011 & ~(CONFIG_PHYSICAL_ALIGN - 1))
12
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070013/* Minimum kernel alignment, as a power of two */
Robert P. J. Day22f43192009-06-25 16:20:48 -040014#ifdef CONFIG_X86_64
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070015#define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
16#else
Thomas Gleixner38e7c572012-05-05 15:05:42 +000017#define MIN_KERNEL_ALIGN_LG2 (PAGE_SHIFT + THREAD_SIZE_ORDER)
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070018#endif
19#define MIN_KERNEL_ALIGN (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2)
20
21#if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \
Jan Beulich6fc108a2010-04-21 15:23:44 +010022 (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN)
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070023#error "Invalid value for CONFIG_PHYSICAL_ALIGN"
24#endif
25
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030026#ifdef CONFIG_KERNEL_BZIP2
Alain Knaffae03c492009-01-04 22:46:17 +010027#define BOOT_HEAP_SIZE 0x400000
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030028#else /* !CONFIG_KERNEL_BZIP2 */
Alain Knaffae03c492009-01-04 22:46:17 +010029
Lasse Collin30314802011-01-12 17:01:24 -080030#define BOOT_HEAP_SIZE 0x8000
Alain Knaffae03c492009-01-04 22:46:17 +010031
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030032#endif /* !CONFIG_KERNEL_BZIP2 */
Alain Knaffae03c492009-01-04 22:46:17 +010033
34#ifdef CONFIG_X86_64
35#define BOOT_STACK_SIZE 0x4000
36#else
Alexander van Heukelum7c539762008-04-08 12:54:30 +020037#define BOOT_STACK_SIZE 0x1000
38#endif
39
H. Peter Anvin1965aae2008-10-22 22:26:29 -070040#endif /* _ASM_X86_BOOT_H */