Commit f23cf8bd authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Matt Fleming

efi/x86: efistub: Move shared dependencies to <asm/efi.h>

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: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarMatt Fleming <matt.fleming@intel.com>
parent 6091c9c4
...@@ -19,10 +19,7 @@ ...@@ -19,10 +19,7 @@
static efi_system_table_t *sys_table; static efi_system_table_t *sys_table;
static struct efi_config *efi_early; struct efi_config *efi_early;
#define efi_call_early(f, ...) \
efi_early->call(efi_early->f, __VA_ARGS__);
#define BOOT_SERVICES(bits) \ #define BOOT_SERVICES(bits) \
static void setup_boot_services##bits(struct efi_config *c) \ static void setup_boot_services##bits(struct efi_config *c) \
......
...@@ -103,20 +103,4 @@ struct efi_uga_draw_protocol { ...@@ -103,20 +103,4 @@ struct efi_uga_draw_protocol {
void *blt; 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 */ #endif /* BOOT_COMPRESSED_EBOOT_H */
...@@ -158,6 +158,31 @@ static inline efi_status_t efi_thunk_set_virtual_address_map( ...@@ -158,6 +158,31 @@ static inline efi_status_t efi_thunk_set_virtual_address_map(
return EFI_SUCCESS; return EFI_SUCCESS;
} }
#endif /* CONFIG_EFI_MIXED */ #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 #else
/* /*
* IF EFI is not configured, have the EFI calls return -ENOSYS. * IF EFI is not configured, have the EFI calls return -ENOSYS.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment