diff options
author | Rudolf Marek <r.marek@assembler.cz> | 2009-03-26 21:45:26 +0000 |
---|---|---|
committer | Rudolf Marek <r.marek@assembler.cz> | 2009-03-26 21:45:26 +0000 |
commit | 3a8565a77bbf8f41c2c5560fb2c195c71949fc8c (patch) | |
tree | 05313fc08ce0431132e78979502632a9493cbd6b /src/northbridge/amd/amdfam10 | |
parent | 83da8dcf608d4b6549399581463fe484b71bca6f (diff) | |
download | coreboot-3a8565a77bbf8f41c2c5560fb2c195c71949fc8c.tar.xz |
During the suspend/resume programming I came to an issue that first 4KB of
memory must be clear with 0s because otherwise the resources of K8 will be
totally messed up.
res = probe_resource(dev, 0x100 + (reg | link));
This is called with dev = NULL and this is no good for probe_resource at all.
The attached patch fixes the potential problems and of course the problem
itself. On one particular place was missing test if the device really exists.
This was copied to fam10 and perhaps the same issue is in v3 (DID NOT check).
The rest of the patch is just very paranoid and do all checkings.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Myles Watson <mylesgw@gmail.com>
--This line, and those below, will be igno
red--
M src/devices/pci_ops.c
M src/northbridge/amd/amdk8/northbridge.c
M src/northbridge/amd/amdfam10/northbridge.c
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4030 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd/amdfam10')
-rw-r--r-- | src/northbridge/amd/amdfam10/northbridge.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c index bdb743387d..95e09f4c6a 100644 --- a/src/northbridge/amd/amdfam10/northbridge.c +++ b/src/northbridge/amd/amdfam10/northbridge.c @@ -338,6 +338,8 @@ static int reg_useable(u32 reg,device_t goal_dev, u32 goal_nodeid, for(nodeid = 0; !res && (nodeid < NODE_NUMS); nodeid++) { device_t dev; dev = __f0_dev[nodeid]; + if (!dev) + continue; for(link = 0; !res && (link < 8); link++) { res = probe_resource(dev, 0x1000 + reg + (link<<16)); // 8 links, 0x1000 man f1, } |