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

Function read_resources

src/device/device.c:186–214  ·  view source on GitHub ↗

* Read the resources on all devices of a given bus. * * @param bus Bus to read the resources on. */

Source from the content-addressed store, hash-verified

184 * @param bus Bus to read the resources on.
185 */
186static void read_resources(struct bus *bus)
187{
188 struct device *curdev;
189
190 printk(BIOS_SPEW, "%s %s segment group %d bus %d\n", dev_path(bus->dev),
191 __func__, bus->segment_group, bus->secondary);
192
193 /* Walk through all devices and find which resources they need. */
194 for (curdev = bus->children; curdev; curdev = curdev->sibling) {
195 if (!curdev->enabled)
196 continue;
197
198 if (!curdev->ops || !curdev->ops->read_resources) {
199 if (curdev->path.type != DEVICE_PATH_APIC)
200 printk(BIOS_ERR, "%s missing %s\n",
201 dev_path(curdev), __func__);
202 continue;
203 }
204 post_log_path(curdev);
205 curdev->ops->read_resources(curdev);
206
207 /* Read in the resources behind the current device's links. */
208 if (curdev->downstream)
209 read_resources(curdev->downstream);
210 }
211 post_log_clear();
212 printk(BIOS_SPEW, "%s %s segment group %d bus %d done\n",
213 dev_path(bus->dev), __func__, bus->segment_group, bus->secondary);
214}
215
216struct device *vga_pri = NULL;
217static void set_vga_bridge_bits(void)

Callers 1

dev_configureFunction · 0.70

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