[coreboot] pci_read_config8 crash in mainboard.c
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Tue Mar 3 17:37:13 CET 2009
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 at 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-warning-patch.log
Ouch. We hang inside get_pbus.
Ward, can you revert src/devices/pci_ops.c 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,15 @@
#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);
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
--
http://www.hailfinger.org/
More information about the coreboot
mailing list