* 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
| 478 | * struct. |
| 479 | */ |
| 480 | void 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. |
no test coverage detected