Skip to content

Commit 6e99d32

Browse files
committed
efi/libstub: Add missing prototype for PE/COFF entry point
Fix a missing prototype warning by adding a forward declaration for the PE/COFF entrypoint, and while at it, align the function name between the x86 and ARM versions of the stub. Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent d8bd8c6 commit 6e99d32

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

arch/arm/boot/compressed/efi-header.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ optional_header:
6060
.long __pecoff_code_size @ SizeOfCode
6161
.long __pecoff_data_size @ SizeOfInitializedData
6262
.long 0 @ SizeOfUninitializedData
63-
.long efi_entry - start @ AddressOfEntryPoint
63+
.long efi_pe_entry - start @ AddressOfEntryPoint
6464
.long start_offset @ BaseOfCode
6565
.long __pecoff_data_start - start @ BaseOfData
6666

arch/arm64/kernel/efi-entry.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
SYM_CODE_START(efi_enter_kernel)
1616
/*
17-
* efi_entry() will have copied the kernel image if necessary and we
17+
* efi_pe_entry() will have copied the kernel image if necessary and we
1818
* end up here with device tree address in x1 and the kernel entry
1919
* point stored in x0. Save those values in registers which are
2020
* callee preserved.

arch/arm64/kernel/efi-header.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ optional_header:
2727
.long __initdata_begin - efi_header_end // SizeOfCode
2828
.long __pecoff_data_size // SizeOfInitializedData
2929
.long 0 // SizeOfUninitializedData
30-
.long __efistub_efi_entry - _head // AddressOfEntryPoint
30+
.long __efistub_efi_pe_entry - _head // AddressOfEntryPoint
3131
.long efi_header_end - _head // BaseOfCode
3232

3333
extra_header_fields:

drivers/firmware/efi/libstub/efi-stub.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ asmlinkage void __noreturn efi_enter_kernel(unsigned long entrypoint,
140140
* for both archictectures, with the arch-specific code provided in the
141141
* handle_kernel_image() function.
142142
*/
143-
efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg)
143+
efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
144+
efi_system_table_t *sys_table_arg)
144145
{
145146
efi_loaded_image_t *image;
146147
efi_status_t status;

drivers/firmware/efi/libstub/efistub.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ extern bool efi_novamap;
4040

4141
extern const efi_system_table_t *efi_system_table;
4242

43+
efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
44+
efi_system_table_t *sys_table_arg);
45+
4346
#ifndef ARCH_HAS_EFISTUB_WRAPPERS
4447

4548
#define efi_is_native() (true)

0 commit comments

Comments
 (0)