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/8363
-gerrit
commit f7840f74b42bb9e48a31f5383b009d1c4b94df31 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Thu Feb 5 08:22:26 2015 +0200
AMD fam10: Eliminate local variable segn
While max gets updated, by definition segn must remain the same. There is an (old) issue if max=0xff is passed to this function.
Change-Id: I08470b79ff074123e343d5f48181407e02bdf3ad Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/northbridge/amd/amdfam10/northbridge.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c index 0a69d4d..287f468 100644 --- a/src/northbridge/amd/amdfam10/northbridge.c +++ b/src/northbridge/amd/amdfam10/northbridge.c @@ -168,7 +168,6 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool u32 ht_unitid_base[4]; // here assume only 4 HT device on chain u32 min_bus; u32 busses; - u32 segn = max>>8; u32 max_devfn;
if (link->link_num > 3) { @@ -214,11 +213,11 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
// one node can have 8 link and segn is the same min_bus = (((max & 0xff)>>3) + 1) << 3; - max = min_bus | (segn<<8); + max = (max & ~0xff) | min_bus; }
link->secondary = min_bus; - link->subordinate = (segn<<8) | 0xfc; + link->subordinate = (max & ~0xff) | 0xfc;
/* Read the existing primary/secondary/subordinate bus * number configuration.