x86/efistub: Branch straight to kernel entry point from C code
authorArd Biesheuvel <ardb@kernel.org>
Mon, 7 Aug 2023 16:27:00 +0000 (18:27 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 7 Aug 2023 18:36:06 +0000 (20:36 +0200)
commitd2d7a54f69b67cd0a30e0ebb5307cb2de625baac
treef0cd32454d9a7b6e213d39d5bf046fca04cf32ad
parent2f69a81ad6873231a2ae78d5ade3263ec54a4c9c
x86/efistub: Branch straight to kernel entry point from C code

Instead of returning to the calling code in assembler that does nothing
more than perform an indirect call with the boot_params pointer in
register ESI/RSI, perform the jump directly from the EFI stub C code.
This will allow the asm entrypoint code to be dropped entirely in
subsequent patches.

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-4-ardb@kernel.org
drivers/firmware/efi/libstub/x86-stub.c