[coreboot] pci_device.c cleanup

Myles Watson mylesgw at gmail.com
Tue Nov 4 21:04:21 CET 2008

This patch clarifies/adds comments and changes names in device/pci_device.c

It also changes %p debug statements in various places.  I think they get in
the way of diffs when you have log files to compare.  I don't want to see
allocation differences most of the time.  I turned most of them into NULL
checks.  If they were supposed to be "Where are we in device allocation?"
checks, we could make them into that too.

It's a work-in-progress. Comments welcome.

I think most of the changes are self explanatory, but this one might not be:

If you are reading all the BARs from a device, and you come to a 64-bit BAR.
No matter why you skip it, you should skip it as a 64-bit BAR, and not try
read the upper half as the next 32-bit BAR.

Because of that, set the 64-bit flag IORESOURCE_PCI64 early, and don't clear
it on return.

Signed-off-by: Myles Watson <mylesgw at gmail.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081104/efe1ccd1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pci_device_cleanup.diff
Type: text/x-patch
Size: 14462 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081104/efe1ccd1/attachment.diff>

More information about the coreboot mailing list