Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8890
-gerrit
commit 933790f650a7bb1a6096eda0592d5b571f1a3505 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Mon Mar 23 14:22:22 2015 +0200
resource: Adjust memory resources high earlier
Do this to avoid reporting incorrect resource window in the logs.
Change-Id: Icb7978deeb54f0ec6c29473ce9034fe44b6d7602 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/device/device.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/src/device/device.c b/src/device/device.c index 8cc5527..35bb6e2 100644 --- a/src/device/device.c +++ b/src/device/device.c @@ -746,6 +746,10 @@ static void avoid_fixed_resources(struct device *dev) if (res->limit > lim->limit) res->limit = lim->limit;
+ /* MEM resources need to start at the highest address manageable. */ + if (res->flags & IORESOURCE_MEM) + res->base = resource_max(res); + printk(BIOS_SPEW, "%s:@%s %02lx base %08llx limit %08llx\n", __func__, dev_path(dev), res->index, res->base, res->limit); } @@ -1057,21 +1061,6 @@ void dev_configure(void) if (child->path.type == DEVICE_PATH_DOMAIN) avoid_fixed_resources(child);
- /* - * Now we need to adjust the resources. MEM resources need to start at - * the highest address manageable. - */ - for (child = root->link_list->children; child; child = child->sibling) { - if (child->path.type != DEVICE_PATH_DOMAIN) - continue; - for (res = child->resource_list; res; res = res->next) { - if (!(res->flags & IORESOURCE_MEM) || - res->flags & IORESOURCE_FIXED) - continue; - res->base = resource_max(res); - } - } - /* Store the computed resource allocations into device registers ... */ printk(BIOS_INFO, "Setting resources...\n"); for (child = root->link_list->children; child; child = child->sibling) {