On Wed, Nov 5, 2008 at 1:24 PM, Myles Watson mylesgw@gmail.com wrote:
Are you testing these on qemu I assume?
I can. I don't think I've made any functional changes, but it's probably good to check.
Most of this patch isn't exercised by qemu, though. There are no bridges which are not in the dts.
It turns out that I forgot the importance of make clean for build testing. I wish I knew better how to fix the dependencies.
This breaks the build now that I made the change for the pci_ops structs to be const.
From pci_ops_auto.c:
const struct pci_bus_operations *pci_check_direct(void) { unsigned int tmp;
/* * Check if configuration type 1 works. */ { outb(0x01, 0xCFB); tmp = inl(0xCF8); outl(0x80000000, 0xCF8); if ((inl(0xCF8) == 0x80000000) && pci_sanity_check(&pci_cf8_conf1)) { outl(tmp, 0xCF8); printk(BIOS_DEBUG, "PCI: Using configuration type 1\n"); return &pci_cf8_conf1; } outl(tmp, 0xCF8); }
die("pci_check_direct failed\n"); return NULL; }
/** Set the method to be used for PCI, type I or type II */ void pci_set_method(struct device * dev) { printk(BIOS_INFO, "Finding PCI configuration type.\n"); dev->ops->ops_pci_bus = pci_check_direct(); post_code(POST_STAGE2_PHASE2_PCI_SET_METHOD); }
Here are the interesting things: 1. pci_check_direct either returns pci_cfg8_conf1 or dies 2. This code is only used by geodelx
I think the const struct is the right way to do this. Can we change these functions?
Two solutions: 1. Set the entire ops 2. Initialize it correctly and die if the check fails
Comments?
Thanks, Myles