aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-01-24 15:20:00 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-01-29 18:26:15 -0500
commit187a8a73cee295b9407de0d6bfba65471a1f39d6 (patch)
tree0d6d75aa30458cac69e9f3a79508c4b8698acbde /arch/x86/boot
parent3db07e70f0b4742f8daeda5c4aa8fbe7aeb3799e (diff)
x86, boot: Move verify_cpu.S and no_longmode down
We need to move some code to 32bit section in following patch: x86, boot: Move lldt/ltr out of 64bit code section but that will push startup_64 down from 0x200. According to hpa, we can not change startup_64 position and that is an ABI. We could move function verify_cpu and no_longmode down, because verify_cpu is used via function call and no_longmode will not return, then we don't need to add extra code for jumping back. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Link: http://lkml.kernel.org/r/1359058816-7615-20-git-send-email-yinghai@kernel.org Cc: Matt Fleming <matt.fleming@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/compressed/head_64.S17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 2c4b171eec33..fb984c0c0c99 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -176,14 +176,6 @@ ENTRY(startup_32)
176 lret 176 lret
177ENDPROC(startup_32) 177ENDPROC(startup_32)
178 178
179no_longmode:
180 /* This isn't an x86-64 CPU so hang */
1811:
182 hlt
183 jmp 1b
184
185#include "../../kernel/verify_cpu.S"
186
187 /* 179 /*
188 * Be careful here startup_64 needs to be at a predictable 180 * Be careful here startup_64 needs to be at a predictable
189 * address so I can export it in an ELF header. Bootloaders 181 * address so I can export it in an ELF header. Bootloaders
@@ -349,6 +341,15 @@ relocated:
349 */ 341 */
350 jmp *%rbp 342 jmp *%rbp
351 343
344 .code32
345no_longmode:
346 /* This isn't an x86-64 CPU so hang */
3471:
348 hlt
349 jmp 1b
350
351#include "../../kernel/verify_cpu.S"
352
352 .data 353 .data
353gdt: 354gdt:
354 .word gdt_end - gdt 355 .word gdt_end - gdt