[PATCH v2 059/113] efi: payload: fix ARM build

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Mar 4 10:59:44 PST 2024


So far we only ever built EFI for x86. Prepare building it for ARM by
removing the x86-specific attributes.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 efi/payload/image.c | 4 ++--
 include/efi/types.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/efi/payload/image.c b/efi/payload/image.c
index f9706c028ed9..8e5ad87de22f 100644
--- a/efi/payload/image.c
+++ b/efi/payload/image.c
@@ -217,8 +217,8 @@ static inline void linux_efi_handover(efi_handle_t handle,
 	handover(handle, efi_sys_table, header);
 }
 #else
-typedef void(*handover_fn)(VOID *image, EFI_SYSTEM_TABLE *table,
-		struct SetupHeader *setup) __attribute__((regparm(0)));
+typedef void(*handover_fn)(void *image, struct efi_system_table *table,
+		struct linux_kernel_header *setup);
 
 static inline void linux_efi_handover(efi_handle_t handle,
 		struct linux_kernel_header *header)
diff --git a/include/efi/types.h b/include/efi/types.h
index 3d42948d2b62..6e134387692f 100644
--- a/include/efi/types.h
+++ b/include/efi/types.h
@@ -33,7 +33,7 @@ typedef guid_t efi_guid_t __aligned(__alignof__(u32));
   (c) & 0xff, ((c) >> 8) & 0xff, \
   (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }})
 
-#ifdef CONFIG_EFI_PAYLOAD
+#ifdef __x86_64__
 #define EFIAPI __attribute__((ms_abi))
 #else
 #define EFIAPI
-- 
2.39.2




More information about the barebox mailing list