remarkable-linux/arch/x86/boot
Matt Fleming b1994304fc x86, efi: Add dedicated EFI stub entry point
The method used to work out whether we were booted by EFI firmware or
via a boot loader is broken. Because efi_main() is always executed
when booting from a boot loader we will dereference invalid pointers
either on the stack (CONFIG_X86_32) or contained in %rdx
(CONFIG_X86_64) when searching for an EFI System Table signature.

Instead of dereferencing these invalid system table pointers, add a
new entry point that is only used when booting from EFI firmware, when
we know the pointer arguments will be valid. With this change legacy
boot loaders will no longer execute efi_main(), but will instead skip
EFI stub initialisation completely.

[ hpa: Marking this for urgent/stable since it is a regression when
  the option is enabled; without the option the patch has no effect ]

Signed-off-by: Matt Fleming <matt.hfleming@intel.com>
Link: http://lkml.kernel.org/r/1334584744.26997.14.camel@mfleming-mobl1.ger.corp.intel.com
Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@vger.kernel.org> v3.3
2012-04-16 11:41:44 -07:00
..
compressed x86, efi: Add dedicated EFI stub entry point 2012-04-16 11:41:44 -07:00
tools x86, efi: Add dedicated EFI stub entry point 2012-04-16 11:41:44 -07:00
.gitignore
a20.c
apm.c
bioscall.S
bitops.h
boot.h x86, boot: Fix port argument to inl() function 2012-01-31 12:05:54 -08:00
cmdline.c x86, setup: reorganize the early console setup 2010-08-02 15:51:56 -07:00
code16gcc.h
copy.S
cpu.c
cpucheck.c
ctype.h x86, setup: move isdigit.h to ctype.h, header files on top. 2010-08-02 21:07:20 -07:00
early_serial_console.c x86, setup: Fix earlyprintk=serial,0x3f8,115200 2010-09-21 10:18:33 -07:00
edd.c
header.S x86, efi: EFI boot stub support 2011-12-12 14:26:10 -08:00
install.sh
main.c x86, setup: enable early console output from the decompressor 2010-08-02 20:32:20 -07:00
Makefile x86, boot: Correct CFLAGS for hostprogs 2012-03-22 12:42:51 -07:00
mca.c
memory.c x86, setup: When probing memory with e801, use ax/bx as a pair 2011-04-25 14:52:37 -07:00
mkcpustr.c
mtools.conf.in
pm.c
pmjump.S
printf.c x86, setup: reorganize the early console setup 2010-08-02 15:51:56 -07:00
regs.c
setup.ld
string.c x86, efi: EFI boot stub support 2011-12-12 14:26:10 -08:00
tty.c x86, setup: reorganize the early console setup 2010-08-02 15:51:56 -07:00
version.c
vesa.h
video-bios.c
video-mode.c
video-vesa.c
video-vga.c
video.c
video.h