x86/efistub: Simplify and clean up handover entry code
authorArd Biesheuvel <ardb@kernel.org>
Mon, 7 Aug 2023 16:27:01 +0000 (18:27 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 7 Aug 2023 18:37:09 +0000 (20:37 +0200)
commitdf9215f15206c2a81909ccf60f21d170801dce38
tree2512e263e077bd6f7876ba4ab857d836b28d20b0
parentd2d7a54f69b67cd0a30e0ebb5307cb2de625baac
x86/efistub: Simplify and clean up handover entry code

Now that the EFI entry code in assembler is only used by the optional
and deprecated EFI handover protocol, and given that the EFI stub C code
no longer returns to it, most of it can simply be dropped.

While at it, clarify the symbol naming, by merging efi_main() and
efi_stub_entry(), making the latter the shared entry point for all
different boot modes that enter via the EFI stub.

The efi32_stub_entry() and efi64_stub_entry() names are referenced
explicitly by the tooling that populates the setup header, so these must
be retained, but can be emitted as aliases of efi_stub_entry() where
appropriate.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20230807162720.545787-5-ardb@kernel.org
Documentation/arch/x86/boot.rst
arch/x86/boot/compressed/efi_mixed.S
arch/x86/boot/compressed/head_32.S
arch/x86/boot/compressed/head_64.S
drivers/firmware/efi/libstub/x86-stub.c