Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/27118
Change subject: nb/intel/sandybridge: Fix domain resources ......................................................................
nb/intel/sandybridge: Fix domain resources
Fixed resources have to be registered early during read_resources() phase, such that device allocator will avoid them.
Tested on Lenovo X220, still boots.
Change-Id: I2c69ff8ec269d472f034fd79aafb337463193adf Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/northbridge/intel/sandybridge/northbridge.c 1 file changed, 13 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/27118/1
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c index 8c2aaf3..645128f 100644 --- a/src/northbridge/intel/sandybridge/northbridge.c +++ b/src/northbridge/intel/sandybridge/northbridge.c @@ -119,13 +119,15 @@ } }
-static void pci_domain_set_resources(struct device *dev) +static void mch_domain_read_resources(struct device *dev) { uint64_t tom, me_base, touud; uint32_t tseg_base, uma_size, tolud; uint16_t ggc; unsigned long long tomk;
+ pci_domain_read_resources(dev); + /* Total Memory 2GB example: * * 00000000 0000MB-1992MB 1992MB RAM (writeback) @@ -237,6 +239,14 @@ }
add_fixed_resources(dev, 6); +} + +static void mch_domain_set_resources(struct device *dev) +{ + struct resource *res; + + for (res = dev->resource_list; res; res = res->next) + report_resource_stored(dev, res, "");
assign_resources(dev->link_list); } @@ -262,8 +272,8 @@ * See e7525/northbridge.c for an example. */ static struct device_operations pci_domain_ops = { - .read_resources = pci_domain_read_resources, - .set_resources = pci_domain_set_resources, + .read_resources = mch_domain_read_resources, + .set_resources = mch_domain_set_resources, .enable_resources = NULL, .init = NULL, .scan_bus = pci_domain_scan_bus,