aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/head_64.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-22 23:05:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-22 23:05:49 -0700
commitf3670394c29ff3730638762c1760fd2f624e6d7b (patch)
tree1169572c9721d34b9ecd6144c812f8a760f746f4 /arch/x86/boot/compressed/head_64.S
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (diff)
downloadlinux-dev-f3670394c29ff3730638762c1760fd2f624e6d7b.tar.xz
linux-dev-f3670394c29ff3730638762c1760fd2f624e6d7b.zip
Revert "x86/efi: Fixup GOT in all boot code paths"
This reverts commit 9cb0e394234d244fe5a97e743ec9dd7ddff7e64b. It causes my Sony Vaio Pro 11 to immediately reboot at startup. Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Anvin <hpa@zytor.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Matt Fleming <matt.fleming@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--arch/x86/boot/compressed/head_64.S56
1 files changed, 15 insertions, 41 deletions
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S
index 50f69c7eaaf4..2884e0c3e8a5 100644
--- a/arch/x86/boot/compressed/head_64.S
+++ b/arch/x86/boot/compressed/head_64.S
@@ -32,33 +32,6 @@
#include <asm/processor-flags.h>
#include <asm/asm-offsets.h>
-/*
- * Adjust our own GOT
- *
- * The relocation base must be in %rbx
- *
- * It is safe to call this macro more than once, because in some of the
- * code paths multiple invocations are inevitable, e.g. via the efi*
- * entry points.
- *
- * Relocation is only performed the first time.
- */
-.macro FIXUP_GOT
- cmpb $1, got_fixed(%rip)
- je 2f
-
- leaq _got(%rip), %rdx
- leaq _egot(%rip), %rcx
-1:
- cmpq %rcx, %rdx
- jae 2f
- addq %rbx, (%rdx)
- addq $8, %rdx
- jmp 1b
-2:
- movb $1, got_fixed(%rip)
-.endm
-
__HEAD
.code32
ENTRY(startup_32)
@@ -279,13 +252,10 @@ ENTRY(efi_pe_entry)
subq $1b, %rbp
/*
- * Relocate efi_config->call() and the GOT entries.
+ * Relocate efi_config->call().
*/
addq %rbp, efi64_config+88(%rip)
- movq %rbp, %rbx
- FIXUP_GOT
-
movq %rax, %rdi
call make_boot_params
cmpq $0,%rax
@@ -301,13 +271,10 @@ handover_entry:
subq $1b, %rbp
/*
- * Relocate efi_config->call() and the GOT entries.
+ * Relocate efi_config->call().
*/
movq efi_config(%rip), %rax
addq %rbp, 88(%rax)
-
- movq %rbp, %rbx
- FIXUP_GOT
2:
movq efi_config(%rip), %rdi
call efi_main
@@ -418,8 +385,19 @@ relocated:
shrq $3, %rcx
rep stosq
- FIXUP_GOT
-
+/*
+ * Adjust our own GOT
+ */
+ leaq _got(%rip), %rdx
+ leaq _egot(%rip), %rcx
+1:
+ cmpq %rcx, %rdx
+ jae 2f
+ addq %rbx, (%rdx)
+ addq $8, %rdx
+ jmp 1b
+2:
+
/*
* Do the decompression, and jump to the new kernel..
*/
@@ -459,10 +437,6 @@ gdt:
.quad 0x0000000000000000 /* TS continued */
gdt_end:
-/* Have we relocated the GOT? */
-got_fixed:
- .byte 0
-
#ifdef CONFIG_EFI_STUB
efi_config:
.quad 0