From d20a1d40492206a175755263ac9e670544af94a1 Mon Sep 17 00:00:00 2001 From: Sungbae Yoo Date: Tue, 30 Apr 2024 16:05:43 +0900 Subject: [PATCH] core: mmu: fix memory regions found from ff-a manifest Fix the 6th parameter of add_phys_mem() in collect_device_mem_ranges() that has to be the size of memory region and not the end address of the region. Fixes: 72a6827a6353 ("core: arm: SPMC obtain device memory info from DTB") Signed-off-by: Sungbae Yoo Reviewed-by: Etienne Carriere Acked-by: Jens Wiklander --- core/mm/core_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/mm/core_mmu.c b/core/mm/core_mmu.c index c09d9f5e824..0a33f35b737 100644 --- a/core/mm/core_mmu.c +++ b/core/mm/core_mmu.c @@ -997,7 +997,7 @@ static void collect_device_mem_ranges(struct tee_mmap_region *memory_map, } add_phys_mem(memory_map, num_elems, name, MEM_AREA_IO_SEC, - base, base + page_count * SMALL_PAGE_SIZE, last); + base, page_count * SMALL_PAGE_SIZE, last); } }