diff options
author | Yinghai Lu <yinghai@kernel.org> | 2013-01-24 15:20:01 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2013-01-29 18:26:19 -0500 |
commit | d3c433bf9a01b6951286ec2cbf52e3549623d878 (patch) | |
tree | 84fe3454e2c5668471d338f41482b1c9428f43ec | |
parent | 187a8a73cee295b9407de0d6bfba65471a1f39d6 (diff) |
x86, boot: Move lldt/ltr out of 64bit code section
commit 08da5a2ca
x86_64: Early segment setup for VT
sets up LDT and TR into a valid state in order to speed up boot
decompression under VT.
Those code are put in code64, and it is using GDT that is only
loaded from code32 path.
That breaks booting with 64bit bootloader that does not go through
code32 path and jump to startup_64 directly, and it has different
GDT.
Move those lines into code32 after their GDT is loaded.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Link: http://lkml.kernel.org/r/1359058816-7615-21-git-send-email-yinghai@kernel.org
Cc: Zachary Amsden <zamsden@gmail.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | arch/x86/boot/compressed/head_64.S | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index fb984c0c0c99..5c80b94f6c4a 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
@@ -154,6 +154,12 @@ ENTRY(startup_32) | |||
154 | btsl $_EFER_LME, %eax | 154 | btsl $_EFER_LME, %eax |
155 | wrmsr | 155 | wrmsr |
156 | 156 | ||
157 | /* After gdt is loaded */ | ||
158 | xorl %eax, %eax | ||
159 | lldt %ax | ||
160 | movl $0x20, %eax | ||
161 | ltr %ax | ||
162 | |||
157 | /* | 163 | /* |
158 | * Setup for the jump to 64bit mode | 164 | * Setup for the jump to 64bit mode |
159 | * | 165 | * |
@@ -239,9 +245,6 @@ preferred_addr: | |||
239 | movl %eax, %ss | 245 | movl %eax, %ss |
240 | movl %eax, %fs | 246 | movl %eax, %fs |
241 | movl %eax, %gs | 247 | movl %eax, %gs |
242 | lldt %ax | ||
243 | movl $0x20, %eax | ||
244 | ltr %ax | ||
245 | 248 | ||
246 | /* | 249 | /* |
247 | * Compute the decompressed kernel start address. It is where | 250 | * Compute the decompressed kernel start address. It is where |