blob: 7a1065958ba9d3f1c5a26b9862864e4707418916 [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)) || \
27 (CONFIG_PHYSICAL_ALIGN < (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2))
28#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
Alexander van Heukelum7c539762008-04-08 12:54:30 +020035#ifdef CONFIG_X86_64
36#define BOOT_HEAP_SIZE 0x7000
Alexander van Heukelum7c539762008-04-08 12:54:30 +020037#else
38#define BOOT_HEAP_SIZE 0x4000
Alain Knaffae03c492009-01-04 22:46:17 +010039#endif
40
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030041#endif /* !CONFIG_KERNEL_BZIP2 */
Alain Knaffae03c492009-01-04 22:46:17 +010042
43#ifdef CONFIG_X86_64
44#define BOOT_STACK_SIZE 0x4000
45#else
Alexander van Heukelum7c539762008-04-08 12:54:30 +020046#define BOOT_STACK_SIZE 0x1000
47#endif
48
Cyrill Gorcunov95c4bff2009-01-14 23:37:46 +030049#endif /* __KERNEL__ */
50
H. Peter Anvin1965aae2008-10-22 22:26:29 -070051#endif /* _ASM_X86_BOOT_H */