On 14.10.2008 23:13, Myles Watson wrote:
> I'm tired of staring at this piece of code wondering why printk isn't
> working as I expected. Can someone point out what I've obviously missed?
>
> code (inserted in pci_device.c in pci_get_resource() right before the limit
> mask and return):
> if (resource->flags)
> {
> printk(BIOS_DEBUG, "%s resource base %08lx limit %08lx size %08lx flags
> %08lx\n",
> dev_path(dev), resource->base, resource->limit,
> resource->size, resource->flags);
>
> printk(BIOS_DEBUG, "\t%s size %lx align %lx gran %lx\n",
> dev_path(dev), resource->size,
> resource->align, resource->gran);
> printk(BIOS_DEBUG, " just broken size %08lx\n", resource->size);
>
> printk(BIOS_DEBUG, " broken align %lx\n", resource->align);
> printk(BIOS_DEBUG, "%s resource size %08lx flags %08lx\n",
> dev_path(dev), resource->size, resource->flags);
>
> printk(BIOS_DEBUG, "%s align %lx gran %lx\n",
> dev_path(dev),
> resource->align, resource->gran);
> }
> output:
> PCI: 01:00.0 resource base 00000000 limit 00000000 size ffffffff flags
> 00000000
> PCI: 01:00.0 size 1000 align 0 gran c
> just broken size 00001000
> broken align c
> PCI: 01:00.0 resource size 00001000 flags 00000000
> PCI: 01:00.0 align c gran c
>
> Notice that size is ffffffff in the first, 0x1000 in the rest.
> Align is 0 in the first, c in the rest.
>
> It looks like printk is botching it. I don't know how else to explain it.
> Is there a limit to the number of arguments you can pass to printk?
>
>From a quick glance, this looks strange. Is this v2 or v3? I don't trust
the v3 printk at the moment because I've not reviewed r921 yet.
Oh, and please be aware that any multicore/multiprocessor machine in v3
is completely BROKEN right now and has been that way for months. (Yes, I
have a fix in the queue. Remind me in a few days.)
Regards,
Carl-Daniel
--
http://www.hailfinger.org/
--
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot