diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2014-07-02 14:54:40 +0200 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2014-07-07 20:29:46 +0100 |
commit | f23cf8bd5c1f49fb12459797d88b8407af93383d (patch) | |
tree | 9469b014a4213cc6e27010415f81bfeb7ae54745 /arch/x86/include/asm/efi.h | |
parent | 6091c9c447370c4717ec9975813c874af490eb36 (diff) | |
download | linux-f23cf8bd5c1f49fb12459797d88b8407af93383d.tar.bz2 |
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: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/include/asm/efi.h')
-rw-r--r-- | arch/x86/include/asm/efi.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index 3dbf56eb540d..9043f365ebf5 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@ -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. |