On 03.03.2009 17:37, Carl-Daniel Hailfinger wrote:
On 02.03.2009 16:40, Carl-Daniel Hailfinger wrote:
On 02.03.2009 16:33, ron minnich wrote:
On Mon, Mar 2, 2009 at 7:30 AM, Carl-Daniel Hailfinger c-d.hailfinger.devel.2006@gmx.net wrote:
AFAIK it has been the case at least since AMD published their 690G/SB600 port, maybe even before that. For a fun time, grep over the tree for pci_cf8_conf1 and you'll see it is not constrained to mainboard code.
ok, has anyone checked to see if it's the code that determines type 1/type 2 access going wrong somehow?
Maybe. pci_set_method() is not called on any K8 platform. AFAICS type 1 is hardcoded there, so pci_set_method should not be necessary in theory. I don't know whether setting the access method happens early enough for the mainboard code.
If so, there's an easy fix :-)
Hopefully. Once Ward boots tomorrow with my debug patch, we'll know where exactly it hangs and probably also why.
http://ward.vandewege.net/coreboot/m2a-vm/m2a-vm-with-fix-printk-format-warn...
Ouch. We hang inside get_pbus.
Ward, can you revert src/devices/pci_ops.c again and apply this patch?
Index: src/devices/pci_ops.c =================================================================== --- src/devices/pci_ops.c (Revision 3967) +++ src/devices/pci_ops.c (Arbeitskopie) @@ -24,11 +24,19 @@ #include <device/pci_ids.h> #include <device/pci_ops.h>
-static struct bus *get_pbus(device_t dev) +struct bus *get_pbus(device_t dev) { + printk_spew("%s entered\n", __func__); struct bus *pbus = dev->bus; + printk_spew("%s before loop, pbus=%p, pbus->dev=%p, pbus->dev->ops=%p, pbus->children=%p\n", __func__, pbus, pbus ? pbus->dev : 0xdeadbeef, (pbus && pbus->dev) ? pbus->dev->ops : 0xdeadbeef, pbus ? pbus->children: 0xdeadbeef); while(pbus && pbus->dev && !ops_pci_bus(pbus)) { + printk_spew("%s inside loop begin, pbus=%p, pbus->dev=%p, pbus->dev->ops=%p, pbus->children=%p\n", __func__, pbus, pbus ? pbus->dev : 0xdeadbeef, (pbus && pbus->dev) ? pbus->dev->ops : 0xdeadbeef, pbus ? pbus->children: 0xdeadbeef); + if (pbus == pbus->dev->bus) { + printk_alert("%s stuck in endless loop for %s, breaking out\n", __func__, dev_path(dev)); + break; + } pbus = pbus->dev->bus; + printk_spew("%s inside loop end, pbus=%p, pbus->dev=%p, pbus->dev->ops=%p, pbus->children=%p\n", __func__, pbus, pbus ? pbus->dev : 0xdeadbeef, (pbus && pbus->dev) ? pbus->dev->ops : 0xdeadbeef, pbus ? pbus->children: 0xdeadbeef); } if (!pbus || !pbus->dev || !pbus->dev->ops || !pbus->dev->ops->ops_pci_bus) { printk_alert("%s Cannot find pci bus operations", dev_path(dev));
Regards, Carl-Daniel