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 <ardb@kernel.org>
This commit is contained in:
Ard Biesheuvel 2020-05-23 11:01:57 +02:00
parent d8bd8c6e2c
commit 6e99d3213b
5 changed files with 8 additions and 4 deletions

View File

@ -60,7 +60,7 @@ optional_header:
.long __pecoff_code_size @ SizeOfCode .long __pecoff_code_size @ SizeOfCode
.long __pecoff_data_size @ SizeOfInitializedData .long __pecoff_data_size @ SizeOfInitializedData
.long 0 @ SizeOfUninitializedData .long 0 @ SizeOfUninitializedData
.long efi_entry - start @ AddressOfEntryPoint .long efi_pe_entry - start @ AddressOfEntryPoint
.long start_offset @ BaseOfCode .long start_offset @ BaseOfCode
.long __pecoff_data_start - start @ BaseOfData .long __pecoff_data_start - start @ BaseOfData

View File

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

View File

@ -27,7 +27,7 @@ optional_header:
.long __initdata_begin - efi_header_end // SizeOfCode .long __initdata_begin - efi_header_end // SizeOfCode
.long __pecoff_data_size // SizeOfInitializedData .long __pecoff_data_size // SizeOfInitializedData
.long 0 // SizeOfUninitializedData .long 0 // SizeOfUninitializedData
.long __efistub_efi_entry - _head // AddressOfEntryPoint .long __efistub_efi_pe_entry - _head // AddressOfEntryPoint
.long efi_header_end - _head // BaseOfCode .long efi_header_end - _head // BaseOfCode
extra_header_fields: extra_header_fields:

View File

@ -140,7 +140,8 @@ asmlinkage void __noreturn efi_enter_kernel(unsigned long entrypoint,
* for both archictectures, with the arch-specific code provided in the * for both archictectures, with the arch-specific code provided in the
* handle_kernel_image() function. * handle_kernel_image() function.
*/ */
efi_status_t efi_entry(efi_handle_t handle, efi_system_table_t *sys_table_arg) efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
efi_system_table_t *sys_table_arg)
{ {
efi_loaded_image_t *image; efi_loaded_image_t *image;
efi_status_t status; efi_status_t status;

View File

@ -40,6 +40,9 @@ extern bool efi_novamap;
extern const efi_system_table_t *efi_system_table; extern const efi_system_table_t *efi_system_table;
efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
efi_system_table_t *sys_table_arg);
#ifndef ARCH_HAS_EFISTUB_WRAPPERS #ifndef ARCH_HAS_EFISTUB_WRAPPERS
#define efi_is_native() (true) #define efi_is_native() (true)