summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorRudolf Marek <r.marek@assembler.cz>2009-03-26 21:45:26 +0000
committerRudolf Marek <r.marek@assembler.cz>2009-03-26 21:45:26 +0000
commit3a8565a77bbf8f41c2c5560fb2c195c71949fc8c (patch)
tree05313fc08ce0431132e78979502632a9493cbd6b /src/devices
parent83da8dcf608d4b6549399581463fe484b71bca6f (diff)
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/devices')
-rw-r--r--src/devices/pci_ops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/pci_ops.c b/src/devices/pci_ops.c
index c6d85f284e..08792f209d 100644
--- a/src/devices/pci_ops.c
+++ b/src/devices/pci_ops.c
@@ -27,7 +27,13 @@
static struct bus *get_pbus(device_t dev)
{
- struct bus *pbus = dev->bus;
+ struct bus *pbus;
+
+ if (!dev)
+ printk_alert("get_pbus: dev is NULL!\n");
+
+ pbus = dev->bus;
+
while(pbus && pbus->dev && !ops_pci_bus(pbus)) {
if (pbus == pbus->dev->bus) {
printk_alert("%s in endless loop looking for a parent "