PCI: Difference between revisions

95 bytes added ,  15 years ago
m
[unchecked revision][unchecked revision]
(→‎Base Address Registers: fixed and masks (mem and io were switched))
Line 249:
|}
 
When you want to retrieve the actual base address of a BAR, be sure to mask (that is, clear) the lower bits. For Memory Space BARs, you calculate (BAR & 0xFFFFFFF0). For I/O Space BARs, you calculate (BAR & 0xFFF80xFFFFFFF8). Do '''not''' shift the bits to the right or the values will be incorrect.
 
To determine the size of memory maps needed by a PCI device, you must read the BAR .
Anonymous user