linux/arch/x86/boot
Matt Fleming 9cb0e39423 x86/efi: Fixup GOT in all boot code paths
Maarten reported that his Macbook pro 8.2 stopped booting after commit
f23cf8bd5c ("efi/x86: efistub: Move shared dependencies to
<asm/efi.h>"), the main feature of which is changing the visibility of
symbol 'efi_early' from local to global.

By making 'efi_early' global we end up requiring an entry in the Global
Offset Table. Unfortunately, while we do include code to fixup GOT
entries in the early boot code, it's only called after we've executed
the EFI boot stub.

What this amounts to is that references to 'efi_early' in the EFI boot
stub don't point to the correct place.

Since we've got multiple boot entry points we need to be prepared to
fixup the GOT in multiple places, while ensuring that we never do it
more than once, otherwise the GOT entries will still point to the wrong
place.

Reported-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Tested-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2014-09-08 20:52:02 +01:00
..
compressed x86/efi: Fixup GOT in all boot code paths 2014-09-08 20:52:02 +01:00
tools x86/efi: Include a .bss section within the PE/COFF headers 2014-07-10 14:21:39 +01:00
.gitignore x86: remove offsets.h from .gitignore and dontdiff 2012-11-19 14:10:53 +01:00
a20.c x86, setup: "glove box" BIOS interrupts in the core boot code 2009-04-09 16:08:11 -07:00
apm.c x86, setup: "glove box" BIOS interrupts in the APM code 2009-04-09 16:08:11 -07:00
bioscall.S x86, boot: Move intcall() to the .inittext section 2014-01-04 14:29:08 -08:00
bitops.h x86: remove pointless comments 2008-04-19 19:19:54 +02:00
boot.h x86, boot: Move memcmp() into string.h and string.c 2014-03-19 15:44:04 -07:00
cmdline.c x86, boot: Pass cmd_line_ptr with unsigned long instead 2013-01-29 15:26:09 -08:00
code16gcc.h x86, build: Change code16gcc.h from a C header to an assembly header 2014-06-04 13:16:48 -07:00
copy.S x86, boot: Use .code16 instead of .code16gcc 2014-01-04 13:59:06 -08:00
cpu.c x86 setup: handle more than 8 CPU flag words 2008-09-16 15:09:26 -07:00
cpucheck.c Merge branch 'x86/boot' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-02 12:23:49 -07:00
cpuflags.c x86, boot: Fix word-size assumptions in has_eflag() inline asm 2014-01-30 08:04:32 -08:00
cpuflags.h x86, boot: Rename get_flags() and check_flags() to *_cpuflags() 2013-10-13 04:08:56 -07:00
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 x86, boot: Create a separate string.h file to provide standard string functions 2014-03-19 15:43:45 -07:00
header.S Merge branch 'x86-efi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-08-04 17:13:50 -07:00
install.sh kbuild: use INSTALLKERNEL to select customized installkernel script 2009-09-20 12:18:14 +02:00
main.c x86, boot: Create a separate string.h file to provide standard string functions 2014-03-19 15:43:45 -07:00
Makefile x86, build: Don't get confused by local symbols 2014-05-05 15:23:35 -07:00
mca.c x86, setup: "glove box" BIOS interrupts in the MCA code 2009-04-09 16:08:11 -07:00
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 UAPI: Partition the header include path sets and add uapi/ header directories 2012-10-02 18:01:26 +01:00
mtools.conf.in i386: move boot 2007-10-11 11:16:45 +02:00
pm.c x86: remove zImage support 2009-03-11 11:00:00 -07:00
pmjump.S x86, setup: move 32-bit code to .text32 2009-03-17 15:26:06 -07:00
printf.c x86/boot: Fix a sanity check in printf.c 2013-08-14 11:48:41 +02:00
regs.c x86, boot: Create a separate string.h file to provide standard string functions 2014-03-19 15:43:45 -07:00
setup.ld x86, boot: Define the 2.12 bzImage boot protocol 2013-01-27 15:56:37 -08:00
string.c x86, boot: Remove misc.h inclusion from compressed/string.c 2014-05-08 08:00:06 -07:00
string.h x86, boot: Move memcmp() into string.h and string.c 2014-03-19 15:44:04 -07:00
tty.c x86, setup: reorganize the early console setup 2010-08-02 15:51:56 -07:00
version.c kbuild: move utsrelease.h to include/generated 2009-12-12 13:08:15 +01:00
vesa.h x86-boot: don't request VBE2 information 2008-03-07 16:39:14 +01:00
video-bios.c x86: fix usage of bios intcall() 2009-07-04 12:56:32 -07:00
video-mode.c x86: move suspend wakeup code to C 2008-04-17 17:41:37 +02:00
video-vesa.c x86, boot: Create a separate string.h file to provide standard string functions 2014-03-19 15:43:45 -07:00
video-vga.c x86, setup: Set ax register in boot vga query 2010-06-10 15:24:29 -07:00
video.c x86, setup: When restoring the screen, update boot_params.screen_info 2010-02-17 18:32:06 -08:00
video.h x86, boot: Use __attribute__((used)) to ensure videocard structs are emitted 2014-01-22 04:21:45 -08:00