Re: Mapping PCI memory to user-space

From: Jiri Slaby
Date: Wed Oct 24 2007 - 03:53:06 EST


On 10/24/2007 08:59 AM, joncglenn wrote:
> I am writing a driver to map a PCI board memory space (pcibar2) into a
> user-space vma via 'mmap'. What is the relationship between the address
> returned from ioremap and the type of address needed in the
> 'io_remap_page_range' or 'remap_pfn_range' functions? How about the
> following? (I am developing under RHEL4 and a 2.6.9 kernel)

I think you can use the method used for exporting pci resources in /sys. See
pci_mmap_resource. Don't know if this was yet in 2.6.9...

regards,
--
Jiri Slaby (jirislaby@xxxxxxxxx)
Faculty of Informatics, Masaryk University
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/