Skip to content

Commit 3230d95

Browse files
atishp04ardbiesheuvel
authored andcommitted
efi/libstub: Move the function prototypes to header file
The prototype of the functions handle_kernel_image & efi_enter_kernel are defined in efi-stub.c which may result in a compiler warnings if -Wmissing-prototypes is set in gcc compiler. Move the prototype to efistub.h to make the compiler happy. Signed-off-by: Atish Patra <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent 950accb commit 3230d95

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,6 @@ static unsigned long get_dram_base(void)
121121
return membase;
122122
}
123123

124-
/*
125-
* This function handles the architcture specific differences between arm and
126-
* arm64 regarding where the kernel image must be loaded and any memory that
127-
* must be reserved. On failure it is required to free all
128-
* all allocations it has made.
129-
*/
130-
efi_status_t handle_kernel_image(unsigned long *image_addr,
131-
unsigned long *image_size,
132-
unsigned long *reserve_addr,
133-
unsigned long *reserve_size,
134-
unsigned long dram_base,
135-
efi_loaded_image_t *image);
136-
137-
asmlinkage void __noreturn efi_enter_kernel(unsigned long entrypoint,
138-
unsigned long fdt_addr,
139-
unsigned long fdt_size);
140-
141124
/*
142125
* EFI entry point for the arm/arm64 EFI stubs. This is the entrypoint
143126
* that is described in the PE/COFF header. Most of the code is the same

drivers/firmware/efi/libstub/efistub.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,22 @@ efi_status_t efi_load_initrd(efi_loaded_image_t *image,
776776
unsigned long *load_size,
777777
unsigned long soft_limit,
778778
unsigned long hard_limit);
779+
/*
780+
* This function handles the architcture specific differences between arm and
781+
* arm64 regarding where the kernel image must be loaded and any memory that
782+
* must be reserved. On failure it is required to free all
783+
* all allocations it has made.
784+
*/
785+
efi_status_t handle_kernel_image(unsigned long *image_addr,
786+
unsigned long *image_size,
787+
unsigned long *reserve_addr,
788+
unsigned long *reserve_size,
789+
unsigned long dram_base,
790+
efi_loaded_image_t *image);
791+
792+
asmlinkage void __noreturn efi_enter_kernel(unsigned long entrypoint,
793+
unsigned long fdt_addr,
794+
unsigned long fdt_size);
779795

780796
void efi_handle_post_ebs_state(void);
781797

0 commit comments

Comments
 (0)