Next steps for pci-rework branches

Mark Kettenis mark.kettenis at
Sat Aug 12 14:43:03 PDT 2006

> 4. Replace any calls to the old PCI accessor routines (e.g.,
> pciReadLong, xf86MapPciMem, etc.) with calls to the new accessor
> routines.  The APIs are similar, but there are some differences.  The
> biggest difference, which bit me during the Savage driver conversion, is
> that the new routines only allow an entire BAR to be mapped, whereas the
> old routines allowed subranges of a BAR to be mapped.  I suggest
> converting subrange mappings to full BAR mappings *before* converting to
> the new interfaces.  This is the approach that I took with the Savage
> driver.

Sorry to bring this up again, but this means that the libpciaccess API
is *broken*.  There needs to be an interface for subrange
mappings. Since:

1. Mappings can take up valueable resource in the kernel.

2. Mapping the whole BAR might expose "dangerous" registers that could
   be accidentally (or on purpose by a malicious attacker) accessed.
   It's much better to not map these registers in the first place.

Please fix the linpciaccess API before asking people to convert more
drivers and port it to other OSes.


More information about the xorg mailing list