Skip to content

Commit

Permalink
core: pager: invalidate tlb when clearing entry
Browse files Browse the repository at this point in the history
When clearing an entry in a translation table corresponding TLB entry
must always be invalidated. With this patch two missing places are
addressed.

Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey)
  • Loading branch information
jenswi-linaro committed Jun 12, 2017
1 parent 768b080 commit 33dbe9e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/arch/arm/mm/tee_pager.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,9 @@ static void rem_area(struct tee_pager_area_head *area_head,
}
}

/* TODO only invalidate entries touched above */
core_tlb_maintenance(TLBINV_UNIFIEDTLB, 0);

pager_unlock(exceptions);
free_area(area);
}
Expand Down Expand Up @@ -1403,6 +1406,8 @@ static void pager_save_and_release_entry(struct tee_pager_pmem *pmem)

area_get_entry(pmem->area, pmem->pgidx, NULL, &attr);
area_set_entry(pmem->area, pmem->pgidx, 0, 0);
/* TODO only invalidate entry touched above */
core_tlb_maintenance(TLBINV_UNIFIEDTLB, 0);
tee_pager_save_page(pmem, attr);
assert(pmem->area->pgt->num_used_entries);
pmem->area->pgt->num_used_entries--;
Expand Down

0 comments on commit 33dbe9e

Please sign in to comment.