H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_BOOT_H |
| 2 | #define _ASM_X86_BOOT_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
Cyrill Gorcunov | 95c4bff | 2009-01-14 23:37:46 +0300 | [diff] [blame] | 4 | |
H. Peter Anvin | 658dbfe | 2009-06-25 15:16:06 -0700 | [diff] [blame] | 5 | #include <asm/pgtable_types.h> |
David Howells | af170c5 | 2012-12-14 22:37:13 +0000 | [diff] [blame] | 6 | #include <uapi/asm/boot.h> |
H. Peter Anvin | 37ba7ab | 2009-05-11 15:56:08 -0700 | [diff] [blame] | 7 | |
Robert P. J. Day | beb7dd8 | 2007-05-09 07:14:03 +0200 | [diff] [blame] | 8 | /* Physical address where kernel should be loaded. */ |
Vivek Goyal | dd0ec16 | 2007-01-05 16:36:30 -0800 | [diff] [blame] | 9 | #define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ |
| 10 | + (CONFIG_PHYSICAL_ALIGN - 1)) \ |
Vivek Goyal | e69f202 | 2006-12-07 02:14:04 +0100 | [diff] [blame] | 11 | & ~(CONFIG_PHYSICAL_ALIGN - 1)) |
| 12 | |
H. Peter Anvin | 37ba7ab | 2009-05-11 15:56:08 -0700 | [diff] [blame] | 13 | /* Minimum kernel alignment, as a power of two */ |
Robert P. J. Day | 22f4319 | 2009-06-25 16:20:48 -0400 | [diff] [blame] | 14 | #ifdef CONFIG_X86_64 |
H. Peter Anvin | 37ba7ab | 2009-05-11 15:56:08 -0700 | [diff] [blame] | 15 | #define MIN_KERNEL_ALIGN_LG2 PMD_SHIFT |
| 16 | #else |
Thomas Gleixner | 38e7c57 | 2012-05-05 15:05:42 +0000 | [diff] [blame] | 17 | #define MIN_KERNEL_ALIGN_LG2 (PAGE_SHIFT + THREAD_SIZE_ORDER) |
H. Peter Anvin | 37ba7ab | 2009-05-11 15:56:08 -0700 | [diff] [blame] | 18 | #endif |
| 19 | #define MIN_KERNEL_ALIGN (_AC(1, UL) << MIN_KERNEL_ALIGN_LG2) |
| 20 | |
| 21 | #if (CONFIG_PHYSICAL_ALIGN & (CONFIG_PHYSICAL_ALIGN-1)) || \ |
Jan Beulich | 6fc108a | 2010-04-21 15:23:44 +0100 | [diff] [blame] | 22 | (CONFIG_PHYSICAL_ALIGN < MIN_KERNEL_ALIGN) |
H. Peter Anvin | 37ba7ab | 2009-05-11 15:56:08 -0700 | [diff] [blame] | 23 | #error "Invalid value for CONFIG_PHYSICAL_ALIGN" |
| 24 | #endif |
| 25 | |
Cyrill Gorcunov | 95c4bff | 2009-01-14 23:37:46 +0300 | [diff] [blame] | 26 | #ifdef CONFIG_KERNEL_BZIP2 |
Alain Knaff | ae03c49 | 2009-01-04 22:46:17 +0100 | [diff] [blame] | 27 | #define BOOT_HEAP_SIZE 0x400000 |
Cyrill Gorcunov | 95c4bff | 2009-01-14 23:37:46 +0300 | [diff] [blame] | 28 | #else /* !CONFIG_KERNEL_BZIP2 */ |
Alain Knaff | ae03c49 | 2009-01-04 22:46:17 +0100 | [diff] [blame] | 29 | |
Lasse Collin | 3031480 | 2011-01-12 17:01:24 -0800 | [diff] [blame] | 30 | #define BOOT_HEAP_SIZE 0x8000 |
Alain Knaff | ae03c49 | 2009-01-04 22:46:17 +0100 | [diff] [blame] | 31 | |
Cyrill Gorcunov | 95c4bff | 2009-01-14 23:37:46 +0300 | [diff] [blame] | 32 | #endif /* !CONFIG_KERNEL_BZIP2 */ |
Alain Knaff | ae03c49 | 2009-01-04 22:46:17 +0100 | [diff] [blame] | 33 | |
| 34 | #ifdef CONFIG_X86_64 |
| 35 | #define BOOT_STACK_SIZE 0x4000 |
| 36 | #else |
Alexander van Heukelum | 7c53976 | 2008-04-08 12:54:30 +0200 | [diff] [blame] | 37 | #define BOOT_STACK_SIZE 0x1000 |
| 38 | #endif |
| 39 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 40 | #endif /* _ASM_X86_BOOT_H */ |