Prefered method to map PCI memory into userspace.
I am looking for the most current (blessed) structure for mapping PCI memory to a user process. One that allows both PIO and busmastering to work on a common block of PCI RAM. I am not concerned with backporting to older kernels but it would be nice if the solution wasn't ibm specific.
My problem is a 64M window into a frame buffer that I would like to map into user space. I am more than willing to put forth the effort, I just want to make sure I'm heading in the right direction.
Is there a better forum for posting this? Regards, J. Deas
RH9.0 2.4.20-6smp kernel and above.
Signature · 2 lines
Jim Deas <[email protected]> JAD Systems
Quoted 11 lines · Jim Deas
I am looking for the most current (blessed) structure for mapping PCI memory to a user process. One that allows both PIO and busmastering to work on a common block of PCI RAM. I am not concerned with backporting to older kernels but it would be nice if the solution wasn't ibm specific.
My problem is a 64M window into a frame buffer that I would like to map into user space. I am more than willing to put forth the effort, I just want to make sure I'm heading in the right direction.
Quoted 4 lines
Is there a better forum for posting this? Regards, J. Deas
RH9.0 2.4.20-6smp kernel and above.
Albert Cahalan wrote a patch, for 2.6, that makes mmappable all PCI device memory regions. They show up as files in the appropriate subdirectories under /proc/bus/pci. See http://lkml.org/lkml/2003/7/13/258 for the patch and details.
Joe
Quoted 6 lines
Albert Cahalan wrote a patch, for 2.6, that makes mmappable all PCI device memory regions. They show up as files in the appropriate subdirectories under
/proc/bus/pci. See http://lkml.org/lkml/2003/7/13/258 for the patch and details.
mmap of /proc/bus/pci is a standard thing in 2.4 already and so in 2.6 as well, though not all archs may implement it..
Regarding bus mastering, there's no way to do that without a kernel driver.
Ben.
Quoted 2 lines · On Sat, 27 Sep 2003 02:40:10 +0200 Benjamin Herrenschmidt…
mmap of
/proc/bus/pciis a standard thing in 2.4 already and so in 2.6 as well, though not all archs may implement it..
If someone is looking for something to do, it would be incredibly value to make it so that all arches support this, and in particular get right the case of mmap()'ing the PCI host bridge.
If this were done, the PCI domain code in xfree86 could be enabled for all Linux platforms, not just the ones that have this implemented properly.