determining sd card reader pci base address size

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
aliceinchains
Posts: 14
Joined: Wed Aug 13, 2014 11:04 am

determining sd card reader pci base address size

Post 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. :?
User avatar
BenLunt
Member
Member
Posts: 941
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: determining sd card reader pci base address size

Post 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
Post Reply