tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
libpciaccess and /dev/pci changes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I just committed the following changes:
- - add mmap() support to /dev/pci* ( enable it with options
PCI_ALLOW_MMAP ) so userland has a way to map PCI devices at their bus
addresses in a MI way instead of having to figure out where in the
CPU's address space the PCI buses are
- - teach libpciaccess to dig through all /dev/pci* nodes in order to
find all PCI devices on all buses and keep track of which file
descriptor to use when mapping them - that way it also finds devices
not visible through pci0 and has a way to map them.
With this Xorg should be able to use any PCI graphics device on any
hardware, no matter if it's the console or not. So far I only tested
it on my U60 which successfully used an XVR-100 ( an RV100 with Sun
firmware ) in the 66MHz slot as secondary head, along with an ffb with
the ffb being the console.
Things left to do:
- - find out how lipciaccess is supposed to deal with multiple IO spaces
- - fix ROM handling ( I didn't touch it so it still won't work on
sparc64 for example )
- - cleanup
So far pcimmap() relies on the underlying bus_space_mmap() methods to
enforce limits, especially on architectures where RAM overlaps PCI
space. We should not allow anyone to map system memory through /dev/
pci. These limits are machine dependent so we can't do much about them
in pcimmap(). Otherwise, we could check every mmap() request against
all known BARs on the same bus and reject everything that's not
covered by one.
have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iQEVAwUBSlZOmcpnzkX8Yg2nAQK/1Qf9HnpEX2e14HzXmAniG2na6IR+SCxMlLvu
m4zbe01B2qSwPtL7vih4BOp69GBhnLxQ3Ib0Xkw4aWu30MJxVb/5ebPh7m2peei2
+gXVKuQ/VBYIItUbpT8xSYIHBP2CseYznZyfan+5UGnoFPUlEieEPpiVxM408RoS
pYkfrXny/cHnl0CsKaJR0yXa7EYh86N+nAmIkleVTYDWfKd8b3mjoWFuz/3JKcxg
9Fmic0IgIdDr1x8SfZROi08qls+luIXgN0SDYYmE/poI6aFgrr/pdC+WPuhK1RKV
PSrqRCWF5ta6ux0vekvRgq1m2S/DHDRNFa9ar3rM7YvvovL8AontdQ==
=rTTs
-----END PGP SIGNATURE-----
Home |
Main Index |
Thread Index |
Old Index