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>
This commit is contained in:
Ard Biesheuvel authored and Daniel Kiper committed 2023-05-25 16:48:00 +02:00
1 parent 6ebfecf461
commit 6a080b9cde
4 files changed
+397 -371

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ grub_efi_get_time_ms (void)
return tmr;
}
static void
static void __grub_efi_api
increment_timer (grub_efi_event_t event __attribute__ ((unused)),
void *context __attribute__ ((unused)))
{