]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/efi/mixed: Simplify and document thunking logic
authorArd Biesheuvel <ardb@kernel.org>
Mon, 6 Jan 2025 13:20:35 +0000 (14:20 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 21 Feb 2025 15:54:35 +0000 (16:54 +0100)
commitb891e4209c9f96e25a4e90b86e460f515e902c37
treef3a747bddd5485671387a3560ad6c59c08be74ca
parent6e2da8d87c9c1133d8d6e1f93a0bc0c416dbc8ee
x86/efi/mixed: Simplify and document thunking logic

Now that the GDT/IDT and data segment selector preserve/restore logic
has been removed from the boot-time EFI mixed mode thunking routines,
the remaining logic to handle the function arguments can be simplified:
the setup of the arguments on the stack can be moved into the 32-bit
callee, which is able to use a more idiomatic sequence of PUSH
instructions.

This, in turn, allows the far call and far return to be issued using
plain LCALL and LRET instructions, removing the need to set up the
return explicitly.

Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/x86/boot/compressed/efi_mixed.S