PCI device BARs of all types had only bits 1:0 cleared while reading the address

That was correct for IO BARs, but failed to mask bit 3:2 for MEM BARs,
resulting in odd offsets for prefetchable MEM BARs and for 64-bit
capable MEM BARs. Mask the correct number of bits for all types of BARs
and add some debug printing about BAR type.

Corresponding to flashrom svn r946.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
1 file changed