tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pci_mapreg_map(9) and prefetchable BARs
Hello,
Why would it fail if the BAR is marked as prefetchable but someone requests a
non-prefetchable mapping? The bit is just a hint.
Have fun
Michael
On Aug 9, 2011, at 3:49 PM, David Young <dyoung%pobox.com@localhost> wrote:
> 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
> not.
>
> 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.
>
> Thoughts?
>
> 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.
>
> Dave
>
> [1] On x86 the BAR is mapped with write-combining.
>
> --
> David Young OJC Technologies
> dyoung%ojctech.com@localhost Urbana, IL * (217) 344-0444 x24
Home |
Main Index |
Thread Index |
Old Index