[coreboot] Extra pairs of eyes

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Tue Oct 14 23:23:51 CEST 2008


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?
>   



More information about the coreboot mailing list