[PATCH 16/16] efi: add missing EFIAPI to functions
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Dec 11 12:30:07 PST 2025
EFI functions have a different calling convention on x86, but this was
missed for a few functions and function pointers.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/clocksource/efi.c | 2 +-
include/efi/services.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clocksource/efi.c b/drivers/clocksource/efi.c
index 534bea5525c4..7a07db0af83d 100644
--- a/drivers/clocksource/efi.c
+++ b/drivers/clocksource/efi.c
@@ -18,7 +18,7 @@ static uint64_t efi_cs_read(void)
return ticks;
}
-static void efi_cs_inc(struct efi_event *event, void *ctx)
+static void EFIAPI efi_cs_inc(struct efi_event *event, void *ctx)
{
ticks++;
}
diff --git a/include/efi/services.h b/include/efi/services.h
index 9fc6a066a917..eaeaf1a55ee8 100644
--- a/include/efi/services.h
+++ b/include/efi/services.h
@@ -65,7 +65,7 @@ struct efi_boot_services {
#define EFI_TPL_NOTIFY 16
#define EFI_TPL_HIGH_LEVEL 31
efi_status_t(EFIAPI *create_event)(u32 type , unsigned long tpl,
- void (*fn) (struct efi_event *event, void *ctx),
+ void (EFIAPI *fn) (struct efi_event *event, void *ctx),
void *ctx, struct efi_event **event);
efi_status_t(EFIAPI *set_timer)(struct efi_event *event, enum efi_timer_delay type, uint64_t time);
efi_status_t(EFIAPI *wait_for_event)(size_t number_of_events, struct efi_event **event,
@@ -174,7 +174,7 @@ struct efi_runtime_services {
size_t descriptor_size,
uint32_t descriptor_version,
struct efi_memory_desc *virtmap);
- efi_status_t (*convert_pointer)(unsigned long dbg, void **address);
+ efi_status_t (EFIAPI *convert_pointer)(unsigned long dbg, void **address);
efi_status_t (EFIAPI *get_variable)(efi_char16_t *variable_name, const efi_guid_t *vendor,
u32 *Attributes, size_t *data_size, void *data);
efi_status_t (EFIAPI *get_next_variable)(size_t *variable_name_size,
--
2.47.3
More information about the barebox
mailing list