lkml.org 
[lkml]   [2000]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: PCI Memory Mapping
    From
    On Fri, Aug 04, 2000 at 01:56:39PM -0700, Charles Samuels wrote:
    > Anyway, What I'm doing is scanning the PCI bus, and finding the one
    > or more cards that have 16mb of on-board memory. base_address[0] if you
    > will. I AND that with PCI_BASE_ADDRESS_IO_MASK, and register a device
    > major and minor for the device.
    >
    > A userland program will now attempt to mmap the device. It requests
    > exactly 16mb. Everything seems ok until I try to read or write to this
    > memory. It gives me a kernel complaint:
    >
    > do_wp_page: bogus page at address 4017400 (72000000)
    [...]
    > if (remap_page_range(vma->vm_start, physical, vsize, vma->vm_page_prot))
    > return 0;

    Use io_remap_page_range() instead.

    --
    Andreas E. Bombe <andreas.bombe@munich.netsurf.de> DSA key 0x04880A44
    http://home.pages.de/~andreas.bombe/ http://linux1394.sourceforge.net/

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:58    [W:3.342 / U:0.864 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site