aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/a20.c2
-rw-r--r--arch/x86/boot/apm.c2
-rw-r--r--arch/x86/boot/bitops.h2
-rw-r--r--arch/x86/boot/boot.h2
-rw-r--r--arch/x86/boot/cmdline.c2
-rw-r--r--arch/x86/boot/compressed/head_32.S15
-rw-r--r--arch/x86/boot/compressed/head_64.S30
-rw-r--r--arch/x86/boot/compressed/misc.c8
-rw-r--r--arch/x86/boot/compressed/vmlinux_64.lds4
-rw-r--r--arch/x86/boot/copy.S2
-rw-r--r--arch/x86/boot/cpucheck.c2
-rw-r--r--arch/x86/boot/edd.c2
-rw-r--r--arch/x86/boot/install.sh2
-rw-r--r--arch/x86/boot/main.c2
-rw-r--r--arch/x86/boot/mca.c2
-rw-r--r--arch/x86/boot/memory.c2
-rw-r--r--arch/x86/boot/pm.c2
-rw-r--r--arch/x86/boot/pmjump.S2
-rw-r--r--arch/x86/boot/printf.c2
-rw-r--r--arch/x86/boot/string.c2
-rw-r--r--arch/x86/boot/tty.c2
-rw-r--r--arch/x86/boot/version.c2
-rw-r--r--arch/x86/boot/video-bios.c2
-rw-r--r--arch/x86/boot/video-vesa.c2
-rw-r--r--arch/x86/boot/video-vga.c2
-rw-r--r--arch/x86/boot/video.c2
-rw-r--r--arch/x86/boot/video.h2
-rw-r--r--arch/x86/boot/voyager.c2
28 files changed, 29 insertions, 76 deletions
diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c
index 31348d054fca..90943f83e84d 100644
--- a/arch/x86/boot/a20.c
+++ b/arch/x86/boot/a20.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/a20.c
13 *
14 * Enable A20 gate (return -1 on failure) 12 * Enable A20 gate (return -1 on failure)
15 */ 13 */
16 14
diff --git a/arch/x86/boot/apm.c b/arch/x86/boot/apm.c
index c117c7fb859c..7aa6033001f9 100644
--- a/arch/x86/boot/apm.c
+++ b/arch/x86/boot/apm.c
@@ -12,8 +12,6 @@
12 * ----------------------------------------------------------------------- */ 12 * ----------------------------------------------------------------------- */
13 13
14/* 14/*
15 * arch/i386/boot/apm.c
16 *
17 * Get APM BIOS information 15 * Get APM BIOS information
18 */ 16 */
19 17
diff --git a/arch/x86/boot/bitops.h b/arch/x86/boot/bitops.h
index 8dcc8dc7db88..878e4b9940d9 100644
--- a/arch/x86/boot/bitops.h
+++ b/arch/x86/boot/bitops.h
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/bitops.h
13 *
14 * Very simple bitops for the boot code. 12 * Very simple bitops for the boot code.
15 */ 13 */
16 14
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index 09578070bfba..a34b9982c7cb 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/boot.h
13 *
14 * Header file for the real-mode kernel code 12 * Header file for the real-mode kernel code
15 */ 13 */
16 14
diff --git a/arch/x86/boot/cmdline.c b/arch/x86/boot/cmdline.c
index 680408a0f463..a1d35634bce0 100644
--- a/arch/x86/boot/cmdline.c
+++ b/arch/x86/boot/cmdline.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/cmdline.c
13 *
14 * Simple command-line parser for early boot. 12 * Simple command-line parser for early boot.
15 */ 13 */
16 14
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index 036e635f18a3..ba7736cf2ec7 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -130,7 +130,7 @@ relocated:
130/* 130/*
131 * Setup the stack for the decompressor 131 * Setup the stack for the decompressor
132 */ 132 */
133 leal stack_end(%ebx), %esp 133 leal boot_stack_end(%ebx), %esp
134 134
135/* 135/*
136 * Do the decompression, and jump to the new kernel.. 136 * Do the decompression, and jump to the new kernel..
@@ -142,8 +142,8 @@ relocated:
142 pushl %eax # input_len 142 pushl %eax # input_len
143 leal input_data(%ebx), %eax 143 leal input_data(%ebx), %eax
144 pushl %eax # input_data 144 pushl %eax # input_data
145 leal _end(%ebx), %eax 145 leal boot_heap(%ebx), %eax
146 pushl %eax # end of the image as third argument 146 pushl %eax # heap area as third argument
147 pushl %esi # real mode pointer as second arg 147 pushl %esi # real mode pointer as second arg
148 call decompress_kernel 148 call decompress_kernel
149 addl $20, %esp 149 addl $20, %esp
@@ -181,7 +181,10 @@ relocated:
181 jmp *%ebp 181 jmp *%ebp
182 182
183.bss 183.bss
184/* Stack and heap for uncompression */
184.balign 4 185.balign 4
185stack: 186boot_heap:
186 .fill 4096, 1, 0 187 .fill BOOT_HEAP_SIZE, 1, 0
187stack_end: 188boot_stack:
189 .fill BOOT_STACK_SIZE, 1, 0
190boot_stack_end:
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index e8657b98c902..d8819efac81d 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -28,6 +28,7 @@
28#include <asm/segment.h> 28#include <asm/segment.h>
29#include <asm/pgtable.h> 29#include <asm/pgtable.h>
30#include <asm/page.h> 30#include <asm/page.h>
31#include <asm/boot.h>
31#include <asm/msr.h> 32#include <asm/msr.h>
32#include <asm/asm-offsets.h> 33#include <asm/asm-offsets.h>
33 34
@@ -62,7 +63,7 @@ startup_32:
62 subl $1b, %ebp 63 subl $1b, %ebp
63 64
64/* setup a stack and make sure cpu supports long mode. */ 65/* setup a stack and make sure cpu supports long mode. */
65 movl $user_stack_end, %eax 66 movl $boot_stack_end, %eax
66 addl %ebp, %eax 67 addl %ebp, %eax
67 movl %eax, %esp 68 movl %eax, %esp
68 69
@@ -243,9 +244,9 @@ ENTRY(startup_64)
243/* Copy the compressed kernel to the end of our buffer 244/* Copy the compressed kernel to the end of our buffer
244 * where decompression in place becomes safe. 245 * where decompression in place becomes safe.
245 */ 246 */
246 leaq _end(%rip), %r8 247 leaq _end_before_pgt(%rip), %r8
247 leaq _end(%rbx), %r9 248 leaq _end_before_pgt(%rbx), %r9
248 movq $_end /* - $startup_32 */, %rcx 249 movq $_end_before_pgt /* - $startup_32 */, %rcx
2491: subq $8, %r8 2501: subq $8, %r8
250 subq $8, %r9 251 subq $8, %r9
251 movq 0(%r8), %rax 252 movq 0(%r8), %rax
@@ -267,14 +268,14 @@ relocated:
267 */ 268 */
268 xorq %rax, %rax 269 xorq %rax, %rax
269 leaq _edata(%rbx), %rdi 270 leaq _edata(%rbx), %rdi
270 leaq _end(%rbx), %rcx 271 leaq _end_before_pgt(%rbx), %rcx
271 subq %rdi, %rcx 272 subq %rdi, %rcx
272 cld 273 cld
273 rep 274 rep
274 stosb 275 stosb
275 276
276 /* Setup the stack */ 277 /* Setup the stack */
277 leaq user_stack_end(%rip), %rsp 278 leaq boot_stack_end(%rip), %rsp
278 279
279 /* zero EFLAGS after setting rsp */ 280 /* zero EFLAGS after setting rsp */
280 pushq $0 281 pushq $0
@@ -285,7 +286,7 @@ relocated:
285 */ 286 */
286 pushq %rsi # Save the real mode argument 287 pushq %rsi # Save the real mode argument
287 movq %rsi, %rdi # real mode address 288 movq %rsi, %rdi # real mode address
288 leaq _heap(%rip), %rsi # _heap 289 leaq boot_heap(%rip), %rsi # malloc area for uncompression
289 leaq input_data(%rip), %rdx # input_data 290 leaq input_data(%rip), %rdx # input_data
290 movl input_len(%rip), %eax 291 movl input_len(%rip), %eax
291 movq %rax, %rcx # input_len 292 movq %rax, %rcx # input_len
@@ -310,9 +311,12 @@ gdt:
310 .quad 0x0080890000000000 /* TS descriptor */ 311 .quad 0x0080890000000000 /* TS descriptor */
311 .quad 0x0000000000000000 /* TS continued */ 312 .quad 0x0000000000000000 /* TS continued */
312gdt_end: 313gdt_end:
313 .bss 314
314/* Stack for uncompression */ 315.bss
315 .balign 4 316/* Stack and heap for uncompression */
316user_stack: 317.balign 4
317 .fill 4096,4,0 318boot_heap:
318user_stack_end: 319 .fill BOOT_HEAP_SIZE, 1, 0
320boot_stack:
321 .fill BOOT_STACK_SIZE, 1, 0
322boot_stack_end:
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c
index dad4e699f5a3..90456cee47c3 100644
--- a/arch/x86/boot/compressed/misc.c
+++ b/arch/x86/boot/compressed/misc.c
@@ -217,12 +217,6 @@ static void putstr(const char *);
217static memptr free_mem_ptr; 217static memptr free_mem_ptr;
218static memptr free_mem_end_ptr; 218static memptr free_mem_end_ptr;
219 219
220#ifdef CONFIG_X86_64
221#define HEAP_SIZE 0x7000
222#else
223#define HEAP_SIZE 0x4000
224#endif
225
226static char *vidmem; 220static char *vidmem;
227static int vidport; 221static int vidport;
228static int lines, cols; 222static int lines, cols;
@@ -449,7 +443,7 @@ asmlinkage void decompress_kernel(void *rmode, memptr heap,
449 443
450 window = output; /* Output buffer (Normally at 1M) */ 444 window = output; /* Output buffer (Normally at 1M) */
451 free_mem_ptr = heap; /* Heap */ 445 free_mem_ptr = heap; /* Heap */
452 free_mem_end_ptr = heap + HEAP_SIZE; 446 free_mem_end_ptr = heap + BOOT_HEAP_SIZE;
453 inbuf = input_data; /* Input buffer */ 447 inbuf = input_data; /* Input buffer */
454 insize = input_len; 448 insize = input_len;
455 inptr = 0; 449 inptr = 0;
diff --git a/arch/x86/boot/compressed/vmlinux_64.lds b/arch/x86/boot/compressed/vmlinux_64.lds
index 7e5c7209f6cc..bef1ac891bce 100644
--- a/arch/x86/boot/compressed/vmlinux_64.lds
+++ b/arch/x86/boot/compressed/vmlinux_64.lds
@@ -39,10 +39,10 @@ SECTIONS
39 *(.bss.*) 39 *(.bss.*)
40 *(COMMON) 40 *(COMMON)
41 . = ALIGN(8); 41 . = ALIGN(8);
42 _end = . ; 42 _end_before_pgt = . ;
43 . = ALIGN(4096); 43 . = ALIGN(4096);
44 pgtable = . ; 44 pgtable = . ;
45 . = . + 4096 * 6; 45 . = . + 4096 * 6;
46 _heap = .; 46 _ebss = .;
47 } 47 }
48} 48}
diff --git a/arch/x86/boot/copy.S b/arch/x86/boot/copy.S
index ef127e56a3cf..ef50c84e8b4b 100644
--- a/arch/x86/boot/copy.S
+++ b/arch/x86/boot/copy.S
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/copy.S
13 *
14 * Memory copy routines 12 * Memory copy routines
15 */ 13 */
16 14
diff --git a/arch/x86/boot/cpucheck.c b/arch/x86/boot/cpucheck.c
index 2462c88689ed..7804389ee005 100644
--- a/arch/x86/boot/cpucheck.c
+++ b/arch/x86/boot/cpucheck.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/cpucheck.c
13 *
14 * Check for obligatory CPU features and abort if the features are not 12 * Check for obligatory CPU features and abort if the features are not
15 * present. This code should be compilable as 16-, 32- or 64-bit 13 * present. This code should be compilable as 16-, 32- or 64-bit
16 * code, so be very careful with types and inline assembly. 14 * code, so be very careful with types and inline assembly.
diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c
index 8721dc46a0b6..d84a48ece785 100644
--- a/arch/x86/boot/edd.c
+++ b/arch/x86/boot/edd.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/edd.c
13 *
14 * Get EDD BIOS disk information 12 * Get EDD BIOS disk information
15 */ 13 */
16 14
diff --git a/arch/x86/boot/install.sh b/arch/x86/boot/install.sh
index 88d77761d01b..8d60ee15dfd9 100644
--- a/arch/x86/boot/install.sh
+++ b/arch/x86/boot/install.sh
@@ -1,7 +1,5 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# arch/i386/boot/install.sh
4#
5# This file is subject to the terms and conditions of the GNU General Public 3# This file is subject to the terms and conditions of the GNU General Public
6# License. See the file "COPYING" in the main directory of this archive 4# License. See the file "COPYING" in the main directory of this archive
7# for more details. 5# for more details.
diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c
index 7828da5cfd07..77569a4a3be1 100644
--- a/arch/x86/boot/main.c
+++ b/arch/x86/boot/main.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/main.c
13 *
14 * Main module for the real-mode kernel code 12 * Main module for the real-mode kernel code
15 */ 13 */
16 14
diff --git a/arch/x86/boot/mca.c b/arch/x86/boot/mca.c
index 68222f2d4b67..911eaae5d696 100644
--- a/arch/x86/boot/mca.c
+++ b/arch/x86/boot/mca.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/mca.c
13 *
14 * Get the MCA system description table 12 * Get the MCA system description table
15 */ 13 */
16 14
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
index e77d89f9e8aa..acad32eb4290 100644
--- a/arch/x86/boot/memory.c
+++ b/arch/x86/boot/memory.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/memory.c
13 *
14 * Memory detection code 12 * Memory detection code
15 */ 13 */
16 14
diff --git a/arch/x86/boot/pm.c b/arch/x86/boot/pm.c
index a93cb8bded4d..328956fdb59e 100644
--- a/arch/x86/boot/pm.c
+++ b/arch/x86/boot/pm.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/pm.c
13 *
14 * Prepare the machine for transition to protected mode. 12 * Prepare the machine for transition to protected mode.
15 */ 13 */
16 14
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S
index f5402d51f7c3..ab049d40a884 100644
--- a/arch/x86/boot/pmjump.S
+++ b/arch/x86/boot/pmjump.S
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/pmjump.S
13 *
14 * The actual transition into protected mode 12 * The actual transition into protected mode
15 */ 13 */
16 14
diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c
index 7e7e890699be..c1d00c0274c4 100644
--- a/arch/x86/boot/printf.c
+++ b/arch/x86/boot/printf.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/printf.c
13 *
14 * Oh, it's a waste of space, but oh-so-yummy for debugging. This 12 * Oh, it's a waste of space, but oh-so-yummy for debugging. This
15 * version of printf() does not include 64-bit support. "Live with 13 * version of printf() does not include 64-bit support. "Live with
16 * it." 14 * it."
diff --git a/arch/x86/boot/string.c b/arch/x86/boot/string.c
index 481a22097781..f94b7a0c2abf 100644
--- a/arch/x86/boot/string.c
+++ b/arch/x86/boot/string.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/string.c
13 *
14 * Very basic string functions 12 * Very basic string functions
15 */ 13 */
16 14
diff --git a/arch/x86/boot/tty.c b/arch/x86/boot/tty.c
index f3f14bd26371..0be77b39328a 100644
--- a/arch/x86/boot/tty.c
+++ b/arch/x86/boot/tty.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/tty.c
13 *
14 * Very simple screen I/O 12 * Very simple screen I/O
15 * XXX: Probably should add very simple serial I/O? 13 * XXX: Probably should add very simple serial I/O?
16 */ 14 */
diff --git a/arch/x86/boot/version.c b/arch/x86/boot/version.c
index c61462f7d9a7..2723d9b5ce43 100644
--- a/arch/x86/boot/version.c
+++ b/arch/x86/boot/version.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/version.c
13 *
14 * Kernel version string 12 * Kernel version string
15 */ 13 */
16 14
diff --git a/arch/x86/boot/video-bios.c b/arch/x86/boot/video-bios.c
index 39e247e96172..49f26aaaebc8 100644
--- a/arch/x86/boot/video-bios.c
+++ b/arch/x86/boot/video-bios.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video-bios.c
13 *
14 * Standard video BIOS modes 12 * Standard video BIOS modes
15 * 13 *
16 * We have two options for this; silent and scanned. 14 * We have two options for this; silent and scanned.
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c
index 5d5a3f6e8b5c..401ad998ad08 100644
--- a/arch/x86/boot/video-vesa.c
+++ b/arch/x86/boot/video-vesa.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video-vesa.c
13 *
14 * VESA text modes 12 * VESA text modes
15 */ 13 */
16 14
diff --git a/arch/x86/boot/video-vga.c b/arch/x86/boot/video-vga.c
index 330d6589a2ad..40ecb8d7688c 100644
--- a/arch/x86/boot/video-vga.c
+++ b/arch/x86/boot/video-vga.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video-vga.c
13 *
14 * Common all-VGA modes 12 * Common all-VGA modes
15 */ 13 */
16 14
diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c
index c1c47ba069ef..83598b23093a 100644
--- a/arch/x86/boot/video.c
+++ b/arch/x86/boot/video.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video.c
13 *
14 * Select video mode 12 * Select video mode
15 */ 13 */
16 14
diff --git a/arch/x86/boot/video.h b/arch/x86/boot/video.h
index d69347f79e8e..ee63f5d14461 100644
--- a/arch/x86/boot/video.h
+++ b/arch/x86/boot/video.h
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/video.h
13 *
14 * Header file for the real-mode video probing code 12 * Header file for the real-mode video probing code
15 */ 13 */
16 14
diff --git a/arch/x86/boot/voyager.c b/arch/x86/boot/voyager.c
index 6499e3239b41..433909d61e5c 100644
--- a/arch/x86/boot/voyager.c
+++ b/arch/x86/boot/voyager.c
@@ -9,8 +9,6 @@
9 * ----------------------------------------------------------------------- */ 9 * ----------------------------------------------------------------------- */
10 10
11/* 11/*
12 * arch/i386/boot/voyager.c
13 *
14 * Get the Voyager config information 12 * Get the Voyager config information
15 */ 13 */
16 14