blob: 5e1a2eef3e7cadc5333368ffa5be053692e33e3a [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
Linus Torvalds1da177e2005-04-16 15:20:36 -07004/* Internal svga startup constants */
5#define NORMAL_VGA 0xffff /* 80x25 mode */
6#define EXTENDED_VGA 0xfffe /* 80x50 mode */
7#define ASK_VGA 0xfffd /* ask for it at bootup */
8
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +03009#ifdef __KERNEL__
10
H. Peter Anvin658dbfe2009-06-25 15:16:06 -070011#include <asm/pgtable_types.h>
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070012
Robert P. J. Daybeb7dd82007-05-09 07:14:03 +020013/* Physical address where kernel should be loaded. */
Vivek Goyaldd0ec162007-01-05 16:36:30 -080014#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
15 + (CONFIG_PHYSICAL_ALIGN - 1)) \
Vivek Goyale69f2022006-12-07 02:14:04 +010016 & ~(CONFIG_PHYSICAL_ALIGN - 1))
17
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070018/* Minimum kernel alignment, as a power of two */
Robert P. J. Day22f43192009-06-25 16:20:48 -040019#ifdef CONFIG_X86_64
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070020#define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT
21#else
H. Peter Anvin658dbfe2009-06-25 15:16:06 -070022#define MIN_KERNEL_ALIGN_LG2 (PAGE_SHIFT + THREAD_ORDER)
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070023#endif
24#define MIN_KERNEL_ALIGN (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2)
25
26#if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \
Jan Beulich6fc108a2010-04-21 15:23:44 +010027 (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN)
H. Peter Anvin37ba7ab2009-05-11 15:56:08 -070028#error "Invalid value for CONFIG_PHYSICAL_ALIGN"
29#endif
30
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030031#ifdef CONFIG_KERNEL_BZIP2
Alain Knaffae03c492009-01-04 22:46:17 +010032#define BOOT_HEAP_SIZE 0x400000
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030033#else /* !CONFIG_KERNEL_BZIP2 */
Alain Knaffae03c492009-01-04 22:46:17 +010034
Lasse Collin30314802011-01-12 17:01:24 -080035#define BOOT_HEAP_SIZE 0x8000
Alain Knaffae03c492009-01-04 22:46:17 +010036
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030037#endif /* !CONFIG_KERNEL_BZIP2 */
Alain Knaffae03c492009-01-04 22:46:17 +010038
39#ifdef CONFIG_X86_64
40#define BOOT_STACK_SIZE 0x4000
41#else
Alexander van Heukelum7c539762008-04-08 12:54:30 +020042#define BOOT_STACK_SIZE 0x1000
43#endif
44
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030045#endif /* __KERNEL__ */
46
H. Peter Anvin1965aae2008-10-22 22:26:29 -070047#endif /* _ASM_X86_BOOT_H */