Would you try this patch?
I'm having problems where PCI config writes aren't working correctly, and
I'm wondering if you are too.
Thanks,
Myles
Index: sysconfig/src/arch/i386/lib/pci_ops_auto.c
===================================================================
--- sysconfig.orig/src/arch/i386/lib/pci_ops_auto.c
+++ sysconfig/src/arch/i386/lib/pci_ops_auto.c
@@ -45,6 +45,9 @@ const struct pci_bus_operations *pci_che
{
unsigned int tmp;
+ printk_debug("%s\n", __func__);
+ printk_debug("PCI: Forcing configuration type 1\n");
+ return &pci_cf8_conf1;
/*
* Check if configuration type 1 works.
*/
Index: sysconfig/src/devices/pci_device.c
===================================================================
--- sysconfig.orig/src/devices/pci_device.c
+++ sysconfig/src/devices/pci_device.c
@@ -479,6 +479,11 @@ static void pci_set_resource(struct devi
return;
}
+ /* If this resource is fixed don't worry about it. */
+ if (resource->flags & IORESOURCE_FIXED) {
+ return;
+ }
+
/* If I have already stored this resource don't worry about it. */
if (resource->flags & IORESOURCE_STORED) {
return;
@@ -525,7 +530,7 @@ static void pci_set_resource(struct devi
}
if (!(resource->flags & IORESOURCE_PCI_BRIDGE)) {
- unsigned long base_lo, base_hi;
+ u32 base_lo, base_hi;
/* Some chipsets allow us to set/clear the I/O bit
* (e.g. VIA 82c686a). So set it to be safe.
*/
@@ -535,6 +540,19 @@ static void pci_set_resource(struct devi
base_lo |= PCI_BASE_ADDRESS_SPACE_IO;
}
pci_write_config32(dev, resource->index, base_lo);
+ {
+ u32 regval = pci_read_config32(dev, resource->index);
+ if (regval != base_lo) {
+ report_resource_stored(dev, resource, "first try");
+ printk_debug("Second write regval %x base_lo %x\n",
+ regval, base_lo);
+ pci_write_config32(dev, resource->index, base_lo);
+ regval = pci_read_config32(dev, resource->index);
+ if (regval != base_lo)
+ printk_debug("Second failure regval %x base_lo %x\n",
+ regval, base_lo);
+ }
+ }
if (resource->flags & IORESOURCE_PCI64) {
pci_write_config32(dev, resource->index + 4, base_hi);
}
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot