[coreboot] [patch] i82810 WIP for fixing VGA and 512MB

Elia Yehuda z4ziggy at gmail.com
Tue Nov 18 05:24:54 CET 2008


On Tue, Nov 18, 2008 at 6:04 AM, Corey Osgood <corey.osgood at gmail.com>wrote:

> On Mon, Nov 17, 2008 at 10:10 PM, Elia Yehuda <z4ziggy at gmail.com> wrote:
>
>>
>>
>> On Tue, Nov 18, 2008 at 3:44 AM, Joseph Smith <joe at settoplinux.org>wrote:
>>
>>>
>>>
>>>
>>> On Tue, 18 Nov 2008 00:59:07 +0200, "Elia Yehuda" <z4ziggy at gmail.com>
>>> wrote:
>>> > just noticed ive put it in cpu_bus_ops... have a laugh...
>>> >
>>> No worries, this is how we learn :-)
>>> >
>>> > but i dont have "static struct device_operations mc_ops" - where should
>>> i
>>> > add
>>> > the .ops_pci ?
>>> >
>>> Little confused about what your trying to do here. This doesn't work??
>>>
>>> static const struct pci_driver northbridge_driver __pci_driver = {
>>>         .ops    = &northbridge_operations,
>>>         .vendor = PCI_VENDOR_ID_INTEL,
>>>         .device = 0x7120,
>>> };
>>>
>>
>> this works just fine. i simply don't know where to add ".ops_pci" since i
>> dont have
>> "static struct device_operations mc_ops" in northbridge.c
>>
>
> You should be able to add it to pci_domain_ops, but be sure to check that
> it actually runs.
>

i tried the following, no game :
static void intel_set_subsystem(device_t dev, unsigned vendor, unsigned
device)
{
    u32 pci_id;

    printk_debug("Setting PCI bridge subsystem ID\n");
    pci_id = pci_read_config32(dev, 0);
    pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID, pci_id );
}

static struct pci_operations intel_pci_ops = {
       .set_subsystem    = intel_set_subsystem,
};

static struct device_operations pci_domain_ops = {
    .read_resources        = pci_domain_read_resources,
    .set_resources        = pci_domain_set_resources,
    .enable_resources    = enable_childrens_resources,
    .init            = 0,
    .scan_bus        = pci_domain_scan_bus,
    .ops_pci        = &intel_pci_ops,
};



> Otherwise, you'll need to create that mc_ops driver with just the .ops_pci
> and everything else set to NULL, and use this:
>
> static void enable_dev(struct device *dev)
> {
>     struct device_path path; //unused?
>
>     /* Set the operations if it is a special bus type */
>     if (dev->path.type == DEVICE_PATH_PCI_DOMAIN) {
>         dev->ops = &pci_domain_ops;
>         pci_set_method(dev);
>     } else if (dev->path.type == DEVICE_PATH_APIC_CLUSTER) {
>         dev->ops = &cpu_bus_ops;
>     } else if (dev->path.type == DEVICE_PATH_PCI) {
>         dev->ops = &mc_ops;
>     }
> }
>
> I hope you can understand what I'm trying to say, I'm a bit tired right
> now.


this doesnt work either :

static void intel_set_subsystem(device_t dev, unsigned vendor, unsigned
device)
{
    u32 pci_id;

    printk_debug("Setting PCI bridge subsystem ID\n");
    pci_id = pci_read_config32(dev, 0);
    pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID, pci_id );
}

static struct pci_operations intel_pci_ops = {
       .set_subsystem    = intel_set_subsystem,
};

static struct device_operations mc_ops = {
        .read_resources   = 0, //mc_read_resources,
        .set_resources    = 0, //mc_set_resources,
        .enable_resources = 0, //pci_dev_enable_resources,
        .init             = 0,
        .scan_bus         = 0,
        .ops_pci          = &intel_pci_ops,
};

static void enable_dev(struct device *dev)
{
    struct device_path path;

    /* Set the operations if it is a special bus type */
    if (dev->path.type == DEVICE_PATH_PCI_DOMAIN) {
        dev->ops = &pci_domain_ops;
        pci_set_method(dev);
    } else if (dev->path.type == DEVICE_PATH_APIC_CLUSTER) {
        dev->ops = &cpu_bus_ops;
    } else if (dev->path.type == DEVICE_PATH_PCI) {
        dev->ops = &mc_ops;
    }
}


>
>
> -Corey
>

Elia.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081118/5d91d699/attachment.html>


More information about the coreboot mailing list