MCPcopy Create free account
hub / github.com/coreboot/coreboot / resource_tree

Function resource_tree

src/device/device_util.c:677–707  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

675}
676
677static void resource_tree(const struct device *root, int debug_level, int depth)
678{
679 int i = 0;
680 struct device *child;
681 struct resource *res;
682 char indent[30]; /* If your tree has more levels, it's wrong. */
683
684 for (i = 0; i < depth + 1 && i < 29; i++)
685 indent[i] = ' ';
686 indent[i] = '\0';
687
688 printk(BIOS_DEBUG, "%s%s", indent, dev_path(root));
689 if (root->downstream && root->downstream->children)
690 printk(BIOS_DEBUG, " child on link 0 %s",
691 dev_path(root->downstream->children));
692 printk(BIOS_DEBUG, "\n");
693
694 for (res = root->resource_list; res; res = res->next) {
695 printk(debug_level, "%s%s resource base %llx size %llx "
696 "align %d gran %d limit %llx flags %lx index %lx\n",
697 indent, dev_path(root), res->base, res->size,
698 res->align, res->gran, res->limit, res->flags,
699 res->index);
700 }
701
702 if (!root->downstream)
703 return;
704
705 for (child = root->downstream->children; child; child = child->sibling)
706 resource_tree(child, debug_level, depth + 1);
707}
708
709void print_resource_tree(const struct device *root, int debug_level,
710 const char *msg)

Callers 1

print_resource_treeFunction · 0.85

Calls 2

dev_pathFunction · 0.85
printkFunction · 0.50

Tested by

no test coverage detected