[coreboot] Extra pairs of eyes
Myles Watson
mylesgw at gmail.com
Tue Oct 14 23:13:49 CEST 2008
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?
Thanks,
Myles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081014/e6bf6b34/attachment.html>
More information about the coreboot
mailing list