tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pci_mapreg_map(9) and prefetchable BARs

Today, pci_mapreg_map(9) on x86 will try to create a
BUS_SPACE_MAP_PREFETCHABLE mapping[1] of a prefetchable BAR no matter
whether BUS_SPACE_MAP_PREFETCHABLE was passed to pci_mapreg_map(9) or

A less surprising behavior would be for pci_mapreg_map(9) to
create a BUS_SPACE_MAP_PREFETCHABLE mapping of a prefetchable BAR
only if BUS_SPACE_MAP_PREFETCHABLE was passed, and to fail if
BUS_SPACE_MAP_PREFETCHABLE was *not* passed but the region's behavior is
intrinsically prefetchable.


BTW, the reason this comes up is that I am working with some 10Gbe NICs
whose BARs' prefetchable bits are set due to a manufacturer mistake.  I
have worked around this in the same way that if_fxp_pci.c has, but I
think that the pci(9) code should be a bit less (more?) "helpful" than
it is.


[1] On x86 the BAR is mapped with write-combining.

David Young             OJC Technologies      Urbana, IL * (217) 344-0444 x24

Home | Main Index | Thread Index | Old Index