diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/boot/compressed/head_32.S | 10 | ||||
-rw-r--r-- | arch/x86/boot/compressed/head_64.S | 16 |
2 files changed, 12 insertions, 14 deletions
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index 59425e157df3..d7245cf80261 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
@@ -88,6 +88,9 @@ ENTRY(startup_32) | |||
88 | addl $4095, %ebx | 88 | addl $4095, %ebx |
89 | andl $~4095, %ebx | 89 | andl $~4095, %ebx |
90 | 90 | ||
91 | /* Set up the stack */ | ||
92 | leal boot_stack_end(%ebx), %esp | ||
93 | |||
91 | /* | 94 | /* |
92 | * Copy the compressed kernel to the end of our buffer | 95 | * Copy the compressed kernel to the end of our buffer |
93 | * where decompression in place becomes safe. | 96 | * where decompression in place becomes safe. |
@@ -122,7 +125,7 @@ ENDPROC(startup_32) | |||
122 | relocated: | 125 | relocated: |
123 | 126 | ||
124 | /* | 127 | /* |
125 | * Clear BSS | 128 | * Clear BSS (stack is currently empty) |
126 | */ | 129 | */ |
127 | xorl %eax, %eax | 130 | xorl %eax, %eax |
128 | leal _bss(%ebx), %edi | 131 | leal _bss(%ebx), %edi |
@@ -132,11 +135,6 @@ relocated: | |||
132 | rep stosb | 135 | rep stosb |
133 | 136 | ||
134 | /* | 137 | /* |
135 | * Setup the stack for the decompressor | ||
136 | */ | ||
137 | leal boot_stack_end(%ebx), %esp | ||
138 | |||
139 | /* | ||
140 | * Do the decompression, and jump to the new kernel.. | 138 | * Do the decompression, and jump to the new kernel.. |
141 | */ | 139 | */ |
142 | movl output_len(%ebx), %eax | 140 | movl output_len(%ebx), %eax |
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 5bc9052615b6..a0b18426069a 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
@@ -249,6 +249,13 @@ ENTRY(startup_64) | |||
249 | addq $(32768 + 18 + 4095), %rbx | 249 | addq $(32768 + 18 + 4095), %rbx |
250 | andq $~4095, %rbx | 250 | andq $~4095, %rbx |
251 | 251 | ||
252 | /* Set up the stack */ | ||
253 | leaq boot_stack_end(%rbx), %rsp | ||
254 | |||
255 | /* Zero EFLAGS */ | ||
256 | pushq $0 | ||
257 | popfq | ||
258 | |||
252 | /* | 259 | /* |
253 | * Copy the compressed kernel to the end of our buffer | 260 | * Copy the compressed kernel to the end of our buffer |
254 | * where decompression in place becomes safe. | 261 | * where decompression in place becomes safe. |
@@ -273,7 +280,7 @@ ENTRY(startup_64) | |||
273 | relocated: | 280 | relocated: |
274 | 281 | ||
275 | /* | 282 | /* |
276 | * Clear BSS | 283 | * Clear BSS (stack is currently empty) |
277 | */ | 284 | */ |
278 | xorq %rax, %rax | 285 | xorq %rax, %rax |
279 | leaq _bss(%rbx), %rdi | 286 | leaq _bss(%rbx), %rdi |
@@ -282,13 +289,6 @@ relocated: | |||
282 | cld | 289 | cld |
283 | rep stosb | 290 | rep stosb |
284 | 291 | ||
285 | /* Setup the stack */ | ||
286 | leaq boot_stack_end(%rip), %rsp | ||
287 | |||
288 | /* zero EFLAGS after setting rsp */ | ||
289 | pushq $0 | ||
290 | popfq | ||
291 | |||
292 | /* | 292 | /* |
293 | * Do the decompression, and jump to the new kernel.. | 293 | * Do the decompression, and jump to the new kernel.. |
294 | */ | 294 | */ |