Skip to content

Commit

Permalink
core: fix non-LPAE page mapped static mapping
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
  • Loading branch information
etienne-lms committed Apr 27, 2017
1 parent e8c98df commit 3033f55
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/arch/arm/mm/core_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,10 @@ static void init_mem_map(struct tee_mmap_region *memory_map, size_t num_elems)
map->attr = core_mmu_type_to_attr(map->type);
va -= map->size;
va = ROUNDDOWN(va, map->region_size);
#if !defined(CFG_WITH_LPAE)
/* Mapping does not yet support sharing L2 tables */
va = ROUNDDOWN(va, CORE_MMU_PGDIR_SIZE);
#endif
map->va = va;
}
} else {
Expand All @@ -590,6 +594,10 @@ static void init_mem_map(struct tee_mmap_region *memory_map, size_t num_elems)

map->attr = core_mmu_type_to_attr(map->type);
va = ROUNDUP(va, map->region_size);
#if !defined(CFG_WITH_LPAE)
/* Mapping does not yet support sharing L2 tables */
va = ROUNDUP(va, CORE_MMU_PGDIR_SIZE);
#endif
map->va = va;
va += map->size;
}
Expand Down

0 comments on commit 3033f55

Please sign in to comment.