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

Function assign_resources

src/device/device.c:298–320  ·  view source on GitHub ↗

* Assign the computed resources to the devices on the bus. * * Use the device specific set_resources() method to store the computed * resources to hardware. For bridge devices, the set_resources() method * has to recurse into every down stream buses. * * Mutual recursion: * assign_resources() -> device_operation::set_resources() * device_operation::set_resources() -> assign_resources() *

Source from the content-addressed store, hash-verified

296 * @param bus Pointer to the structure for this bus.
297 */
298void assign_resources(struct bus *bus)
299{
300 struct device *curdev;
301
302 printk(BIOS_SPEW, "%s %s, segment group %d bus %d\n",
303 dev_path(bus->dev), __func__, bus->segment_group, bus->secondary);
304
305 for (curdev = bus->children; curdev; curdev = curdev->sibling) {
306 if (!curdev->enabled || !curdev->resource_list)
307 continue;
308
309 if (!curdev->ops || !curdev->ops->set_resources) {
310 printk(BIOS_ERR, "%s missing set_resources\n",
311 dev_path(curdev));
312 continue;
313 }
314 post_log_path(curdev);
315 curdev->ops->set_resources(curdev);
316 }
317 post_log_clear();
318 printk(BIOS_SPEW, "%s %s, segment group %d bus %d done\n",
319 dev_path(bus->dev), __func__, bus->segment_group, bus->secondary);
320}
321
322/**
323 * Enable the resources for devices on a link.

Callers 12

generic_set_resourcesFunction · 0.85
mch_domain_set_resourcesFunction · 0.85
mch_domain_set_resourcesFunction · 0.85
mch_domain_set_resourcesFunction · 0.85
mch_domain_set_resourcesFunction · 0.85
mch_domain_set_resourcesFunction · 0.85
mch_domain_set_resourcesFunction · 0.85
pci_domain_set_resourcesFunction · 0.85
pci_dev_set_resourcesFunction · 0.85
dev_configureFunction · 0.85
set_resourcesFunction · 0.85

Calls 4

dev_pathFunction · 0.85
post_log_pathFunction · 0.85
post_log_clearFunction · 0.85
printkFunction · 0.50

Tested by

no test coverage detected