]> git.ipfire.org Git - thirdparty/grub.git/commit
efi: Add calling convention annotation to all prototypes
authorArd Biesheuvel <ardb@kernel.org>
Tue, 23 May 2023 15:31:42 +0000 (17:31 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 25 May 2023 14:48:00 +0000 (16:48 +0200)
commit6a080b9cde0be5d08b71daf17a806067e32fc13f
treeb4a8ed2ee48bbe7971f28732fb829a7ad7f0d4b7
parent6ebfecf461792f212d4956cd289c8bcd02556617
efi: Add calling convention annotation to all prototypes

UEFI mandates MS calling convention on x86_64, which was not supported
on GCC when UEFI support was first introduced into GRUB. However, now we
can use the ms_abi function type attribute to annotate functions and
function pointers as adhering to the MS calling convention, and the
compiler will generate the correct instruction sequence for us.

So let's add the appropriate annotation to all the function prototypes.
This will allow us to drop the special call wrappers in a subsequent patch.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/efiemu/runtime/efiemu.c
grub-core/kern/arm/efi/init.c
include/grub/efi/api.h
include/grub/efi/tpm.h