]> git.karo-electronics.de Git - linux-beck.git/commitdiff
efi/x86: efistub: Move shared dependencies to <asm/efi.h>
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 2 Jul 2014 12:54:40 +0000 (14:54 +0200)
committerMatt Fleming <matt.fleming@intel.com>
Mon, 7 Jul 2014 19:29:46 +0000 (20:29 +0100)
This moves definitions depended upon both by code under arch/x86/boot
and under drivers/firmware/efi to <asm/efi.h>. This is in preparation of
turning the stub code under drivers/firmware/efi into a static library.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
arch/x86/boot/compressed/eboot.c
arch/x86/boot/compressed/eboot.h
arch/x86/include/asm/efi.h

index 385f42c200bc1a5b09a63e41acd617ec1db6b9e1..c066bc4e30511788d85d57d268b8d970657721cb 100644 (file)
 
 static efi_system_table_t *sys_table;
 
-static struct efi_config *efi_early;
-
-#define efi_call_early(f, ...)                                         \
-       efi_early->call(efi_early->f, __VA_ARGS__);
+struct efi_config *efi_early;
 
 #define BOOT_SERVICES(bits)                                            \
 static void setup_boot_services##bits(struct efi_config *c)            \
index c88c31ecad1231bb2fc45257a8d98bafe7bc519b..d487e727f1ec7347ea960b038428998d43a1d6bb 100644 (file)
@@ -103,20 +103,4 @@ struct efi_uga_draw_protocol {
        void *blt;
 };
 
-struct efi_config {
-       u64 image_handle;
-       u64 table;
-       u64 allocate_pool;
-       u64 allocate_pages;
-       u64 get_memory_map;
-       u64 free_pool;
-       u64 free_pages;
-       u64 locate_handle;
-       u64 handle_protocol;
-       u64 exit_boot_services;
-       u64 text_output;
-       efi_status_t (*call)(unsigned long, ...);
-       bool is64;
-} __packed;
-
 #endif /* BOOT_COMPRESSED_EBOOT_H */
index 3dbf56eb540de95508639173b6bd8b560bb15f4d..9043f365ebf55ff85b612d22524294903cd3d2ef 100644 (file)
@@ -158,6 +158,31 @@ static inline efi_status_t efi_thunk_set_virtual_address_map(
        return EFI_SUCCESS;
 }
 #endif /* CONFIG_EFI_MIXED */
+
+
+/* arch specific definitions used by the stub code */
+
+struct efi_config {
+       u64 image_handle;
+       u64 table;
+       u64 allocate_pool;
+       u64 allocate_pages;
+       u64 get_memory_map;
+       u64 free_pool;
+       u64 free_pages;
+       u64 locate_handle;
+       u64 handle_protocol;
+       u64 exit_boot_services;
+       u64 text_output;
+       efi_status_t (*call)(unsigned long, ...);
+       bool is64;
+} __packed;
+
+extern struct efi_config *efi_early;
+
+#define efi_call_early(f, ...)                                         \
+       efi_early->call(efi_early->f, __VA_ARGS__);
+
 #else
 /*
  * IF EFI is not configured, have the EFI calls return -ENOSYS.