aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2012-09-28 17:56:08 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-09-29 12:21:02 -0700
commit7bc90e01c3f66c137e7e761f574bbf883087d590 (patch)
treeb8fbf8b842eabe17ff407fe7d2f13fc12d966bc2 /include
parentefi: Defer freeing boot services memory until after ACPI init (diff)
downloadlinux-dev-7bc90e01c3f66c137e7e761f574bbf883087d590.tar.xz
linux-dev-7bc90e01c3f66c137e7e761f574bbf883087d590.zip
efi: Add a function to look up existing IO memory mappings
The EFI initialization creates virtual mappings for EFI boot services memory, so if a driver wants to access EFI boot services memory, it cannot call ioremap itself; doing so will trip the WARN about mapping RAM twice. Thus, a driver accessing EFI boot services memory must do so via the existing mapping already created during EFI intiialization. Since the EFI code already maintains a memory map for that memory, add a function efi_lookup_mapped_addr to look up mappings in that memory map. Signed-off-by: Josh Triplett <josh@joshtriplett.org> Link: http://lkml.kernel.org/r/0eb48ae012797912874919110660ad420b90268b.1348876882.git.josh@joshtriplett.org Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/efi.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 5782114f4838..fff135d9375e 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -501,6 +501,7 @@ extern void efi_free_boot_services(void);
#else
static inline void efi_free_boot_services(void) {}
#endif
+extern void __iomem *efi_lookup_mapped_addr(u64 phys_addr);
extern u64 efi_get_iobase (void);
extern u32 efi_mem_type (unsigned long phys_addr);
extern u64 efi_mem_attributes (unsigned long phys_addr);