diff options
author | Volodymyr Babchuk <vlad.babchuk@gmail.com> | 2016-12-20 17:17:43 +0200 |
---|---|---|
committer | Jerome Forissier <jerome.forissier@linaro.org> | 2017-04-28 18:03:36 +0200 |
commit | e3e468b325443274ca3349b2a098e343d1e234c1 (patch) | |
tree | 1620628df91e06da8257c68f129cb9fdf24b3cfe /core/arch/arm/include/mm/core_mmu.h | |
parent | c6c69797168cab3bc54eed3a430f2d9f2d278824 (diff) |
core_mmu: add page map/unmap functions
This function allows to map list of physical pages to specified virtual
memory address.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
[jf: remove braces {} around single statement block]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Diffstat (limited to 'core/arch/arm/include/mm/core_mmu.h')
-rw-r--r-- | core/arch/arm/include/mm/core_mmu.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/core/arch/arm/include/mm/core_mmu.h b/core/arch/arm/include/mm/core_mmu.h index 56e23d4d..331b178b 100644 --- a/core/arch/arm/include/mm/core_mmu.h +++ b/core/arch/arm/include/mm/core_mmu.h @@ -382,6 +382,24 @@ static inline bool core_mmu_is_dynamic_vaspace(struct tee_mmap_region *mm) } /* + * core_mmu_map_pages() - map list of pages at given virtual address + * @vstart: Virtual address where mapping begins + * @pages: Array of page addresses + * @num_pages: Number of pages + * @memtype: Type of memmory to be mapped + * @returns: TEE_SUCCESS on success, TEE_ERROR_XXX on error + */ +TEE_Result core_mmu_map_pages(vaddr_t vstart, paddr_t *pages, size_t num_pages, + enum teecore_memtypes memtype); + +/* + * core_mmu_unmap_pages() - remove mapping at given virtual address + * @vstart: Virtual address where mapping begins + * @num_pages: Number of pages to unmap + */ +void core_mmu_unmap_pages(vaddr_t vstart, size_t num_pages); + +/* * core_mmu_user_mapping_is_active() - Report if user mapping is active * @returns true if a user VA space is active, false if user VA space is * inactive. |