Lines Matching refs:mm

62 	mmap_region_t *mm = mmap;  in print_mmap()  local
63 while (mm->size != 0U) { in print_mmap()
65 (void *)mm->base_va, mm->base_pa, in print_mmap()
66 mm->size, mm->attr); in print_mmap()
67 ++mm; in print_mmap()
76 mmap_region_t *mm = mmap; in mmap_add_region() local
77 const mmap_region_t *mm_last = mm + ARRAY_SIZE(mmap) - 1U; in mmap_add_region()
99 for (mm = mmap; mm->size; ++mm) { in mmap_add_region()
101 uintptr_t mm_end_va = mm->base_va + mm->size - 1U; in mmap_add_region()
108 ((base_va >= mm->base_va) && (end_va <= mm_end_va)) || in mmap_add_region()
109 ((mm->base_va >= base_va) && (mm_end_va <= end_va)); in mmap_add_region()
117 assert((mm->base_va - mm->base_pa) == in mmap_add_region()
119 assert((base_va != mm->base_va) || (size != mm->size)); in mmap_add_region()
128 mm->base_pa + mm->size - 1; in mmap_add_region()
130 bool separated_pa = (end_pa < mm->base_pa) || in mmap_add_region()
132 bool separated_va = (end_va < mm->base_va) || in mmap_add_region()
139 mm = mmap; /* Restore pointer to the start of the array */ in mmap_add_region()
144 while ((mm->base_va < base_va) && (mm->size != 0U)) in mmap_add_region()
145 ++mm; in mmap_add_region()
158 while ((mm->base_va == base_va) && (mm->size > size)) in mmap_add_region()
159 ++mm; in mmap_add_region()
162 (void)memmove(mm + 1, mm, (uintptr_t)mm_last - (uintptr_t)mm); in mmap_add_region()
167 mm->base_pa = base_pa; in mmap_add_region()
168 mm->base_va = base_va; in mmap_add_region()
169 mm->size = size; in mmap_add_region()
170 mm->attr = attr; in mmap_add_region()
178 void mmap_add(const mmap_region_t *mm) in mmap_add() argument
180 const mmap_region_t *mm_cursor = mm; in mmap_add()
279 static unsigned int mmap_region_attr(const mmap_region_t *mm, uintptr_t base_va, in mmap_region_attr() argument
300 for ( ; ; ++mm) { in mmap_region_attr()
302 if (mm->size == 0U) in mmap_region_attr()
305 if (mm->base_va > (base_va + size - 1U)) in mmap_region_attr()
308 if ((mm->base_va + mm->size - 1U) < base_va) in mmap_region_attr()
311 if ((ret == 0U) && (mm->attr == *attr)) in mmap_region_attr()
314 if ((mm->base_va > base_va) || in mmap_region_attr()
315 ((mm->base_va + mm->size - 1U) < (base_va + size - 1U))) in mmap_region_attr()
318 *attr = mm->attr; in mmap_region_attr()
324 static mmap_region_t *init_xlation_table_inner(mmap_region_t *mm, in init_xlation_table_inner() argument
343 if (mm->size == 0U) { in init_xlation_table_inner()
346 } else if ((mm->base_va + mm->size - 1U) < base_va) { in init_xlation_table_inner()
348 ++mm; in init_xlation_table_inner()
355 if (mm->base_va > (base_va + level_size - 1U)) { in init_xlation_table_inner()
366 unsigned int r = mmap_region_attr(mm, base_va, in init_xlation_table_inner()
371 base_va - mm->base_va + mm->base_pa, in init_xlation_table_inner()
385 mm = init_xlation_table_inner(mm, base_va, in init_xlation_table_inner()
396 return mm; in init_xlation_table_inner()