Lines Matching refs:first

536 static int find_entry(xthal_MPU_entry* fg, unsigned first)  in find_entry()  argument
541 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) <= first) in find_entry()
557 static int needed_entries_exist(xthal_MPU_entry* fg, unsigned first, unsigned last) in needed_entries_exist() argument
562 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) == first) in needed_entries_exist()
625 static int get_bg_map_index(const xthal_MPU_entry* bg, unsigned first) in get_bg_map_index() argument
629 if (first > XTHAL_MPU_ENTRY_GET_VSTARTADDR(bg[i])) in get_bg_map_index()
742 …tic unsigned next_address_to_commit(xthal_MPU_entry* fg, const xthal_MPU_entry* bg, unsigned first, in next_address_to_commit() argument
746 …return max(first, XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[current_index - 1]), XTHAL_MPU_ENTRY_GET_VSTAR… in next_address_to_commit()
759 …id safe_and_commit_overlaped_regions(xthal_MPU_entry* fg, const xthal_MPU_entry*bg, unsigned first, in safe_and_commit_overlaped_regions() argument
776 next = next_address_to_commit(fg, bg, first, i); in safe_and_commit_overlaped_regions()
782 } while (next > first); in safe_and_commit_overlaped_regions()
801 static void handle_invalid_pred(xthal_MPU_entry* fg, const xthal_MPU_entry* bg, unsigned first, int… in handle_invalid_pred() argument
828 if (addr == first) in handle_invalid_pred()
836 if (addr < first && first_bg_map_index == -1) in handle_invalid_pred()
862 unsigned first, int invalid) in insert_entry_if_needed_with_existing_attr() argument
870 if (XTHAL_MPU_ENTRY_GET_VSTARTADDR(fg[i]) == first) in insert_entry_if_needed_with_existing_attr()
887 ip = find_entry(fg, first); in insert_entry_if_needed_with_existing_attr()
891 handle_invalid_pred(fg, bg, first, ip); in insert_entry_if_needed_with_existing_attr()
894 n = _xthal_get_entry(fg, bg, first, &infg); in insert_entry_if_needed_with_existing_attr()
899 XTHAL_MPU_ENTRY_SET_VSTARTADDR(n,first); in insert_entry_if_needed_with_existing_attr()
998 static unsigned start_initial_region(xthal_MPU_entry* fg, const xthal_MPU_entry* bg, unsigned first, in start_initial_region() argument
1006 if (addr <= first) in start_initial_region()
1011 return first; in start_initial_region()
1014 static int safe_add_region(unsigned first, unsigned last, unsigned accessRights, unsigned memoryTyp… in safe_add_region() argument
1060 if (!needed_entries_exist(fg, first, last)) in safe_add_region()
1079 if ((rv = create_aligning_entries_if_required(fg, Xthal_mpu_bgmap, first)) != XTHAL_SUCCESS) in safe_add_region()
1172 …with_existing_attr(fg, Xthal_mpu_bgmap, start_initial_region(fg, Xthal_mpu_bgmap, first, last), 0)) in safe_add_region()
1186 …safe_and_commit_overlaped_regions(fg, Xthal_mpu_bgmap, first, last, memoryType, accessRights, writ… in safe_add_region()
1641 unsigned int first; in xthal_mpu_set_region_attribute() local
1649 first = (unsigned) vaddr; in xthal_mpu_set_region_attribute()
1650 last = first + size; in xthal_mpu_set_region_attribute()
1653 if (first >= last) in xthal_mpu_set_region_attribute()
1683 if (!mpu_aligned(first) || !mpu_aligned(last + 1)) in xthal_mpu_set_region_attribute()
1686 first = mpu_align(first, (flags & XTHAL_CAFLAG_NO_PARTIAL)); in xthal_mpu_set_region_attribute()
1690 if (first >= last) in xthal_mpu_set_region_attribute()
1693 rv = safe_add_region(first, last, accessRights, memoryType, !(flags & XTHAL_CAFLAG_NO_AUTO_WB), in xthal_mpu_set_region_attribute()