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.

Reviewed-by: Etienne Carriere <[email protected]>
Tested-by: Stuart Yoder <[email protected]>
Reported-by: Stuart Yoder <[email protected]>
Signed-off-by: Jens Wiklander <[email protected]>
  • Loading branch information
jenswi-linaro authored and jforissier committed Sep 25, 2017
1 parent 23b8cea commit 0c6da01
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 0c6da01

Please sign in to comment.