Lines Matching full:start

130 	KASSERT(a->start <= a->end, ("inverted entry %p (%jx, %jx)",  in iommu_gas_cmp_entries()
131 a, (uintmax_t)a->start, (uintmax_t)a->end)); in iommu_gas_cmp_entries()
132 KASSERT(b->start <= b->end, ("inverted entry %p (%jx, %jx)", in iommu_gas_cmp_entries()
133 b, (uintmax_t)b->start, (uintmax_t)b->end)); in iommu_gas_cmp_entries()
135 a->end <= b->start || b->end <= a->start || in iommu_gas_cmp_entries()
136 a->end == a->start || b->end == b->start, in iommu_gas_cmp_entries()
139 a, (uintmax_t)a->start, (uintmax_t)a->end, a->flags, in iommu_gas_cmp_entries()
140 b, (uintmax_t)b->start, (uintmax_t)b->end, b->flags, in iommu_gas_cmp_entries()
161 bound = entry->start; in iommu_gas_augment_entry()
206 v = MAX(v, entry->start - l->last); in iommu_gas_check_free()
255 end->start = domain->end; in iommu_gas_init_domain()
260 begin->start = 0; in iommu_gas_init_domain()
284 KASSERT(entry->start == 0, ("start entry start %p", domain)); in iommu_gas_fini_domain()
285 KASSERT(entry->end == IOMMU_PAGE_SIZE, ("start entry end %p", domain)); in iommu_gas_fini_domain()
288 ("start entry flags %p", domain)); in iommu_gas_fini_domain()
293 KASSERT(entry->start == domain->end, ("end entry start %p", domain)); in iommu_gas_fini_domain()
321 iommu_gaddr_t first, size, start; in iommu_gas_match_one() local
326 * causes page alignment for the entry->start too. in iommu_gas_match_one()
332 start = roundup2(beg, a->common->alignment); in iommu_gas_match_one()
333 if (start < beg) in iommu_gas_match_one()
340 if (start + offset + size - 1 > end) in iommu_gas_match_one()
344 if (!vm_addr_bound_ok(start + offset, size, a->common->boundary)) { in iommu_gas_match_one()
346 * The start + offset to start + offset + size region crosses in iommu_gas_match_one()
350 first = start; in iommu_gas_match_one()
351 beg = roundup2(start + offset + 1, a->common->boundary); in iommu_gas_match_one()
352 start = roundup2(beg, a->common->alignment); in iommu_gas_match_one()
354 if (start + offset + size - 1 > end || in iommu_gas_match_one()
355 !vm_addr_bound_ok(start + offset, size, in iommu_gas_match_one()
360 * split. We already checked that start + size does not in iommu_gas_match_one()
364 * start of the next entry, then we do not have gap. in iommu_gas_match_one()
370 start = first; in iommu_gas_match_one()
374 entry->start = start; in iommu_gas_match_one()
375 entry->end = start + roundup2(size + offset, IOMMU_PAGE_SIZE); in iommu_gas_match_one()
434 first->last + min_free <= curr->start) in iommu_gas_find_space()
462 iommu_gas_match_one(a, first->last, curr->start, in iommu_gas_find_space()
482 * To resume the search at the start of the upper region, first climb to in iommu_gas_find_space()
506 iommu_gas_match_one(a, first->last, curr->start, in iommu_gas_find_space()
532 if ((entry->start & IOMMU_PAGE_MASK) != 0 || in iommu_gas_alloc_region()
535 if (entry->start >= entry->end) in iommu_gas_alloc_region()
543 (uintmax_t)entry->start)); in iommu_gas_alloc_region()
556 if (prev != NULL && prev->end > entry->start && in iommu_gas_alloc_region()
561 entry->start = prev->end; in iommu_gas_alloc_region()
563 if (next->start < entry->end && in iommu_gas_alloc_region()
568 entry->end = next->start; in iommu_gas_alloc_region()
570 if (entry->end == entry->start) in iommu_gas_alloc_region()
573 if (prev != NULL && prev->end > entry->start) { in iommu_gas_alloc_region()
580 if (next->start < entry->end) { in iommu_gas_alloc_region()
594 entry, entry->start, entry->end, prev, in iommu_gas_alloc_region()
595 prev == NULL ? 0 : prev->start, prev == NULL ? 0 : prev->end, in iommu_gas_alloc_region()
596 ip, ip == NULL ? 0 : ip->start, ip == NULL ? 0 : ip->end)); in iommu_gas_alloc_region()
599 entry, entry->start, entry->end, next, in iommu_gas_alloc_region()
600 next == NULL ? 0 : next->start, next == NULL ? 0 : next->end, in iommu_gas_alloc_region()
601 in, in == NULL ? 0 : in->start, in == NULL ? 0 : in->end)); in iommu_gas_alloc_region()
646 iommu_gas_remove_clip_left(struct iommu_domain *domain, iommu_gaddr_t start, in iommu_gas_remove_clip_left() argument
652 MPASS(start <= end); in iommu_gas_remove_clip_left()
657 * start, or the first entry after the start. Since we in iommu_gas_remove_clip_left()
658 * asserted that start is below domain end, entry should in iommu_gas_remove_clip_left()
662 fentry.start = start + 1; in iommu_gas_remove_clip_left()
663 fentry.end = start + 1; in iommu_gas_remove_clip_left()
667 if (entry->start >= start || in iommu_gas_remove_clip_left()
674 res->start = entry->end = start; in iommu_gas_remove_clip_left()
686 if (entry->start >= end || (entry->flags & IOMMU_MAP_ENTRY_RMRR) != 0) in iommu_gas_remove_clip_right()
690 r->end = entry->start = end; in iommu_gas_remove_clip_right()
714 iommu_gaddr_t start, iommu_gaddr_t size, in iommu_gas_remove_locked() argument
723 end = start + size; in iommu_gas_remove_locked()
725 nentry = iommu_gas_remove_clip_left(domain, start, end, r1); in iommu_gas_remove_locked()
727 if (entry->start >= end) in iommu_gas_remove_locked()
729 KASSERT(start <= entry->start, in iommu_gas_remove_locked()
730 ("iommu_gas_remove entry (%#jx, %#jx) start %#jx", in iommu_gas_remove_locked()
731 entry->start, entry->end, start)); in iommu_gas_remove_locked()
744 KASSERT(entry->end <= start || entry->start >= end, in iommu_gas_remove_locked()
747 entry->start, entry->end, start, end)); in iommu_gas_remove_locked()
785 iommu_gas_remove(struct iommu_domain *domain, iommu_gaddr_t start, in iommu_gas_remove() argument
793 iommu_gas_remove_locked(domain, start, size, &gc, &r1, &r2); in iommu_gas_remove()
855 iommu_gaddr_t start; in iommu_gas_map_region() local
866 start = entry->start; in iommu_gas_map_region()
875 if (entry->end == entry->start) in iommu_gas_map_region()
879 ma + OFF_TO_IDX(start - entry->start), eflags, in iommu_gas_map_region()
894 iommu_gaddr_t start, iommu_gaddr_t end, struct iommu_map_entry *entry) in iommu_gas_reserve_region_locked() argument
900 entry->start = start; in iommu_gas_reserve_region_locked()
909 iommu_gas_reserve_region(struct iommu_domain *domain, iommu_gaddr_t start, in iommu_gas_reserve_region() argument
917 error = iommu_gas_reserve_region_locked(domain, start, end, entry); in iommu_gas_reserve_region()
927 * As in iommu_gas_reserve_region, reserve [start, end), but allow for existing
932 iommu_gaddr_t start, iommu_gaddr_t end) in iommu_gas_reserve_region_extend() argument
941 while (start < end) { in iommu_gas_reserve_region_extend()
947 key.start = key.end = start; in iommu_gas_reserve_region_extend()
952 (uintmax_t)start)); in iommu_gas_reserve_region_extend()
953 entry_end = ummin(end, next->start); in iommu_gas_reserve_region_extend()
956 entry_start = ummax(start, prev->end); in iommu_gas_reserve_region_extend()
958 entry_start = start; in iommu_gas_reserve_region_extend()
959 start = next->end; in iommu_gas_reserve_region_extend()
1026 domain->msi_base = entry->start; in iommu_map_msi()
1054 KASSERT(*addr >= domain->msi_entry->start, in iommu_translate_msi()
1055 ("%s: Address is below the MSI entry start address (%jx < %jx)", in iommu_translate_msi()
1056 __func__, (uintmax_t)*addr, (uintmax_t)domain->msi_entry->start)); in iommu_translate_msi()
1087 entry, (uintmax_t)entry->start, (uintmax_t)entry->end, in iommu_debug_dump_gas()