Page 1 of 1

determining sd card reader pci base address size

Posted: Wed Jul 13, 2016 9:15 pm
by aliceinchains
I'm confused if I use the interface code(vendor unique) or count zeros to determine if the base address is 31-8 or 31-9 because couldn't the base address lsb have a zero low nibble??? Hopeing someone has experience with this thx. :?

Re: determining sd card reader pci base address size

Posted: Wed Jul 13, 2016 11:26 pm
by BenLunt
I'm not quite sure what you are trying to do, but if you are trying to find out how much mem-mapped space is allocated to this PCI device, the PCI has a technique specified to do so.

You write 0xFFFFFFFF to the BAR and then read it back. The PCI will set the high bits and clear the low bits of the amount of space it requires.

To be exact, look up the technique in the PCI specification.

Ben