Pierre Patino pierre-at-cruzio.com |suse-amd64| wrote:
Greetings
I'm working on a driver for a PCI card. During the installation, I read the BAR0 and BAR1 registers two different ways and I get two different results for BAR1.
pci_resource_start(0) = A pci_read_config_dword(0x10) = A
pci_resource_start(1) = B pci_read_config_dword(0x14) = B+8
Any ideas anyone?
This is not AMD64 specific... Think for a minute about what you are doing. In one case you are getting from the kernel an interpretation of an address, and in the other case you are reading a bit-field that includes an address and a few other bits as well. To cut to the chase, BAR1 contains more then just the base address. Look at your datasheet for a description of the "prefetchable" flag in the BARs. -- Steve Williams "The woods are lovely, dark and deep. steve at .......... But I have promises to keep, http://www........... and lines to code before I sleep, http://www.picturel.com And lines to code before I sleep."