[lkml]   [2013]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[ 65/89] x86, efi: Fix 32-bit EFI handover protocol entry point
3.7-stable review patch.  If anyone has any objections, please let me know.


From: David Woodhouse <>

commit f791620fa7517e1045742c475a7f005db9a634b8 upstream.

If the bootloader calls the EFI handover entry point as a standard function
call, then it'll have a return address on the stack. We need to pop that
before calling efi_main(), or the arguments will all be out of position on
the stack.

Signed-off-by: David Woodhouse <>
Signed-off-by: H. Peter Anvin <>
Cc: Matt Fleming <>
Signed-off-by: Greg Kroah-Hartman <>

arch/x86/boot/compressed/head_32.S | 2 ++
1 file changed, 2 insertions(+)

--- a/arch/x86/boot/compressed/head_32.S
+++ b/arch/x86/boot/compressed/head_32.S
@@ -50,8 +50,10 @@ ENTRY(startup_32)
pushl %eax
pushl %esi
pushl %ecx
+ sub $0x4, %esp

.org 0x30,0x90
+ add $0x4, %esp
call efi_main
cmpl $0, %eax
movl %eax, %esi

 \ /
  Last update: 2013-02-01 15:21    [W:0.310 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site