]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
x86, efi: Fix 32-bit EFI handover protocol entry point
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 7 Jan 2013 22:01:50 +0000 (22:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2013 00:27:06 +0000 (18:27 -0600)
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 <David.Woodhouse@intel.com>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/boot/compressed/head_32.S

index aa4aaf1b23803e8ef0e180e3cbeedc7a4db6c556..ccb2f4a5f7bda805a18f65b1ceb07fb16635156f 100644 (file)
@@ -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