Skip to content

Commit

Permalink
[review] core: non-LPAE reuse xlat table when possible at static map …
Browse files Browse the repository at this point in the history
…init

Add a comment to clarify why asserting level2 table address is sufficient.

Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
  • Loading branch information
etienne-lms committed May 9, 2017
1 parent 96bdd2e commit f799971
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/arch/arm/mm/core_mmu_v7.c
Original file line number Diff line number Diff line change
Expand Up @@ -679,8 +679,12 @@ static paddr_t map_page_memarea(const struct tee_mmap_region *mm, uint32_t xlat)
else
l2 = phys_to_virt(xlat & SECTION_PT_ATTR_MASK,
MEM_AREA_TEE_RAM_RW_DATA);

/*
* If allocation above failed, it panicked.
* If xlat was non null, it is expected already a valid entry.
*/
assert(l2);

attr = mattr_to_desc(2, mm->attr);

pg_idx = (mm->va & SECTION_MASK) >> SMALL_PAGE_SHIFT;
Expand Down

0 comments on commit f799971

Please sign in to comment.