• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/usr/acpi/

Lines Matching refs:walk

537     for (struct AcpiMapping *walk = head; walk; walk = walk->next)
543 walk->pbase,
544 vregion_get_base_addr(walk->vregion),
545 walk->length,
546 walk->refcount);
577 for (struct AcpiMapping *walk = head; walk; walk = walk->next) {
578 lpaddr_t walk_end = walk->pbase + walk->length - 1;
580 ACPI_DEBUG("%s: walk=0x%" PRIxLPADDR "...0x%" PRIxLPADDR ", region=0x%"
582 walk->pbase, walk_end, pbase, pend);
585 * The walk region starts before the requested region.
589 if (walk->pbase <= pbase) {
592 * The walk region ends after the requested region.
600 walk->refcount++;
603 walk->refcount, vregion_get_base_addr(walk->vregion));
605 return (void*)(uintptr_t)vregion_get_base_addr(walk->vregion)
606 + (where-walk->pbase);
610 * The walk region ends before the requested region.
623 * The walk region ends before the requested region ends
627 * We can use the caps of the parts of this walk region. From
630 size_t walk_offset = (walk->pbase - pbase) / BASE_PAGE_SIZE;
632 for (size_t i = walk_offset; i < walk->num_caps; i++) {
633 ACPI_DEBUG("%s: using am_pages[%zu/%zu] = walk->caps[%zu/%zu] with paddr=0x%"
635 walk->num_caps, walk->pbase + i * BASE_PAGE_SIZE);
636 assert(i < walk->num_caps);
638 am_pages[idx++] = walk->caps[i];
645 * The walk region starts after the requested element.
649 * walk->pbase > pbase
651 * the region is outside of the walk.
653 if (walk->pbase > pend) {
658 * The walk region starts after the requested element.
662 * walk->pbase > pbase
664 * the region is outside of the walk.
666 size_t region_offset = (walk->pbase - pbase) / BASE_PAGE_SIZE;
668 for (lpaddr_t cur = walk->pbase; cur < pend; cur += BASE_PAGE_SIZE) {
669 ACPI_DEBUG("%s: using am_pages[%zu/%zu] = walk->caps[%zu/%zu] with paddr=0x%"
671 walk->num_caps, walk->pbase + idx * BASE_PAGE_SIZE);
673 assert(idx < walk->num_caps);
674 am_pages[region_offset++] = walk->caps[idx++];
803 for (struct AcpiMapping *walk = head; walk; prev = walk, walk = walk->next) {
804 genvaddr_t walk_vaddr = vregion_get_base_addr(walk->vregion);
805 genvaddr_t walk_end = walk_vaddr + walk->length;
808 walk_vaddr, walk->length / BASE_PAGE_SIZE);
809 walk->refcount--;
810 if (!walk->refcount) {
815 err = vregion_destroy(walk->vregion);
822 err = memobj_destroy_anon((struct memobj *)walk->memobj, false);
829 prev->next = walk->next;
832 head = walk->next;
835 for (int i = 0; i < walk->num_caps; i++) {
837 cap_destroy(walk->caps[i]);
841 free(walk->vregion);
842 free(walk->memobj);
843 free(walk->caps);
844 free(walk);