Lines Matching full:region

22 	struct shared_multi_heap_region region;  member
28 .region = { \
41 static void smh_reg_map(struct shared_multi_heap_region *region) in smh_reg_map() argument
46 mem_attr = (region->attr == SMH_REG_ATTR_CACHEABLE) ? K_MEM_CACHE_WB : K_MEM_CACHE_NONE; in smh_reg_map()
49 k_mem_map_phys_bare(&v_addr, region->addr, region->size, mem_attr); in smh_reg_map()
51 region->addr = (uintptr_t) v_addr; in smh_reg_map()
56 * Given a virtual address retrieve the original memory region that the mapping
62 if ((uintptr_t) v_addr >= map[reg].region.addr && in get_region_map()
63 (uintptr_t) v_addr < map[reg].region.addr + map[reg].region.size) { in get_region_map()
108 if (reg_map->region.attr == DT_MEM_ARM_MPU_UNKNOWN) { in fill_multi_heap()
113 reg_map->region.attr = mpu_to_reg_attr(reg_map->region.attr); in fill_multi_heap()
116 reg_map->p_addr = reg_map->region.addr; in fill_multi_heap()
125 * region are configured at build-time, so no map is needed. in fill_multi_heap()
127 smh_reg_map(&reg_map->region); in fill_multi_heap()
130 shared_multi_heap_add(&reg_map->region, NULL); in fill_multi_heap()
156 * smaller region RES0 in ZTEST()
161 zassert_equal(reg_map->p_addr, RES0_CACHE_ADDR, "block in the wrong memory region"); in ZTEST()
162 zassert_equal(reg_map->region.attr, SMH_REG_ATTR_CACHEABLE, "wrong memory attribute"); in ZTEST()
166 * smaller cacheable region RES0 in ZTEST()
171 zassert_equal(reg_map->p_addr, RES0_CACHE_ADDR, "block in the wrong memory region"); in ZTEST()
172 zassert_equal(reg_map->region.attr, SMH_REG_ATTR_CACHEABLE, "wrong memory attribute"); in ZTEST()
176 * bigger cacheable region RES2 in ZTEST()
181 zassert_equal(reg_map->p_addr, RES2_CACHE_ADDR, "block in the wrong memory region"); in ZTEST()
182 zassert_equal(reg_map->region.attr, SMH_REG_ATTR_CACHEABLE, "wrong memory attribute"); in ZTEST()
186 * non-cacheable region RES1 in ZTEST()
191 zassert_equal(reg_map->p_addr, RES1_NOCACHE_ADDR, "block in the wrong memory region"); in ZTEST()
192 zassert_equal(reg_map->region.attr, SMH_REG_ATTR_NON_CACHEABLE, "wrong memory attribute"); in ZTEST()
196 * non-cacheable region RES1 in ZTEST()
201 zassert_equal(reg_map->p_addr, RES1_NOCACHE_ADDR, "block in the wrong memory region"); in ZTEST()
202 zassert_equal(reg_map->region.attr, SMH_REG_ATTR_NON_CACHEABLE, "wrong memory attribute"); in ZTEST()
206 zassert_is_null(block, "allocated buffer too big for the region"); in ZTEST()