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

Function dev_enumerate

src/device/device.c:443–465  ·  view source on GitHub ↗

* Determine the existence of devices and extend the device tree. * * Most of the devices in the system are listed in the mainboard devicetree.cb * file. The device structures for these devices are generated at compile * time by the config tool and are organized into the device tree. This * function determines if the devices created at compile time actually exist * in the physical system. *

Source from the content-addressed store, hash-verified

441 * it to the device tree.
442 */
443void dev_enumerate(void)
444{
445 struct device *root;
446
447 printk(BIOS_INFO, "Enumerating buses...\n");
448
449 root = &dev_root;
450
451 show_all_devs(BIOS_SPEW, "Before device enumeration.");
452 printk(BIOS_SPEW, "Compare with tree...\n");
453 show_devs_tree(root, BIOS_SPEW, 0);
454
455 if (root->chip_ops && root->chip_ops->enable_dev)
456 root->chip_ops->enable_dev(root);
457
458 if (!root->ops || !root->ops->scan_bus) {
459 printk(BIOS_ERR, "dev_root missing scan_bus operation");
460 return;
461 }
462 scan_bus(root);
463 post_log_clear();
464 printk(BIOS_INFO, "done\n");
465}
466
467/**
468 * Configure devices on the devices tree.

Callers 1

bs_dev_enumerateFunction · 0.85

Calls 5

show_all_devsFunction · 0.85
show_devs_treeFunction · 0.85
scan_busFunction · 0.85
post_log_clearFunction · 0.85
printkFunction · 0.50

Tested by

no test coverage detected