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

Function dev_configure

src/device/device.c:480–511  ·  view source on GitHub ↗

* Configure devices on the devices tree. * * Starting at the root of the device tree, travel it recursively in two * passes. In the first pass, we compute and allocate resources (ranges) * required by each device. In the second pass, the resources ranges are * relocated to their final position and stored to the hardware. * * I/O resources grow upward. MEM resources grow downward. * * Sinc

Source from the content-addressed store, hash-verified

478 * struct.
479 */
480void dev_configure(void)
481{
482 const struct device *root;
483
484 set_vga_bridge_bits();
485
486 printk(BIOS_INFO, "Allocating resources...\n");
487
488 root = &dev_root;
489
490 /*
491 * Each domain should create resources which contain the entire address
492 * space for IO, MEM, and PREFMEM resources in the domain. The
493 * allocation of device resources will be done from this address space.
494 */
495
496 /* Read the resources for the entire tree. */
497
498 printk(BIOS_INFO, "Reading resources...\n");
499 read_resources(root->downstream);
500 printk(BIOS_INFO, "Done reading resources.\n");
501
502 print_resource_tree(root, BIOS_SPEW, "After reading.");
503
504 allocate_resources(root);
505
506 assign_resources(root->downstream);
507 printk(BIOS_INFO, "Done setting resources.\n");
508 print_resource_tree(root, BIOS_SPEW, "After assigning values.");
509
510 printk(BIOS_INFO, "Done allocating resources.\n");
511}
512
513/**
514 * Enable devices on the device tree.

Callers 1

bs_dev_resourcesFunction · 0.85

Calls 6

set_vga_bridge_bitsFunction · 0.85
print_resource_treeFunction · 0.85
allocate_resourcesFunction · 0.85
assign_resourcesFunction · 0.85
read_resourcesFunction · 0.70
printkFunction · 0.50

Tested by

no test coverage detected