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