linux-stable/arch
Ard Biesheuvel 17054f492d efi/x86: Implement mixed mode boot without the handover protocol
Add support for booting 64-bit x86 kernels from 32-bit firmware running
on 64-bit capable CPUs without requiring the bootloader to implement
the EFI handover protocol or allocate the setup block, etc etc, all of
which can be done by the stub itself, using code that already exists.

Instead, create an ordinary EFI application entrypoint but implemented
in 32-bit code [so that it can be invoked by 32-bit firmware], and stash
the address of this 32-bit entrypoint in the .compat section where the
bootloader can find it.

Note that we use the setup block embedded in the binary to go through
startup_32(), but it gets reallocated and copied in efi_pe_entry(),
using the same code that runs when the x86 kernel is booted in EFI
mode from native firmware. This requires the loaded image protocol to
be installed on the kernel image's EFI handle, and point to the kernel
image itself and not to its loader. This, in turn, requires the
bootloader to use the LoadImage() boot service to load the 64-bit
image from 32-bit firmware, which is in fact supported by firmware
based on EDK2. (Only StartImage() will fail, and instead, the newly
added entrypoint needs to be invoked)

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2020-02-23 21:59:42 +01:00
..
alpha Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
arc arc: mm: add p?d_leaf() definitions 2020-02-04 03:05:24 +00:00
arm efi/libstub/arm: Make efi_entry() an ordinary PE/COFF entrypoint 2020-02-22 23:37:37 +01:00
arm64 efi/libstub: Clean up command line parsing routine 2020-02-23 21:57:15 +01:00
c6x Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
csky Microblaze patches for 5.6-rc1 2020-02-04 11:58:07 +00:00
h8300 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
hexagon Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 10:07:09 -08:00
ia64 efi: Clean up config_parse_tables() 2020-02-23 21:59:42 +01:00
m68k Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2020-02-06 08:13:23 +00:00
microblaze Microblaze patches for 5.6-rc1 2020-02-04 11:58:07 +00:00
mips Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
nds32 TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
nios2 TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
openrisc TTY/Serial driver updates for 5.6-rc1 2020-01-29 10:13:27 -08:00
parisc Merge branch 'parisc-5.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux 2020-02-05 07:29:40 +00:00
powerpc Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
riscv Microblaze patches for 5.6-rc1 2020-02-04 11:58:07 +00:00
s390 Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
sh proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
sparc Kbuild updates for v5.6 (2nd) 2020-02-09 16:05:50 -08:00
um proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
unicore32 MPX requires recompiling applications, which requires compiler support. 2020-01-30 16:11:50 -08:00
x86 efi/x86: Implement mixed mode boot without the handover protocol 2020-02-23 21:59:42 +01:00
xtensa Xtensa updates for v5.6: 2020-02-07 12:22:29 -08:00
.gitignore
Kconfig asm-generic/tlb: provide MMU_GATHER_TABLE_FREE 2020-02-04 03:05:26 +00:00