[coreboot-gerrit] Patch set updated for coreboot: sb/amd/sr5650: Correctly locate CPU MMIO resource

Timothy Pearson (tpearson@raptorengineeringinc.com) gerrit at coreboot.org
Sat Jan 2 06:34:28 CET 2016


Timothy Pearson (tpearson at raptorengineeringinc.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12821

-gerrit

commit d4d107dacbe50e1c97f1ee614837a3b9875c0747
Author: Timothy Pearson <tpearson at raptorengineeringinc.com>
Date:   Fri Jan 1 23:30:42 2016 -0600

    sb/amd/sr5650: Correctly locate CPU MMIO resource
    
    The code committed in GIT hash 1eaaa0 did not correctly
    locate the CPU MMIO resource, leading to failures with
    operating systems and firmware when the PCI extended
    configuration space option was activated.
    
    Search for the CPU MMIO resource on all domains below
    the root device.
    
    Change-Id: I0df2f825fef2de46563db87af78d0609ab3d8c5a
    Signed-off-by: Timothy Pearson <tpearson at raptorengineeringinc.com>
---
 src/southbridge/amd/sr5650/sr5650.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/src/southbridge/amd/sr5650/sr5650.c b/src/southbridge/amd/sr5650/sr5650.c
index d4355d6..c4336a6 100644
--- a/src/southbridge/amd/sr5650/sr5650.c
+++ b/src/southbridge/amd/sr5650/sr5650.c
@@ -35,15 +35,21 @@ extern void set_pcie_dereset(void);
 extern void set_pcie_reset(void);
 
 struct resource * sr5650_retrieve_cpu_mmio_resource() {
-	device_t cpu;
+	device_t domain;
+	struct device *sibling;
+	struct bus *link;
 	struct resource *res;
 
-	for (cpu = all_devices; cpu; cpu = cpu->next) {
-		if (cpu->bus->dev->path.type != DEVICE_PATH_CPU_CLUSTER)
-			continue;
-		res = probe_resource(cpu->bus->dev, 0xc0010058);
-		if (res)
-			return res;
+	for (link = all_devices->link_list; link; link = link->next) {
+		for (sibling = link->children; sibling; sibling = sibling->sibling) {
+			for (domain = sibling; domain; domain = domain->next) {
+				if (domain->bus->dev->path.type != DEVICE_PATH_DOMAIN)
+					continue;
+				res = probe_resource(domain->bus->dev, 0xc0010058);
+				if (res)
+					return res;
+			}
+		}
 	}
 
 	return NULL;



More information about the coreboot-gerrit mailing list