aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2014-07-02 08:54:42 -0400
committerMatt Fleming <matt.fleming@intel.com>2014-07-07 15:29:48 -0400
commitbd669475d14e3279a7f96ed917a82df5da6ad52d (patch)
treeb13bbe4cb23774acfea30e98d60fcfb4da029c2a /arch/x86/boot
parenta13b00778e89c405cb224ef0926be6d71682d2a2 (diff)
efi: efistub: Refactor stub components
In order to move from the #include "../../../xxxxx.c" anti-pattern used by both the x86 and arm64 versions of the stub to a static library linked into either the kernel proper (arm64) or a separate boot executable (x86), there is some prepatory work required. This patch does the following: - move forward declarations of functions shared between the arch specific and the generic parts of the stub to include/linux/efi.h - move forward declarations of functions shared between various .c files of the generic stub code to a new local header file called "efistub.h" - add #includes to all .c files which were formerly relying on the #includor to include the correct header files - remove all static modifiers from functions which will need to be externally visible once we move to a static library Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/compressed/eboot.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index c066bc4e3051..916bbdd7dd28 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -45,8 +45,7 @@ static void setup_boot_services##bits(struct efi_config *c) \
45BOOT_SERVICES(32); 45BOOT_SERVICES(32);
46BOOT_SERVICES(64); 46BOOT_SERVICES(64);
47 47
48static void efi_printk(efi_system_table_t *, char *); 48void efi_char16_printk(efi_system_table_t *, efi_char16_t *);
49static void efi_char16_printk(efi_system_table_t *, efi_char16_t *);
50 49
51static efi_status_t 50static efi_status_t
52__file_size32(void *__fh, efi_char16_t *filename_16, 51__file_size32(void *__fh, efi_char16_t *filename_16,
@@ -153,7 +152,7 @@ grow:
153 152
154 return status; 153 return status;
155} 154}
156static efi_status_t 155efi_status_t
157efi_file_size(efi_system_table_t *sys_table, void *__fh, 156efi_file_size(efi_system_table_t *sys_table, void *__fh,
158 efi_char16_t *filename_16, void **handle, u64 *file_sz) 157 efi_char16_t *filename_16, void **handle, u64 *file_sz)
159{ 158{
@@ -163,7 +162,7 @@ efi_file_size(efi_system_table_t *sys_table, void *__fh,
163 return __file_size32(__fh, filename_16, handle, file_sz); 162 return __file_size32(__fh, filename_16, handle, file_sz);
164} 163}
165 164
166static inline efi_status_t 165efi_status_t
167efi_file_read(void *handle, unsigned long *size, void *addr) 166efi_file_read(void *handle, unsigned long *size, void *addr)
168{ 167{
169 unsigned long func; 168 unsigned long func;
@@ -181,7 +180,7 @@ efi_file_read(void *handle, unsigned long *size, void *addr)
181 } 180 }
182} 181}
183 182
184static inline efi_status_t efi_file_close(void *handle) 183efi_status_t efi_file_close(void *handle)
185{ 184{
186 if (efi_early->is64) { 185 if (efi_early->is64) {
187 efi_file_handle_64_t *fh = handle; 186 efi_file_handle_64_t *fh = handle;
@@ -246,7 +245,7 @@ static inline efi_status_t __open_volume64(void *__image, void **__fh)
246 return status; 245 return status;
247} 246}
248 247
249static inline efi_status_t 248efi_status_t
250efi_open_volume(efi_system_table_t *sys_table, void *__image, void **__fh) 249efi_open_volume(efi_system_table_t *sys_table, void *__image, void **__fh)
251{ 250{
252 if (efi_early->is64) 251 if (efi_early->is64)
@@ -255,7 +254,7 @@ efi_open_volume(efi_system_table_t *sys_table, void *__image, void **__fh)
255 return __open_volume32(__image, __fh); 254 return __open_volume32(__image, __fh);
256} 255}
257 256
258static void efi_char16_printk(efi_system_table_t *table, efi_char16_t *str) 257void efi_char16_printk(efi_system_table_t *table, efi_char16_t *str)
259{ 258{
260 unsigned long output_string; 259 unsigned long output_string;
261 size_t offset; 260 size_t offset;