summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/mmu.h
diff options
context:
space:
mode:
authorMark Salter <msalter@redhat.com>2014-03-12 12:28:06 -0400
committerMatt Fleming <matt.fleming@intel.com>2014-04-30 19:49:52 +0100
commitd7ecbddf4caefbac1b99478dd2b679f83dfc2545 (patch)
tree891461182b7dc468662b8913cba8702cf671570a /arch/arm64/include/asm/mmu.h
parent0302f71c0aa59571ac306f93068fbbfe65ea349b (diff)
downloadtalos-op-linux-d7ecbddf4caefbac1b99478dd2b679f83dfc2545.tar.gz
talos-op-linux-d7ecbddf4caefbac1b99478dd2b679f83dfc2545.zip
arm64: Add function to create identity mappings
At boot time, before switching to a virtual UEFI memory map, firmware expects UEFI memory and IO regions to be identity mapped whenever kernel makes runtime services calls. The existing early boot code creates an identity map of kernel text/data but this is not sufficient for UEFI. This patch adds a create_id_mapping() function which reuses the core code of the existing create_mapping(). Signed-off-by: Mark Salter <msalter@redhat.com> [ Fixed error message formatting (%pa). ] Signed-off-by: Mark Rutland <mark.rutland@arm.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 'arch/arm64/include/asm/mmu.h')
-rw-r--r--arch/arm64/include/asm/mmu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/mmu.h b/arch/arm64/include/asm/mmu.h
index f600d400c07d..29ed1d865e13 100644
--- a/arch/arm64/include/asm/mmu.h
+++ b/arch/arm64/include/asm/mmu.h
@@ -28,5 +28,7 @@ extern void paging_init(void);
extern void setup_mm_for_reboot(void);
extern void __iomem *early_io_map(phys_addr_t phys, unsigned long virt);
extern void init_mem_pgprot(void);
+/* create an identity mapping for memory (or io if map_io is true) */
+extern void create_id_mapping(phys_addr_t addr, phys_addr_t size, int map_io);
#endif
OpenPOWER on IntegriCloud