Skip to content

Commit

Permalink
core: fix core_mmu_map_pages()
Browse files Browse the repository at this point in the history
Adds missing dsb_ishst() at the end of core_mmu_map_pages() needed to
guarantee that changes to translation tables are visible.

Reported-by: Stuart Yoder <stuart.yoder@arm.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
  • Loading branch information
jenswi-linaro committed Sep 21, 2017
1 parent 23b8cea commit f61a0ba
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/arch/arm/mm/core_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,13 @@ TEE_Result core_mmu_map_pages(vaddr_t vstart, paddr_t *pages, size_t num_pages,
vaddr += SMALL_PAGE_SIZE;
}

/*
* Make sure all the changes to translation tables are visible
* before returning. TLB doesn't need to be invalidated as we are
* guaranteed that there's no valid mapping in this range.
*/
dsb_ishst();

return TEE_SUCCESS;
err:
if (i)
Expand Down

0 comments on commit f61a0ba

Please sign in to comment.