Skip to content

Commit

Permalink
x86, efi: Fix 32-bit EFI handover protocol entry point
Browse files Browse the repository at this point in the history
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 <David.Woodhouse@intel.com>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/1358513837.2397.247.camel@shinybook.infradead.org
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Matt Fleming <matt.fleming@intel.com>
  • Loading branch information
David Woodhouse authored and H. Peter Anvin committed Jan 28, 2013
1 parent 70a479c commit f791620
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/boot/compressed/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f791620

Please sign in to comment.