aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/efi.h
diff options
context:
space:
mode:
authorMark Salter <msalter@redhat.com>2013-12-30 12:12:12 -0500
committerMatt Fleming <matt.fleming@intel.com>2014-04-30 14:49:46 -0400
commit0302f71c0aa59571ac306f93068fbbfe65ea349b (patch)
tree0a34f2ec1ace904079f09accd4329ec36bf021f2 /include/linux/efi.h
parent719e284369d23c3feb02d02ad58b3a516df47806 (diff)
efi: add helper function to get UEFI params from FDT
ARM and ARM64 architectures use the device tree to pass UEFI parameters from stub to kernel. These parameters are things known to the stub but not discoverable by the kernel after the stub calls ExitBootSerives(). There is a helper function in: drivers/firmware/efi/fdt.c which the stub uses to add the UEFI parameters to the device tree. This patch adds a complimentary helper function which UEFI runtime support may use to retrieve the parameters from the device tree. If an architecture wants to use this helper, it should select CONFIG_EFI_PARAMS_FROM_FDT. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 6a4d8e27d1d7..cd0172e796cb 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -664,6 +664,14 @@ struct efi_memory_map {
664 unsigned long desc_size; 664 unsigned long desc_size;
665}; 665};
666 666
667struct efi_fdt_params {
668 u64 system_table;
669 u64 mmap;
670 u32 mmap_size;
671 u32 desc_size;
672 u32 desc_ver;
673};
674
667typedef struct { 675typedef struct {
668 u32 revision; 676 u32 revision;
669 u32 parent_handle; 677 u32 parent_handle;
@@ -861,6 +869,7 @@ extern void efi_initialize_iomem_resources(struct resource *code_resource,
861extern void efi_get_time(struct timespec *now); 869extern void efi_get_time(struct timespec *now);
862extern int efi_set_rtc_mmss(const struct timespec *now); 870extern int efi_set_rtc_mmss(const struct timespec *now);
863extern void efi_reserve_boot_services(void); 871extern void efi_reserve_boot_services(void);
872extern int efi_get_fdt_params(struct efi_fdt_params *params, int verbose);
864extern struct efi_memory_map memmap; 873extern struct efi_memory_map memmap;
865 874
866/* Iterate through an efi_memory_map */ 875/* Iterate through an efi_memory_map */