From 51cfcb98bde7e78b4817a9060885b25b6c3d354c Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Fri, 18 Mar 2022 12:24:48 +0000 Subject: now using clang, native PE UEFI loader image. made an ugly hack to get into the shim. it's probably ok. --- api/loader/efi/shim.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'api') diff --git a/api/loader/efi/shim.h b/api/loader/efi/shim.h index 0255361..dcdf077 100644 --- a/api/loader/efi/shim.h +++ b/api/loader/efi/shim.h @@ -23,11 +23,14 @@ struct efi_loader_image UINTN buffer_size; }; -typedef EFI_STATUS (*efi_image_func)(struct efi_loader_image *image); -typedef EFI_STATUS (*efi_page_alloc_func)(EFI_MEMORY_TYPE type, +typedef EFI_STATUS (EFIAPI *efi_image_func)(struct efi_loader_image *image); +typedef EFI_STATUS (EFIAPI *efi_page_alloc_func)( + EFI_MEMORY_TYPE type, UINTN size, EFI_PHYSICAL_ADDRESS *base); -typedef EFI_STATUS (*efi_page_free_func)(EFI_PHYSICAL_ADDRESS base, UINTN size); +typedef EFI_STATUS (EFIAPI *efi_page_free_func)( + EFI_PHYSICAL_ADDRESS base, + UINTN size); struct efi_loader_interface { @@ -42,6 +45,6 @@ struct efi_loader_interface efi_image_func image_load; }; -typedef EFI_STATUS (*efi_shim_entry_func)(struct efi_loader_image *image, - struct efi_loader_interface *interface); +typedef EFI_STATUS +(__attribute__((sysv_abi)) *efi_shim_entry_func)(struct efi_loader_interface *interface); -- cgit v1.3.1-1-g115d