linux-stable/arch/x86
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
..
boot efi/x86: Implement mixed mode boot without the handover protocol 2020-02-23 21:59:42 +01:00
configs x86: Remove the calgary IOMMU driver 2019-11-15 10:36:59 +01:00
crypto crypto: x86/poly1305 - emit does base conversion itself 2020-01-22 16:21:11 +08:00
entry kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
events Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-28 09:44:15 -08:00
hyperv x86/hyperv: Suspend/resume the hypercall page for hibernation 2020-02-01 09:41:16 +01:00
ia32 x86: Remove force_iret() 2020-01-08 19:40:51 +01:00
include efi/libstub/x86: Use Exit() boot service to exit the stub on errors 2020-02-23 21:59:42 +01:00
kernel efi: Add 'runtime' pointer to struct efi 2020-02-23 21:59:42 +01:00
kvm KVM: vmx: delete meaningless vmx_decache_cr0_guest_bits() declaration 2020-02-05 16:44:06 +01:00
lib Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-31 11:05:33 -08:00
math-emu Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-11-26 10:42:40 -08:00
mm x86: mm: avoid allocating struct mm_struct on the stack 2020-02-04 03:05:25 +00:00
net bpf: Introduce BPF_MAP_TYPE_STRUCT_OPS 2020-01-09 08:46:18 -08:00
oprofile x86: Use pr_warn instead of pr_warning 2019-10-18 15:00:18 +02:00
pci pci-v5.6-changes 2020-01-31 14:48:54 -08:00
platform efi/x86: Drop 'systab' member from struct efi 2020-02-23 21:59:42 +01:00
power x86/asm/32: Change all ENTRY+ENDPROC to SYM_FUNC_* 2019-10-18 12:03:43 +02:00
purgatory Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-11-26 10:42:40 -08:00
ras
realmode kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
tools kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
um um: Implement copy_thread_tls 2020-01-07 13:31:29 +01:00
video
xen A set of fixes for X86: 2020-02-09 12:11:12 -08:00
.gitignore
Kbuild
Kconfig asm-generic/tlb: rename HAVE_RCU_TABLE_FREE 2020-02-04 03:05:26 +00:00
Kconfig.cpu x86/cpu: Detect VMX features on Intel, Centaur and Zhaoxin CPUs 2020-01-13 18:02:53 +01:00
Kconfig.debug x86: mm: convert dump_pagetables to use walk_page_range 2020-02-04 03:05:25 +00:00
Makefile
Makefile.um
Makefile_32.cpu