summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/head_32.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_32.S
parent98f75b8291a89ba6bf73e322ee467ce0bfeb91c1 (diff)
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 'arch/x86/boot/compressed/head_32.S')
-rw-r--r--arch/x86/boot/compressed/head_32.S54
1 files changed, 14 insertions, 40 deletions
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S
index d6b8aa4c986..cbed1407a5c 100644
--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -30,33 +30,6 @@
#include <asm/boot.h>
#include <asm/asm-offsets.h>
-/*
- * Adjust our own GOT
- *
- * The relocation base must be in %ebx
- *
- * 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(%ebx)
- je 2f
-
- leal _got(%ebx), %edx
- leal _egot(%ebx), %ecx
-1:
- cmpl %ecx, %edx
- jae 2f
- addl %ebx, (%edx)
- addl $4, %edx
- jmp 1b
-2:
- movb $1, got_fixed(%ebx)
-.endm
-
__HEAD
ENTRY(startup_32)
#ifdef CONFIG_EFI_STUB
@@ -83,9 +56,6 @@ ENTRY(efi_pe_entry)
add %esi, 88(%eax)
pushl %eax
- movl %esi, %ebx
- FIXUP_GOT
-
call make_boot_params
cmpl $0, %eax
je fail
@@ -111,10 +81,6 @@ ENTRY(efi32_stub_entry)
leal efi32_config(%esi), %eax
add %esi, 88(%eax)
pushl %eax
-
- movl %esi, %ebx
- FIXUP_GOT
-
2:
call efi_main
cmpl $0, %eax
@@ -224,7 +190,19 @@ relocated:
shrl $2, %ecx
rep stosl
- FIXUP_GOT
+/*
+ * Adjust our own GOT
+ */
+ leal _got(%ebx), %edx
+ leal _egot(%ebx), %ecx
+1:
+ cmpl %ecx, %edx
+ jae 2f
+ addl %ebx, (%edx)
+ addl $4, %edx
+ jmp 1b
+2:
+
/*
* Do the decompression, and jump to the new kernel..
*/
@@ -247,12 +225,8 @@ relocated:
xorl %ebx, %ebx
jmp *%eax
- .data
-/* Have we relocated the GOT? */
-got_fixed:
- .byte 0
-
#ifdef CONFIG_EFI_STUB
+ .data
efi32_config:
.fill 11,8,0
.long efi_call_phys