Re: Device driver, PCI, and mmapping

From: James Simmons (
Date: Fri Jun 16 2000 - 08:37:36 EST

On Thu, 15 Jun 2000, Jeff Garzik wrote:

> > In order to access PCI MMIO areas from userspace, you should open
> > "/dev/mem" (or "/dev/kmem") and then call mmap. The mmap call is something
> > as follows:
> [...]
> Look at what he is trying to accomplish... He is writing a kernel
> driver which makes the MMIO areas available to userspace, so opening
> /dev/mem is bypassing his own efforts. :)
> In 2.3.x/2.4.x, there is io_remap_page_range which exists for exporting
> PCI MMIO areas to userspace. As James Simmons mentioned,
> drivers/video/fbmem.c is an example of such usage.

Also using /dev/mem is not portable. This will work on ix86 platforms but
not on other ones.

Q: Why did they deprecate a.out support in linux?
A: Because a nasty coff is bad for your elf.

James Simmons [] ____/|
fbdev/console/gfx developer \ o.O| =(_)= U

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:11 EST